PrepAway - Latest Free Exam Questions & Answers

Which is the correct code that goes into (1)?

The following code applies to a dialog layout defined in XML. Which is the correct code that goes
into (1)? (Assume the dialog layout is correctly defined in res/layout/custom_dialog.xml, and there
are no other problems in the rest of the application.)

PrepAway - Latest Free Exam Questions & Answers

A.
dialog.inflate(R.layout.custom_dialog);

B.
dialog.setContentView(R.layout.custom_dialog);

C.
dialog.getinflate().inflate(R.layout.custom_dialog);

D.
dialog.setLayout(R.layout.custom_dialog);

Explanation:

One Comment on “Which is the correct code that goes into (1)?


Leave a Reply

Your email address will not be published. Required fields are marked *