Merge "Fix bug 3380292 - long title in actionbar context mode pushes buttons over edge" into honeycomb
This commit is contained in:
@@ -278,18 +278,13 @@ public class ActionBarContextView extends ViewGroup implements AnimatorListener
|
||||
availableWidth = measureChildView(mClose, availableWidth, childSpecHeight, 0);
|
||||
}
|
||||
|
||||
if (mTitleLayout != null && mCustomView == null) {
|
||||
availableWidth = measureChildView(mTitleLayout, availableWidth, childSpecHeight, 0);
|
||||
if (mMenuView != null) {
|
||||
availableWidth = measureChildView(mMenuView, availableWidth,
|
||||
childSpecHeight, 0);
|
||||
}
|
||||
|
||||
final int childCount = getChildCount();
|
||||
for (int i = 0; i < childCount; i++) {
|
||||
final View child = getChildAt(i);
|
||||
if (child == mClose || child == mTitleLayout || child == mCustomView) {
|
||||
continue;
|
||||
}
|
||||
|
||||
availableWidth = measureChildView(child, availableWidth, childSpecHeight, 0);
|
||||
if (mTitleLayout != null && mCustomView == null) {
|
||||
availableWidth = measureChildView(mTitleLayout, availableWidth, childSpecHeight, 0);
|
||||
}
|
||||
|
||||
if (mCustomView != null) {
|
||||
|
||||
@@ -18,26 +18,26 @@
|
||||
<item android:id="@+id/copy"
|
||||
android:icon="?android:attr/actionModeCopyDrawable"
|
||||
android:title="@string/copy"
|
||||
android:showAsAction="always|withText"
|
||||
android:showAsAction="ifRoom|withText"
|
||||
/>
|
||||
<item android:id="@+id/share"
|
||||
android:icon="@drawable/ic_menu_share"
|
||||
android:title="@string/share"
|
||||
android:showAsAction="always|withText"
|
||||
android:showAsAction="ifRoom|withText"
|
||||
/>
|
||||
<item android:id="@+id/select_all"
|
||||
android:title="@string/selectAll"
|
||||
android:showAsAction="always|withText"
|
||||
android:showAsAction="ifRoom|withText"
|
||||
/>
|
||||
<item android:id="@+id/find"
|
||||
android:icon="@drawable/ic_menu_find"
|
||||
android:title="@string/find"
|
||||
android:showAsAction="always|withText"
|
||||
android:showAsAction="ifRoom|withText"
|
||||
/>
|
||||
<item android:id="@+id/websearch"
|
||||
android:icon="@drawable/ic_menu_search"
|
||||
android:title="@string/websearch"
|
||||
android:showAsAction="always|withText"
|
||||
android:showAsAction="ifRoom|withText"
|
||||
/>
|
||||
</menu>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user