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

Commit 570470a3 authored by Adam Powell's avatar Adam Powell
Browse files

Make ActionBar fail more cleanly when invalid heights are set

Also add "none" flag value for null displayOptions in xml

Change-Id: Ided3433638f02ba2a18ce08db265d7a8ac4f216c
parent bec1d13d
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -847,7 +847,7 @@ public class ActionBarView extends AbsActionBarView {


        int contentWidth = MeasureSpec.getSize(widthMeasureSpec);
        int contentWidth = MeasureSpec.getSize(widthMeasureSpec);


        int maxHeight = mContentHeight > 0 ?
        int maxHeight = mContentHeight >= 0 ?
                mContentHeight : MeasureSpec.getSize(heightMeasureSpec);
                mContentHeight : MeasureSpec.getSize(heightMeasureSpec);
        
        
        final int verticalPadding = getPaddingTop() + getPaddingBottom();
        final int verticalPadding = getPaddingTop() + getPaddingBottom();
+1 −0
Original line number Original line Diff line number Diff line
@@ -5502,6 +5502,7 @@
        </attr>
        </attr>
        <!-- Options affecting how the action bar is displayed. -->
        <!-- Options affecting how the action bar is displayed. -->
        <attr name="displayOptions">
        <attr name="displayOptions">
            <flag name="none" value="0" />
            <flag name="useLogo" value="0x1" />
            <flag name="useLogo" value="0x1" />
            <flag name="showHome" value="0x2" />
            <flag name="showHome" value="0x2" />
            <flag name="homeAsUp" value="0x4" />
            <flag name="homeAsUp" value="0x4" />