nerdexam
Android

AND-401 · Question #51

AND-401 Question #51: Real Exam Question with Answer & Explanation

The correct answer is C. An edit text to the right of a text view and a button beneath them. See the full explanation below for the reasoning.

Question

Which UI does the following code builds? <?xml version="1.0" encoding="utf-8"?> android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Name:" /> <EditText android:id="@+id/editText1" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1" android:ems="10" /> </LinearLayout> <Button android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Post" /> </LinearLayout>

Options

  • AAn edit text to the left of a text view and a button beneath it
  • BAn edit text to the right of a text view and a button to the right of the text view
  • CAn edit text to the right of a text view and a button beneath them
  • DA text view , an edit text beneath it and the button beneath the edit text

Community Discussion

No community discussion yet for this question.

Full AND-401 Practice
Which UI does the following code builds? <?xml version="1.0"... | AND-401 Q#51 Answer | NerdExam