summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2013-06-16 15:36:36 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-06-16 15:36:37 +0000
commit72b29c3abb3ef9771bf8d5871fa2d9093e9896ef (patch)
treefb0f548f4525cd549ca3dfe3de5156f4cd2782e1 /packages
parentafea5dfb6d59d8377bdffbdc83803ca0b14f6b1d (diff)
parent743356ad1a43af85bddddfcc58171b99541c4c28 (diff)
downloadframeworks_base-72b29c3abb3ef9771bf8d5871fa2d9093e9896ef.zip
frameworks_base-72b29c3abb3ef9771bf8d5871fa2d9093e9896ef.tar.gz
frameworks_base-72b29c3abb3ef9771bf8d5871fa2d9093e9896ef.tar.bz2
Merge "More hideytoast stabilization."
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index 4b30c86..d86760f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -1964,12 +1964,20 @@ public class PhoneStatusBar extends BaseStatusBar {
mHideybarConfirmation = Toast.makeBar(mContext, msg, Toast.LENGTH_INFINITE)
.setAction(com.android.internal.R.string.ok, mHideybarConfirmationAction);
View v = mHideybarConfirmation.getView();
+ v.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
boolean isGloballyConfirmed = Prefs.read(mContext)
.getBoolean(Prefs.HIDEYBAR_CONFIRMED, false);
if (isGloballyConfirmed) {
// dismiss on outside touch if globally confirmed
v.setOnTouchListener(mDismissHideybarConfirmationOnTouchOutside);
}
+ // position at the bottom like normal toasts, but use top gravity
+ // to avoid jumping around when showing/hiding the nav bar
+ v.measure(MeasureSpec.UNSPECIFIED, MeasureSpec.UNSPECIFIED);
+ int offsetY = mContext.getResources().getDimensionPixelSize(
+ com.android.internal.R.dimen.toast_y_offset);
+ mHideybarConfirmation.setGravity(Gravity.TOP,
+ 0, mCurrentDisplaySize.y - v.getMeasuredHeight() / 2 - offsetY);
// show the confirmation
mHideybarConfirmation.show();
} else if (!visible) {