AND-401 Exam QuestionsBrowse all questions from this exam

AND-401 Exam - Question 89


Which UI does the following code builds?

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:orientation="horizontal" >

android:id="@+id/textView1"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="Name:" />

android:id="@+id/editText1"

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:layout_weight="1"

android:ems="10" />

android:id="@+id/button1"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="Post" />

Show Answer
Correct Answer: C

The LinearLayout parent has a vertical orientation, which means all its children will be arranged vertically. The first child is a LinearLayout with horizontal orientation, containing a TextView and an EditText side by side. Below this horizontal LinearLayout is a Button. Therefore, the UI built by the code will have an EditText to the right of a TextView and a Button beneath them.

Discussion

1 comment
Sign in to comment
MmadiOption: C
Dec 31, 2022

C. An edit text to the right of a text view and a button beneath them