Created
April 25, 2015 02:23
-
-
Save anonymous/256752a04db14a3947a8 to your computer and use it in GitHub Desktop.
3 options for the layout of an activity for a quiz question
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="vertical" | |
android:paddingBottom="@dimen/activity_vertical_margin" | |
android:paddingLeft="@dimen/activity_horizontal_margin" | |
android:paddingRight="@dimen/activity_horizontal_margin" | |
android:paddingTop="@dimen/activity_vertical_margin" | |
tools:context=".MainActivity"> | |
<TextView | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_marginBottom="16dp" | |
android:text="Quantity" | |
android:textAllCaps="true" /> | |
<LinearLayout | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:orientation="horizontal"> | |
<Button | |
android:layout_width="48dp" | |
android:layout_height="48dp" | |
android:onClick="decrement" | |
android:text="-" /> | |
<TextView | |
android:id="@+id/quantity_text_view" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_marginLeft="8dp" | |
android:layout_marginRight="8dp" | |
android:text="2" | |
android:textColor="@android:color/black" | |
android:textSize="16sp" /> | |
<Button | |
android:layout_width="48dp" | |
android:layout_height="48dp" | |
android:onClick="increment" | |
android:text="+" /> | |
</LinearLayout> | |
<TextView | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_marginTop="16dp" | |
android:text="Price" | |
android:textAllCaps="true" /> | |
<TextView | |
android:id="@+id/price_text_view" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_marginTop="16dp" | |
android:text="$10" | |
android:textColor="@android:color/black" | |
android:textSize="16sp" /> | |
<Button | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_marginTop="16dp" | |
android:onClick="submitOrder" | |
android:text="Order" /> | |
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="horizontal" | |
android:paddingBottom="@dimen/activity_vertical_margin" | |
android:paddingLeft="@dimen/activity_horizontal_margin" | |
android:paddingRight="@dimen/activity_horizontal_margin" | |
android:paddingTop="@dimen/activity_vertical_margin" | |
tools:context=".MainActivity"> | |
<TextView | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_marginBottom="16dp" | |
android:text="Quantity" | |
android:textAllCaps="true" /> | |
<LinearLayout | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:orientation="vertical"> | |
<Button | |
android:layout_width="48dp" | |
android:layout_height="48dp" | |
android:onClick="decrement" | |
android:text="-" /> | |
<TextView | |
android:id="@+id/quantity_text_view" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_marginLeft="8dp" | |
android:layout_marginRight="8dp" | |
android:text="2" | |
android:textColor="@android:color/black" | |
android:textSize="16sp" /> | |
<Button | |
android:layout_width="48dp" | |
android:layout_height="48dp" | |
android:onClick="increment" | |
android:text="+" /> | |
</LinearLayout> | |
<TextView | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_marginTop="16dp" | |
android:text="Price" | |
android:textAllCaps="true" /> | |
<TextView | |
android:id="@+id/price_text_view" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_marginTop="16dp" | |
android:text="$10" | |
android:textColor="@android:color/black" | |
android:textSize="16sp" /> | |
<Button | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_marginTop="16dp" | |
android:onClick="submitOrder" | |
android:text="Order" /> | |
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="vertical" | |
android:paddingBottom="@dimen/activity_vertical_margin" | |
android:paddingLeft="@dimen/activity_horizontal_margin" | |
android:paddingRight="@dimen/activity_horizontal_margin" | |
android:paddingTop="@dimen/activity_vertical_margin" | |
tools:context=".MainActivity"> | |
<LinearLayout | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:orientation="horizontal"> | |
<TextView | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_marginBottom="16dp" | |
android:text="Quantity" | |
android:textAllCaps="true" /> | |
<Button | |
android:layout_width="48dp" | |
android:layout_height="48dp" | |
android:onClick="decrement" | |
android:text="-" /> | |
<TextView | |
android:id="@+id/quantity_text_view" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_marginLeft="8dp" | |
android:layout_marginRight="8dp" | |
android:text="2" | |
android:textColor="@android:color/black" | |
android:textSize="16sp" /> | |
<Button | |
android:layout_width="48dp" | |
android:layout_height="48dp" | |
android:onClick="increment" | |
android:text="+" /> | |
</LinearLayout> | |
<TextView | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_marginTop="16dp" | |
android:text="Price" | |
android:textAllCaps="true" /> | |
<TextView | |
android:id="@+id/price_text_view" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_marginTop="16dp" | |
android:text="$10" | |
android:textColor="@android:color/black" | |
android:textSize="16sp" /> | |
<Button | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_marginTop="16dp" | |
android:onClick="submitOrder" | |
android:text="Order" /> | |
</LinearLayout> |
A
A
مافهمتش
Le lun. 18 janv. 2021 à 18:23, Elbek96 <notifications@github.com> a écrit :
… ***@***.**** commented on this gist.
------------------------------
[image: Безымянный]
<https://user-images.githubusercontent.com/39808004/104946373-c1db0b80-59db-11eb-85df-ce873c8b29fa.png>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://gist.github.com/256752a04db14a3947a8#gistcomment-3598192>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AP5WHJYWM3Y5C3YYAVQZ5DLS2RVBZANCNFSM4HJZIDSQ>
.
A
A
A
A
A
A
A
a
option A is correct Answer Because orientation property of root view is vertical But in Option B That's Horizontal....:)
Option A is correct
OPTION A is the Correct Answer because OPTION B is created by horizontal orientation and OPTION C is different with the layouts in activity_main.xml
OPTION -A
A
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Definitely option A is correct.