diff options
author | Michael Kolb <kolby@google.com> | 2011-07-20 13:52:25 -0700 |
---|---|---|
committer | Michael Kolb <kolby@google.com> | 2011-07-20 13:52:29 -0700 |
commit | 3ca12750f9b6231b00a1856dcb25c2d2e07e8784 (patch) | |
tree | 155cd2b6c7fa60385863427147a1e9a7d6472cb4 /src/com/android/browser/NavScreen.java | |
parent | 3b02d34b1f3c6c1629f23b9ffcb372fbf2f1d880 (diff) | |
download | packages_apps_Browser-3ca12750f9b6231b00a1856dcb25c2d2e07e8784.zip packages_apps_Browser-3ca12750f9b6231b00a1856dcb25c2d2e07e8784.tar.gz packages_apps_Browser-3ca12750f9b6231b00a1856dcb25c2d2e07e8784.tar.bz2 |
use system menu
On phones with hardware menu key, use the framework's
menu
Also fixes:
Bug: 5051899
remove overflow button from bar if menu key is present
Nav options are not visible on tab switcher
Change-Id: I5b55934a392a76f9d9ef16e3bf5c71f27b88d69a
Diffstat (limited to 'src/com/android/browser/NavScreen.java')
-rw-r--r-- | src/com/android/browser/NavScreen.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/browser/NavScreen.java b/src/com/android/browser/NavScreen.java index 23317b5..ee20535 100644 --- a/src/com/android/browser/NavScreen.java +++ b/src/com/android/browser/NavScreen.java @@ -23,6 +23,7 @@ import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; import android.view.View; +import android.view.ViewConfiguration; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.webkit.WebView; @@ -59,6 +60,7 @@ public class NavScreen extends RelativeLayout NavTabGallery mScroller; TabAdapter mAdapter; int mOrientation; + boolean mNeedsMenu; public NavScreen(Activity activity, UiController ctl, PhoneUi ui) { super(activity); @@ -122,6 +124,10 @@ public class NavScreen extends RelativeLayout ? LinearLayout.HORIZONTAL : LinearLayout.VERTICAL); // update state for active tab mScroller.setSelection(mUiController.getTabControl().getTabPosition(mUi.getActiveTab())); + mNeedsMenu = !ViewConfiguration.get(getContext()).hasPermanentMenuKey(); + if (!mNeedsMenu) { + mMore.setVisibility(View.GONE); + } } @Override |