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

Commit 95c0f924 authored by Adam Powell's avatar Adam Powell Committed by Android (Google) Code Review
Browse files

Merge "Fix bug 4771354 - Phone landscape action bar subtitle slightly cut off on the bottom"

parents 5510a153 c8b0b005
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -50,7 +50,6 @@ import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.view.Window;
import android.view.View.MeasureSpec;
import android.widget.AdapterView;
import android.widget.FrameLayout;
import android.widget.ImageView;
@@ -1162,13 +1161,14 @@ public class ActionBarView extends AbsActionBarView {
        protected void onLayout(boolean changed, int l, int t, int r, int b) {
            final int vCenter = (b - t) / 2;
            int width = r - l;
            int upOffset = 0;
            if (mUpView.getVisibility() != GONE) {
                final LayoutParams upLp = (LayoutParams) mUpView.getLayoutParams();
                final int upHeight = mUpView.getMeasuredHeight();
                final int upWidth = mUpView.getMeasuredWidth();
                final int upTop = t + vCenter - upHeight / 2;
                mUpView.layout(l, upTop, l + upWidth, upTop + upHeight);
                final int upOffset = upLp.leftMargin + upWidth + upLp.rightMargin;
                final int upTop = vCenter - upHeight / 2;
                mUpView.layout(0, upTop, upWidth, upTop + upHeight);
                upOffset = upLp.leftMargin + upWidth + upLp.rightMargin;
                width -= upOffset;
                l += upOffset;
            }
@@ -1176,8 +1176,8 @@ public class ActionBarView extends AbsActionBarView {
            final int iconHeight = mIconView.getMeasuredHeight();
            final int iconWidth = mIconView.getMeasuredWidth();
            final int hCenter = (r - l) / 2;
            final int iconLeft = l + iconLp.leftMargin + hCenter - iconWidth / 2;
            final int iconTop = t + iconLp.topMargin + vCenter - iconHeight / 2;
            final int iconLeft = upOffset + Math.max(iconLp.leftMargin, hCenter - iconWidth / 2);
            final int iconTop = Math.max(iconLp.topMargin, vCenter - iconHeight / 2);
            mIconView.layout(iconLeft, iconTop, iconLeft + iconWidth, iconTop + iconHeight);
        }
    }
+0 −39
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<view xmlns:android="http://schemas.android.com/apk/res/android"
      class="com.android.internal.widget.ActionBarView$HomeView"
      android:layout_width="wrap_content"
      android:layout_height="match_parent"
      android:background="?android:attr/selectableItemBackground" >
    <ImageView android:id="@android:id/up"
               android:src="?android:attr/homeAsUpIndicator"
               android:layout_gravity="center_vertical|left"
               android:visibility="gone"
               android:layout_width="wrap_content"
               android:layout_height="wrap_content"
               android:layout_marginRight="-12dip" />
    <ImageView android:id="@android:id/home"
               android:layout_width="wrap_content"
               android:layout_height="wrap_content"
               android:paddingLeft="16dip"
               android:paddingRight="16dip"
               android:paddingTop="4dip"
               android:paddingBottom="4dip"
               android:adjustViewBounds="true"
               android:layout_gravity="center"
               android:scaleType="fitCenter" />
</view>
+2 −2
Original line number Diff line number Diff line
@@ -30,8 +30,8 @@
               android:layout_width="wrap_content"
               android:layout_height="wrap_content"
               android:layout_marginRight="8dip"
               android:paddingTop="@dimen/action_bar_icon_vertical_padding"
               android:paddingBottom="@dimen/action_bar_icon_vertical_padding"
               android:layout_marginTop="@android:dimen/action_bar_icon_vertical_padding"
               android:layout_marginBottom="@android:dimen/action_bar_icon_vertical_padding"
               android:layout_gravity="center"
               android:adjustViewBounds="true"
               android:scaleType="fitCenter" />
+4 −4
Original line number Diff line number Diff line
@@ -29,10 +29,10 @@
                 android:layout_height="wrap_content"
                 android:layout_gravity="center"
                 android:visibility="gone"
                 android:paddingTop="@dimen/action_bar_icon_vertical_padding"
                 android:paddingBottom="@dimen/action_bar_icon_vertical_padding"
                 android:paddingLeft="4dip"
                 android:paddingRight="4dip"
                 android:layout_marginTop="4dip"
                 android:layout_marginBottom="4dip"
                 android:layout_marginLeft="4dip"
                 android:layout_marginRight="4dip"
                 android:scaleType="fitCenter"
                 android:adjustViewBounds="true"
                 android:background="@null"
+4 −0
Original line number Diff line number Diff line
@@ -33,6 +33,10 @@
    <dimen name="action_bar_default_height">40dip</dimen>
    <!-- Vertical padding around action bar icons. -->
    <dimen name="action_bar_icon_vertical_padding">4dip</dimen>
    <!-- Text size for action bar titles -->
    <dimen name="action_bar_title_text_size">16dp</dimen>
    <!-- Text size for action bar subtitles -->
    <dimen name="action_bar_subtitle_text_size">12dp</dimen>

    <!-- Size of clock font in LockScreen on Unsecure unlock screen. -->
    <dimen name="keyguard_lockscreen_clock_font_size">80sp</dimen>
Loading