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

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

Merge changes from topics "dialog-width", "icon-size" into udc-dev am: 6135a70b am: 4530a546

parents 5d61d449 4530a546
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -35,10 +35,10 @@

        <ImageView
            android:id="@+id/autofill_service_icon"
            android:scaleType="fitStart"
            android:scaleType="fitCenter"
            android:visibility="gone"
            android:layout_width="@dimen/autofill_dialog_icon_size"
            android:layout_height="@dimen/autofill_dialog_icon_size"/>
            android:layout_height="@dimen/autofill_dialog_icon_max_height"
            android:layout_width="fill_parent"/>

        <LinearLayout
            android:id="@+id/autofill_dialog_header"
+3 −4
Original line number Diff line number Diff line
@@ -40,10 +40,10 @@

            <ImageView
                android:id="@+id/autofill_save_icon"
                android:scaleType="fitStart"
                android:scaleType="fitCenter"
                android:layout_gravity="center"
                android:layout_width="@dimen/autofill_save_icon_size"
                android:layout_height="@dimen/autofill_save_icon_size"/>
                android:layout_height="@dimen/autofill_save_icon_max_height"
                android:layout_width="fill_parent"/>

            <TextView
                android:id="@+id/autofill_save_title"
@@ -60,7 +60,6 @@
                android:id="@+id/autofill_save_custom_subtitle"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/autofill_save_scroll_view_top_margin"
                android:visibility="gone"/>

        </LinearLayout>
+8 −8
Original line number Diff line number Diff line
@@ -877,6 +877,7 @@
    <dimen name="autofill_elevation">32dp</dimen>
    <dimen name="autofill_save_inner_padding">16dp</dimen>
    <dimen name="autofill_save_icon_size">32dp</dimen>
    <dimen name="autofill_save_icon_max_height">56dp</dimen>
    <dimen name="autofill_save_title_start_padding">8dp</dimen>
    <dimen name="autofill_save_scroll_view_top_margin">16dp</dimen>
    <dimen name="autofill_save_button_bar_padding">16dp</dimen>
@@ -885,19 +886,18 @@
    <!-- Max height of the the autofill save custom subtitle as a fraction of the screen width/height -->
    <dimen name="autofill_save_custom_subtitle_max_height">20%</dimen>

    <!-- Max (absolute) dimensions (both width and height) of autofill service icon on autofill save affordance.
      NOTE: the actual displayed size might is actually smaller than this and is hardcoded in the
      autofill_save.xml layout; this dimension is just used to avoid a crash in the UI (if the icon provided
      by the autofill service metadata is bigger than these dimentionsit will not be displayed).
    -->
    <dimen name="autofill_save_icon_max_size">300dp</dimen>

    <!-- Maximum number of datasets that are visible in the UX picker without scrolling -->
    <integer name="autofill_max_visible_datasets">3</integer>

    <!-- Size of an icon in the Autolfill fill dialog -->
    <!-- Size of an icon in the Autofill fill dialog -->
    <dimen name="autofill_dialog_icon_size">32dp</dimen>

    <!-- The max height of an icon in the Autofill fill dialog. -->
    <dimen name="autofill_dialog_icon_max_height">56dp</dimen>

    <!-- The max width of the Autofill fill dialog. -->
    <dimen name="autofill_dialog_max_width">640dp</dimen>

    <!-- Size of a slice shortcut view -->
    <dimen name="slice_shortcut_size">56dp</dimen>
    <!-- Size of action icons in a slice -->
+2 −2
Original line number Diff line number Diff line
@@ -3665,8 +3665,8 @@
  <java-symbol type="dimen" name="autofill_dataset_picker_max_width"/>
  <java-symbol type="dimen" name="autofill_dataset_picker_max_height"/>
  <java-symbol type="dimen" name="autofill_save_custom_subtitle_max_height"/>
  <java-symbol type="dimen" name="autofill_save_icon_max_size"/>
  <java-symbol type="integer" name="autofill_max_visible_datasets" />
  <java-symbol type="dimen" name="autofill_dialog_max_width" />

  <java-symbol type="style" name="Theme.DeviceDefault.Autofill" />
  <java-symbol type="style" name="Theme.DeviceDefault.Light.Autofill" />
+9 −1
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ import android.graphics.drawable.Drawable;
import android.service.autofill.Dataset;
import android.service.autofill.FillResponse;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.util.PluralsMessageFormatter;
import android.util.Slog;
import android.view.ContextThemeWrapper;
@@ -177,7 +178,14 @@ final class DialogFillUi {
        window.setGravity(Gravity.BOTTOM | Gravity.CENTER);
        window.setCloseOnTouchOutside(true);
        final WindowManager.LayoutParams params = window.getAttributes();
        params.width = WindowManager.LayoutParams.MATCH_PARENT;

        DisplayMetrics displayMetrics = new DisplayMetrics();
        window.getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
        final int screenWidth = displayMetrics.widthPixels;
        final int maxWidth =
                mContext.getResources().getDimensionPixelSize(R.dimen.autofill_dialog_max_width);
        params.width = Math.min(screenWidth, maxWidth);

        params.accessibilityTitle =
                mContext.getString(R.string.autofill_picker_accessibility_title);
        params.windowAnimations = R.style.AutofillSaveAnimation;
Loading