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

Commit a064b9bb authored by Michael Kwan's avatar Michael Kwan Committed by Android (Google) Code Review
Browse files

Merge "Add offset to round screens when an AlertDialog list item is shown." into cw-f-dev

parents 9fc4906f 44f854ac
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -888,7 +888,8 @@ public class AlertController {
            final int checkedItem = mCheckedItem;
            if (checkedItem > -1) {
                listView.setItemChecked(checkedItem, true);
                listView.setSelection(checkedItem);
                listView.setSelectionFromTop(checkedItem,
                        a.getDimensionPixelSize(R.styleable.AlertDialog_selectionScrollOffset, 0));
            }
        }
    }
+3 −0
Original line number Diff line number Diff line
@@ -22,4 +22,7 @@

    <!-- Gravity that should be used for dialog text styles. Equivalent to: Gravity.CENTER_HORIZONTAL | Gravity.TOP -->
    <integer name="config_dialogTextGravity">0x00000031</integer>

    <!-- The amount to offset when scrolling to a selection in an AlertDialog -->
    <dimen name="config_alertDialogSelectionScrollOffset">@dimen/screen_percentage_15</dimen>
</resources>
+2 −0
Original line number Diff line number Diff line
@@ -2057,6 +2057,8 @@ i
            <!-- Controller for micro specific layout. -->
            <enum name="micro" value="1" />
        </attr>
        <!-- @hide Offset when scrolling to a selection. -->
        <attr name="selectionScrollOffset" format="dimension" />
    </declare-styleable>

    <!-- @hide -->
+3 −0
Original line number Diff line number Diff line
@@ -34,4 +34,7 @@

    <!-- True if preference fragment should clip to padding. -->
    <bool name="config_preferenceFragmentClipToPadding">true</bool>

    <!-- The amount to offset when scrolling to a selection in an AlertDialog -->
    <dimen name="config_alertDialogSelectionScrollOffset">0dp</dimen>
</resources>
+1 −0
Original line number Diff line number Diff line
@@ -1213,6 +1213,7 @@ please see styles_device_defaults.xml.
        <item name="multiChoiceItemLayout">@layout/select_dialog_multichoice_material</item>
        <item name="singleChoiceItemLayout">@layout/select_dialog_singlechoice_material</item>
        <item name="controllerType">@integer/config_alertDialogController</item>
        <item name="selectionScrollOffset">@dimen/config_alertDialogSelectionScrollOffset</item>
    </style>

    <style name="AlertDialog.Material.Light" />