The method that connects an XML layout file to an activity is:
- findViewById()
- setContentView()
- inflateMenu()
- startActivity()
Answer
B) setContentView()
setContentView(R.layout.activitymain) inflates the layout as the activity's UI.
Computer Science MCQ · More Lab: Android Studio Setup and First App MCQs · Practise