Make activity dialog sample look more like an alert dialog.
Change-Id: I808604968a647eaedc703a76afa7231812723399
This commit is contained in:
@@ -20,25 +20,34 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent" android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="4dip" android:gravity="center_horizontal">
|
||||
android:padding="4dp" android:gravity="center_horizontal">
|
||||
|
||||
<!-- Message to show to use. -->
|
||||
<TextView android:id="@+id/text"
|
||||
android:layout_width="wrap_content" android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical|center_horizontal"
|
||||
android:textStyle="?android:attr/textAppearanceMedium"
|
||||
android:text="@string/dialog_activity_text"/>
|
||||
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content"
|
||||
android:orientation="horizontal" android:paddingTop="4dip">
|
||||
<Button android:id="@+id/add"
|
||||
android:layout_width="wrap_content" android:layout_height="wrap_content"
|
||||
android:text="@string/dialog_activity_add">
|
||||
<requestFocus />
|
||||
</Button>
|
||||
<Button android:id="@+id/remove"
|
||||
android:layout_width="wrap_content" android:layout_height="wrap_content"
|
||||
android:text="@string/dialog_activity_remove">
|
||||
</Button>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Container in which we are going to add and remove views, to demonstrate
|
||||
how the layout adjusts based on size. -->
|
||||
<LinearLayout android:id="@+id/inner_content"
|
||||
android:layout_width="wrap_content" android:layout_height="wrap_content"
|
||||
android:orientation="horizontal" android:paddingTop="4dip">
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="4dp" android:paddingBottom="4dp">
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Alert dialog style buttons along the bottom. -->
|
||||
<LinearLayout style="?android:attr/alertDialogButtonGroupStyle"
|
||||
android:layout_width="match_parent" android:layout_height="wrap_content"
|
||||
android:measureWithLargestChild="true">
|
||||
<Button style="?android:attr/borderlessButtonStyle" android:id="@+id/add"
|
||||
android:layout_width="wrap_content" android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/dialog_activity_add" />
|
||||
<Button style="?android:attr/borderlessButtonStyle" android:id="@+id/remove"
|
||||
android:layout_width="wrap_content" android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/dialog_activity_remove" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
Reference in New Issue
Block a user