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.)
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: