Which method returns the text of a string resource in an activity?
- setText(R.drawable.name)
- getString(R.string.name)
- findViewById()
- getDrawable(R.string.name)
Answer
B) getString(R.string.name)
getString(resId) returns the string value.
Computer Science MCQ · More Lab: Student Information App Using Resources MCQs · Practise