diff options
author | Michael Kolb <kolby@google.com> | 2011-09-27 13:37:28 -0700 |
---|---|---|
committer | Michael Kolb <kolby@google.com> | 2011-10-04 11:17:30 -0700 |
commit | 716773853705e67fe5d5afbf9c3b917ff8a5e298 (patch) | |
tree | f5d9d060a055d2ad231026dc19cd4ba1d2d63a80 /src/com/android/browser/view | |
parent | 81260dfcd9150173416598bdd3d44190a00e6c95 (diff) | |
download | packages_apps_Browser-716773853705e67fe5d5afbf9c3b917ff8a5e298.zip packages_apps_Browser-716773853705e67fe5d5afbf9c3b917ff8a5e298.tar.gz packages_apps_Browser-716773853705e67fe5d5afbf9c3b917ff8a5e298.tar.bz2 |
Fix QuickControls
Bug: 5115647
Removed back from QC options
Added menu to QC options
Removed background on phone
Changed colors to match ICS scheme
Change-Id: I32c8cc0c4714e50e9eca28e6aa069be8d0fe9da8
Diffstat (limited to 'src/com/android/browser/view')
-rw-r--r-- | src/com/android/browser/view/PieMenu.java | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/src/com/android/browser/view/PieMenu.java b/src/com/android/browser/view/PieMenu.java index 99750f9..536ac92 100644 --- a/src/com/android/browser/view/PieMenu.java +++ b/src/com/android/browser/view/PieMenu.java @@ -89,6 +89,8 @@ public class PieMenu extends FrameLayout { // touch handling PieItem mCurrentItem; + private boolean mUseBackground; + /** * @param context * @param attrs @@ -142,6 +144,10 @@ public class PieMenu extends FrameLayout { mController = ctl; } + public void setUseBackground(boolean useBackground) { + mUseBackground = useBackground; + } + public void addItem(PieItem item) { // add the item to the pie itself mItems.add(item); @@ -245,18 +251,20 @@ public class PieMenu extends FrameLayout { @Override protected void onDraw(Canvas canvas) { if (mOpen) { - int w = mBackground.getIntrinsicWidth(); - int h = mBackground.getIntrinsicHeight(); - int left = mCenter.x - w; - int top = mCenter.y - h / 2; - mBackground.setBounds(left, top, left + w, top + h); int state; - state = canvas.save(); - if (onTheLeft()) { - canvas.scale(-1, 1); + if (mUseBackground) { + int w = mBackground.getIntrinsicWidth(); + int h = mBackground.getIntrinsicHeight(); + int left = mCenter.x - w; + int top = mCenter.y - h / 2; + mBackground.setBounds(left, top, left + w, top + h); + state = canvas.save(); + if (onTheLeft()) { + canvas.scale(-1, 1); + } + mBackground.draw(canvas); + canvas.restoreToCount(state); } - mBackground.draw(canvas); - canvas.restoreToCount(state); for (PieItem item : mItems) { Paint p = item.isSelected() ? mSelectedPaint : mNormalPaint; state = canvas.save(); |