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