diff options
| -rw-r--r-- | core/res/res/layout/autofill_save.xml | 135 |
1 files changed, 72 insertions, 63 deletions
diff --git a/core/res/res/layout/autofill_save.xml b/core/res/res/layout/autofill_save.xml index 77fa62a5ecc9..5e5b4fe68bd9 100644 --- a/core/res/res/layout/autofill_save.xml +++ b/core/res/res/layout/autofill_save.xml @@ -14,94 +14,103 @@ limitations under the License. --> +<!-- NOTE: outer layout is required to provide proper shadow. --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/autofill_save" android:layout_width="fill_parent" android:layout_height="wrap_content" - android:layout_marginTop="32dp" - android:paddingTop="16dp" - android:elevation="32dp" - android:background="?android:attr/colorBackground" android:orientation="vertical"> <LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/autofill_save" android:layout_width="fill_parent" android:layout_height="wrap_content" - android:paddingLeft="16dp" - android:paddingRight="16dp" + android:layout_marginTop="32dp" + android:paddingTop="16dp" + android:elevation="32dp" + android:background="?android:attr/colorBackground" android:orientation="vertical"> <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" - android:orientation="horizontal"> + android:paddingLeft="16dp" + android:paddingRight="16dp" + android:orientation="vertical"> - <TextView - android:id="@+id/autofill_save_title" - android:layout_width="0dp" + <LinearLayout + android:layout_width="fill_parent" android:layout_height="wrap_content" - android:text="@string/autofill_save_title" - android:textSize="16sp" - android:textColor="?android:attr/textColorPrimary" - android:layout_weight="1"> - </TextView> - - <ImageView - android:id="@+id/autofill_save_close" - android:layout_width="wrap_content" + android:orientation="horizontal"> + + <TextView + android:id="@+id/autofill_save_title" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:text="@string/autofill_save_title" + android:textSize="16sp" + android:textColor="?android:attr/textColorPrimary" + android:layout_weight="1"> + </TextView> + + <ImageView + android:id="@+id/autofill_save_close" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginLeft="16dp" + android:src="@android:drawable/ic_close" + android:alpha="0.54" + android:background="?android:attr/selectableItemBackgroundBorderless" + android:contentDescription="@android:string/close_button_text"> + </ImageView> + + </LinearLayout> + + <com.android.server.autofill.ui.CustomScrollView + android:id="@+id/autofill_save_custom_subtitle" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginLeft="16dp" - android:src="@android:drawable/ic_close" - android:alpha="0.54" - android:background="?android:attr/selectableItemBackgroundBorderless" - android:contentDescription="@android:string/close_button_text"> - </ImageView> + android:layout_marginTop="4dp" + android:visibility="gone"/> </LinearLayout> - <com.android.server.autofill.ui.CustomScrollView - android:id="@+id/autofill_save_custom_subtitle" - android:layout_width="match_parent" + <com.android.internal.widget.ButtonBarLayout + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="4dp" - android:visibility="gone"/> + android:layout_gravity="end" + android:padding="16dp" + android:clipToPadding="false" + android:layout_weight="1" + android:orientation="horizontal"> - </LinearLayout> + <Space + android:layout_width="0dp" + android:layout_height="0dp" + android:layout_weight="1" + android:visibility="invisible"> + </Space> - <com.android.internal.widget.ButtonBarLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="end" - android:padding="16dp" - android:clipToPadding="false" - android:layout_weight="1" - android:orientation="horizontal"> - - <Space - android:layout_width="0dp" - android:layout_height="0dp" - android:layout_weight="1" - android:visibility="invisible"> - </Space> + <Button + android:id="@+id/autofill_save_no" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + style="?android:attr/buttonBarButtonStyle" + android:text="@string/autofill_save_no"> + </Button> - <Button - android:id="@+id/autofill_save_no" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - style="?android:attr/buttonBarButtonStyle" - android:text="@string/autofill_save_no"> - </Button> + <Button + android:id="@+id/autofill_save_yes" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + style="@style/Widget.Material.Button.Colored" + android:text="@string/autofill_save_yes"> + <requestFocus /> + </Button> - <Button - android:id="@+id/autofill_save_yes" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - style="@style/Widget.Material.Button.Colored" - android:text="@string/autofill_save_yes"> - <requestFocus /> - </Button> + </com.android.internal.widget.ButtonBarLayout> - </com.android.internal.widget.ButtonBarLayout> + </LinearLayout> </LinearLayout> |