Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 320b304d authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Adjust fill dialog UI" into tm-dev am: a98298ec

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16962006

Change-Id: Iaa55c56b407b0663ed0ead14e3fdbc09a0392382
parents aea0a5ff a98298ec
Loading
Loading
Loading
Loading
+5 −12
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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"
+1 −1
Original line number Diff line number Diff line
@@ -871,7 +871,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>
+6 −1
Original line number Diff line number Diff line
@@ -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) {