diff options
author | Adam Powell <adamp@google.com> | 2012-08-06 17:00:17 -0700 |
---|---|---|
committer | Adam Powell <adamp@google.com> | 2012-08-06 17:00:17 -0700 |
commit | 570470a332a824a66c74a1d6bd8ce0253ccb5050 (patch) | |
tree | eaa3fd172bbb9d142a64b75ab38cd5f0c73fc020 /core | |
parent | bec1d13da2ef3c8c2c4cc4f740474d095068bd8b (diff) | |
download | frameworks_base-570470a332a824a66c74a1d6bd8ce0253ccb5050.zip frameworks_base-570470a332a824a66c74a1d6bd8ce0253ccb5050.tar.gz frameworks_base-570470a332a824a66c74a1d6bd8ce0253ccb5050.tar.bz2 |
Make ActionBar fail more cleanly when invalid heights are set
Also add "none" flag value for null displayOptions in xml
Change-Id: Ided3433638f02ba2a18ce08db265d7a8ac4f216c
Diffstat (limited to 'core')
-rw-r--r-- | core/java/com/android/internal/widget/ActionBarView.java | 2 | ||||
-rwxr-xr-x | core/res/res/values/attrs.xml | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/core/java/com/android/internal/widget/ActionBarView.java b/core/java/com/android/internal/widget/ActionBarView.java index 8ff39d6..d85e816 100644 --- a/core/java/com/android/internal/widget/ActionBarView.java +++ b/core/java/com/android/internal/widget/ActionBarView.java @@ -847,7 +847,7 @@ public class ActionBarView extends AbsActionBarView { int contentWidth = MeasureSpec.getSize(widthMeasureSpec); - int maxHeight = mContentHeight > 0 ? + int maxHeight = mContentHeight >= 0 ? mContentHeight : MeasureSpec.getSize(heightMeasureSpec); final int verticalPadding = getPaddingTop() + getPaddingBottom(); diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml index 6386bcb..5d8d397 100755 --- a/core/res/res/values/attrs.xml +++ b/core/res/res/values/attrs.xml @@ -5502,6 +5502,7 @@ </attr> <!-- Options affecting how the action bar is displayed. --> <attr name="displayOptions"> + <flag name="none" value="0" /> <flag name="useLogo" value="0x1" /> <flag name="showHome" value="0x2" /> <flag name="homeAsUp" value="0x4" /> |