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

Commit 51f646b1 authored by Danny Epstein's avatar Danny Epstein
Browse files

Reduce the top padding when message isn't at top.

If either the page number or an icon is shown above the message,
reduce the top padding on round screens.

Bug: 24961379
Change-Id: Iec9193e3bbdd8ac607743cd0010f2331edbebc81
parent dc40bd77
Loading
Loading
Loading
Loading
+20 −13
Original line number Diff line number Diff line
@@ -33,11 +33,17 @@
                android:layout_height="wrap_content"
                android:paddingTop="@dimen/conf_diag_content_padding_top">

            <LinearLayout
                    android:orientation="vertical"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:minHeight="@dimen/conf_diag_min_space_above_message"
                    android:gravity="bottom">
                <TextView
                        android:id="@+id/current_page_text"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                    android:layout_gravity="center"
                        android:layout_gravity="center_horizontal"
                        android:layout_marginTop="@dimen/grant_permissions_app_breadcrumb_margin_top"
                        android:textAppearance="@style/GrantPermissions.BreadcrumbText" />

@@ -46,8 +52,9 @@
                        android:layout_width="@dimen/grant_permissions_app_icon_size"
                        android:layout_height="@dimen/grant_permissions_app_icon_size"
                        android:tint="@color/grant_permissions_app_color"
                    android:layout_gravity="center"
                        android:layout_gravity="center_horizontal"
                        android:layout_marginTop="@dimen/grant_permissions_app_icon_margin_top"/>
            </LinearLayout>

            <TextView
                    android:id="@+id/message"
+3 −1
Original line number Diff line number Diff line
@@ -19,6 +19,8 @@
    <dimen name="conf_diag_button_container_height">96dp</dimen>
    <dimen name="conf_diag_2button_margin_side">32dp</dimen>
    <dimen name="conf_diag_2button_margin_top">10dp</dimen>
    <dimen name="conf_diag_content_padding_top">32dp</dimen>
    <!-- On round screens, the message can't be too close to the top or the corners will be
         clipped. -->
    <dimen name="conf_diag_min_space_above_message">26dp</dimen>

</resources>
+2 −0
Original line number Diff line number Diff line
@@ -33,6 +33,8 @@
    <dimen name="conf_diag_3button_padding_side">32dp</dimen>
    <dimen name="conf_diag_3button_padding_bottom">22dp</dimen>
    <dimen name="conf_diag_content_padding_top">6dp</dimen>
    <!-- On square screens, the message can be at the top of the screen. -->
    <dimen name="conf_diag_min_space_above_message">0dp</dimen>


    <!-- START: Ported values -->
+2 −1
Original line number Diff line number Diff line
@@ -189,7 +189,8 @@ public abstract class ConfirmationViewHandler implements
        // In order to fake the buttons peeking at the bottom, need to do set the
        // padding properly.
        if (mContent.getPaddingBottom() != mButtonBarContainer.getHeight()) {
            mContent.setPadding(0, mContent.getPaddingTop(), 0, mButtonBarContainer.getHeight());
            mContent.setPadding(mContent.getPaddingLeft(), mContent.getPaddingTop(),
                    mContent.getPaddingRight(), mButtonBarContainer.getHeight());
            if (Log.isLoggable(TAG, Log.DEBUG)) {
                Log.d(TAG, "    set mContent.PaddingBottom: " + mButtonBarContainer.getHeight());
            }