Adjust fill dialog UI
1. Make rounded corners on the Fill dialog. 2. Fixed the position of the secondary button in the fill dialog and save UI. 3. Change the text of the secondary button in the fill dialog to "No thinks". 4. Reduce the size of the icon in the fill dialog. 5. Darken the outside of the fill dialog. Bug: 213136422 Test: Manual Change-Id: Ieecaa6b777ffd0600b88b29a18c1c48b1394a431
This commit is contained in:
@@ -22,8 +22,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/autofill_save_outer_top_margin"
|
||||
android:padding="@dimen/autofill_save_outer_top_padding"
|
||||
android:elevation="@dimen/autofill_elevation"
|
||||
android:background="?android:attr/colorBackground"
|
||||
android:background="@drawable/bottomsheet_background"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
@@ -48,9 +47,7 @@
|
||||
android:gravity="center_horizontal"
|
||||
android:paddingStart="@dimen/autofill_save_inner_padding"
|
||||
android:paddingEnd="@dimen/autofill_save_inner_padding"
|
||||
android:visibility="gone"
|
||||
android:foreground="?attr/listChoiceBackgroundIndicator"
|
||||
style="@style/AutofillDatasetPicker" />
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -61,7 +58,6 @@
|
||||
android:paddingStart="@dimen/autofill_save_inner_padding"
|
||||
android:paddingEnd="@dimen/autofill_save_inner_padding"
|
||||
android:visibility="gone"
|
||||
android:foreground="?attr/listChoiceBackgroundIndicator"
|
||||
style="@style/AutofillDatasetPicker" />
|
||||
|
||||
<ListView
|
||||
@@ -71,15 +67,12 @@
|
||||
android:layout_height="0dp"
|
||||
android:drawSelectorOnTop="true"
|
||||
android:clickable="true"
|
||||
android:divider="@null"
|
||||
android:divider="?android:attr/listDivider"
|
||||
android:visibility="gone"
|
||||
android:paddingStart="@dimen/autofill_save_inner_padding"
|
||||
android:paddingEnd="@dimen/autofill_save_inner_padding"
|
||||
android:foreground="?attr/listChoiceBackgroundIndicator"
|
||||
style="@style/AutofillDatasetPicker" />
|
||||
|
||||
<com.android.internal.widget.ButtonBarLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:padding="@dimen/autofill_save_button_bar_padding"
|
||||
@@ -91,7 +84,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="?android:attr/buttonBarButtonStyle"
|
||||
android:text="@string/dismiss_action">
|
||||
android:text="@string/autofill_save_no">
|
||||
</Button>
|
||||
|
||||
<Space
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
</LinearLayout>
|
||||
|
||||
<com.android.internal.widget.ButtonBarLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:padding="@dimen/autofill_save_button_bar_padding"
|
||||
|
||||
@@ -878,7 +878,7 @@
|
||||
<integer name="autofill_max_visible_datasets">3</integer>
|
||||
|
||||
<!-- Size of an icon in the Autolfill fill dialog -->
|
||||
<dimen name="autofill_dialog_icon_size">56dp</dimen>
|
||||
<dimen name="autofill_dialog_icon_size">24dp</dimen>
|
||||
|
||||
<!-- Size of a slice shortcut view -->
|
||||
<dimen name="slice_shortcut_size">56dp</dimen>
|
||||
|
||||
@@ -166,7 +166,9 @@ final class DialogFillUi {
|
||||
window.setType(WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY);
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM
|
||||
| WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
|
||||
| WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH);
|
||||
| WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH
|
||||
| WindowManager.LayoutParams.FLAG_DIM_BEHIND);
|
||||
window.setDimAmount(0.6f);
|
||||
window.addPrivateFlags(WindowManager.LayoutParams.SYSTEM_FLAG_SHOW_FOR_ALL_USERS);
|
||||
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
|
||||
window.setGravity(Gravity.BOTTOM | Gravity.CENTER);
|
||||
@@ -216,6 +218,8 @@ final class DialogFillUi {
|
||||
|
||||
private void setDismissButton(View decor) {
|
||||
final TextView noButton = decor.findViewById(R.id.autofill_dialog_no);
|
||||
// set "No thinks" by default
|
||||
noButton.setText(R.string.autofill_save_no);
|
||||
noButton.setOnClickListener((v) -> mCallback.onCanceled());
|
||||
}
|
||||
|
||||
@@ -224,6 +228,7 @@ final class DialogFillUi {
|
||||
// set "Continue" by default
|
||||
yesButton.setText(R.string.autofill_continue_yes);
|
||||
yesButton.setOnClickListener(listener);
|
||||
yesButton.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
private void initialAuthenticationLayout(View decor, FillResponse response) {
|
||||
|
||||
Reference in New Issue
Block a user