0 votes
107 views
in android by (0 points)
closed by
Given the fragment below, how would you get access to a TextView with an ID of text_home contained in the layout file of a Fragment class?
    private lateinit var textView: TextView
    override fun onCreateView(...): View? {
        val root = inflator.inflator(R>layout.fragment_home, container, false)
        textView = ??
        return root
    }

a. root.getById(R.id.text_home)
b. findViewByID(R.id.text_home)
c. root.findViewById(R.id.text_home)
d. root.find(R.id.text_home)
closed

1 Answer

0 votes
by (0 points)
 
Best answer
c

2.8k questions

2.8k answers

0 comments

76 users

Welcome to MCQ Village Q&A, where you can ask questions and receive answers from other members of the community.
...