From b0ff6f995553a5deb1f22e43e44715b316d33a88 Mon Sep 17 00:00:00 2001 From: Adam Powell Date: Sun, 23 Jan 2011 18:07:45 -0800 Subject: [PATCH] Fix bug 3380292 - long title in actionbar context mode pushes buttons over edge Also adjust default web text selection menu to allow overflow, preventing items from being cut off in portrait or on smaller screens. Change-Id: I686c9a8daab31a38c2fcb75ee1402f09f568c238 --- .../internal/widget/ActionBarContextView.java | 15 +++++---------- core/res/res/menu/webview_copy.xml | 10 +++++----- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/core/java/com/android/internal/widget/ActionBarContextView.java b/core/java/com/android/internal/widget/ActionBarContextView.java index bb0c752200926..71af115b52e23 100644 --- a/core/java/com/android/internal/widget/ActionBarContextView.java +++ b/core/java/com/android/internal/widget/ActionBarContextView.java @@ -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) { diff --git a/core/res/res/menu/webview_copy.xml b/core/res/res/menu/webview_copy.xml index 41ad06a3f8ade..2761fec1487c0 100644 --- a/core/res/res/menu/webview_copy.xml +++ b/core/res/res/menu/webview_copy.xml @@ -18,26 +18,26 @@