diff options
author | John Reck <jreck@google.com> | 2011-05-17 14:16:38 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2011-05-17 14:18:24 -0700 |
commit | 9fdd981a245b59952338374ba6a264742498fc4c (patch) | |
tree | 031a44ca560b7d1b0cedb522d1bf6e929661abbe | |
parent | 275932ff17bcb44712ef07a1e143c3f3b0d8df8a (diff) | |
download | packages_apps_browser-9fdd981a245b59952338374ba6a264742498fc4c.zip packages_apps_browser-9fdd981a245b59952338374ba6a264742498fc4c.tar.gz packages_apps_browser-9fdd981a245b59952338374ba6a264742498fc4c.tar.bz2 |
Bookmark action bar fix
Bug: 4425113
When the screen is less than 720dp wide (so 7" portrait)
show only a star to add a bookmark instead of the star with
text.
Change-Id: Ie5c48e71f41458c466047ca23bf5d2f64a50f93d
-rw-r--r-- | res/menu-w720dp/bookmark.xml | 37 | ||||
-rw-r--r-- | res/menu/bookmark.xml | 2 | ||||
-rw-r--r-- | src/com/android/browser/BrowserBookmarksPage.java | 1 |
3 files changed, 39 insertions, 1 deletions
diff --git a/res/menu-w720dp/bookmark.xml b/res/menu-w720dp/bookmark.xml new file mode 100644 index 0000000..0adadac --- /dev/null +++ b/res/menu-w720dp/bookmark.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2011 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<menu xmlns:android="http://schemas.android.com/apk/res/android"> + <item + android:id="@+id/add_bookmark" + android:icon="@drawable/ic_bookmark_off_holo_dark" + android:title="@string/add_new_bookmark" + android:showAsAction="always|withText" /> + <item + android:id="@+id/go_home" + android:icon="@drawable/ic_home_holo_dark" + android:showAsAction="always" /> + <item + android:id="@+id/thumbnail_view" + android:title="@string/bookmark_thumbnail_view"/> + <item + android:id="@+id/list_view" + android:title="@string/bookmark_list_view"/> + <item + android:id="@+id/preferences_menu_id" + android:title="@string/menu_preferences" + android:alphabeticShortcut="p" /> +</menu> diff --git a/res/menu/bookmark.xml b/res/menu/bookmark.xml index b761779..3305c70 100644 --- a/res/menu/bookmark.xml +++ b/res/menu/bookmark.xml @@ -19,7 +19,7 @@ android:id="@+id/add_bookmark" android:icon="@drawable/ic_bookmark_off_holo_dark" android:title="@string/add_new_bookmark" - android:showAsAction="always|withText" /> + android:showAsAction="always" /> <item android:id="@+id/go_home" android:icon="@drawable/ic_home_holo_dark" diff --git a/src/com/android/browser/BrowserBookmarksPage.java b/src/com/android/browser/BrowserBookmarksPage.java index a3cb9fc..c6bc2bc 100644 --- a/src/com/android/browser/BrowserBookmarksPage.java +++ b/src/com/android/browser/BrowserBookmarksPage.java @@ -567,6 +567,7 @@ public class BrowserBookmarksPage extends Fragment implements View.OnCreateConte int paddingTop = (int) res.getDimension(R.dimen.combo_paddingTop); mRoot.setPadding(paddingLeftRight, paddingTop, paddingLeftRight, 0); + getActivity().invalidateOptionsMenu(); } @Override |