diff options
author | Michael Kolb <kolby@google.com> | 2011-11-23 08:41:31 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-11-23 08:41:31 -0800 |
commit | 63faec479010e77762d5ffa517fdc65f3474383c (patch) | |
tree | 353207ddbd6a9e60e2061ea384bb04c05807c8ac | |
parent | 78ea2875af7145f7a9c167e09b294b7a38acefb5 (diff) | |
parent | 59b4ff383c69b9c301df81d97e36951e3e5aa863 (diff) | |
download | packages_apps_browser-63faec479010e77762d5ffa517fdc65f3474383c.zip packages_apps_browser-63faec479010e77762d5ffa517fdc65f3474383c.tar.gz packages_apps_browser-63faec479010e77762d5ffa517fdc65f3474383c.tar.bz2 |
Merge "Add more options to Quick Controls on phone" into ics-mr1
-rw-r--r-- | res/values/dimensions.xml | 2 | ||||
-rw-r--r-- | src/com/android/browser/PieControlPhone.java | 14 |
2 files changed, 14 insertions, 2 deletions
diff --git a/res/values/dimensions.xml b/res/values/dimensions.xml index 8844f6b..d6ae6ba 100644 --- a/res/values/dimensions.xml +++ b/res/values/dimensions.xml @@ -27,7 +27,7 @@ <dimen name="widgetItemMinHeight">48dip</dimen> <dimen name="favicon_size">16dip</dimen> <dimen name="favicon_padded_size">20dip</dimen> - <dimen name="qc_radius_start">45dip</dimen> + <dimen name="qc_radius_start">60dip</dimen> <dimen name="qc_radius_increment">70dip</dimen> <dimen name="qc_slop">10dip</dimen> <dimen name="qc_touch_offset">15dip</dimen> diff --git a/src/com/android/browser/PieControlPhone.java b/src/com/android/browser/PieControlPhone.java index f12c49a..2b6a3c5 100644 --- a/src/com/android/browser/PieControlPhone.java +++ b/src/com/android/browser/PieControlPhone.java @@ -24,6 +24,7 @@ import android.view.View.OnClickListener; import android.widget.PopupMenu; import android.widget.PopupMenu.OnMenuItemClickListener; +import com.android.browser.UI.ComboViews; import com.android.browser.view.PieItem; import com.android.browser.view.PieMenu.PieView.OnLayoutListener; import com.android.browser.view.PieStackView; @@ -40,6 +41,8 @@ public class PieControlPhone extends PieControlBase implements OnClickListener, private PieItem mUrl; private PieItem mShowTabs; private PieItem mOptions; + private PieItem mNewTab; + private PieItem mBookmarks; private TabAdapter mTabAdapter; private PopupMenu mPopup; @@ -67,10 +70,14 @@ public class PieControlPhone extends PieControlBase implements OnClickListener, 1); // level 1 + mNewTab = makeItem(R.drawable.ic_new_window_holo_dark, 1); + mBookmarks = makeItem(R.drawable.ic_bookmarks_holo_dark, 1); + mPie.addItem(mNewTab); mPie.addItem(mShowTabs); mPie.addItem(mUrl); + mPie.addItem(mBookmarks); mPie.addItem(mOptions); - setClickListener(this, mUrl, mShowTabs, mOptions); + setClickListener(this, mUrl, mShowTabs, mOptions, mNewTab, mBookmarks); mPopup = new PopupMenu(mActivity, mUi.getTitleBar()); Menu menu = mPopup.getMenu(); mPopup.getMenuInflater().inflate(R.menu.browser, menu); @@ -105,6 +112,11 @@ public class PieControlPhone extends PieControlBase implements OnClickListener, mUi.showNavScreen(); } else if (mOptions.getView() == v) { showMenu(); + } else if (mNewTab.getView() == v) { + mUiController.openTabToHomePage(); + mUi.editUrl(false); + } else if (mBookmarks.getView() == v) { + mUiController.bookmarksOrHistoryPicker(ComboViews.Bookmarks); } } |