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

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

Merge "Fix bug 5049406 - ActionBar UP with no home icon, tap highlight looks broken"

parents 116f7ee2 9e58df5d
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -695,7 +695,8 @@ public class ActionBarView extends AbsActionBarView {
    private void initTitle() {
        if (mTitleLayout == null) {
            LayoutInflater inflater = LayoutInflater.from(getContext());
            mTitleLayout = (LinearLayout) inflater.inflate(R.layout.action_bar_title_item, null);
            mTitleLayout = (LinearLayout) inflater.inflate(R.layout.action_bar_title_item,
                    this, false);
            mTitleView = (TextView) mTitleLayout.findViewById(R.id.action_bar_title);
            mSubtitleView = (TextView) mTitleLayout.findViewById(R.id.action_bar_subtitle);
            mTitleUpView = (View) mTitleLayout.findViewById(R.id.up);
@@ -724,8 +725,7 @@ public class ActionBarView extends AbsActionBarView {
            mTitleLayout.setEnabled(titleUp);
        }

        addView(mTitleLayout, new LayoutParams(LayoutParams.WRAP_CONTENT,
                LayoutParams.MATCH_PARENT));
        addView(mTitleLayout);
        if (mExpandedActionView != null) {
            // Don't show while in expanded mode
            mTitleLayout.setVisibility(GONE);
@@ -820,7 +820,8 @@ public class ActionBarView extends AbsActionBarView {
            boolean showTitle = mTitleLayout != null && mTitleLayout.getVisibility() != GONE &&
                    (mDisplayOptions & ActionBar.DISPLAY_SHOW_TITLE) != 0;
            if (showTitle) {
                availableWidth = measureChildView(mTitleLayout, availableWidth, childSpecHeight, 0);
                availableWidth = measureChildView(mTitleLayout, availableWidth,
                        MeasureSpec.makeMeasureSpec(mContentHeight, MeasureSpec.EXACTLY), 0);
                leftOfCenter = Math.max(0, leftOfCenter - mTitleLayout.getMeasuredWidth());
            }

+2 −2
Original line number Diff line number Diff line
@@ -16,10 +16,10 @@

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_height="match_parent"
              android:orientation="horizontal"
              android:paddingRight="16dip"
              android:background="?android:attr/selectableItemBackground"
              android:background="?android:attr/actionBarItemBackground"
              android:enabled="false">

    <ImageView android:id="@android:id/up"