summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJorim Jaggi <jjaggi@google.com>2014-08-25 15:22:41 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-08-25 15:22:43 +0000
commit7af40415dc2aa510bdb483519726aa3ae75bd765 (patch)
treec14353630bbf11f61f7b5da762acd19736ee959f
parent0db4f35e0bbc25ee25ebe2d57174893217248597 (diff)
parenta8c97b3a637c748fbfdbd5fd9a3ba43862c0bb0f (diff)
downloadframeworks_base-7af40415dc2aa510bdb483519726aa3ae75bd765.zip
frameworks_base-7af40415dc2aa510bdb483519726aa3ae75bd765.tar.gz
frameworks_base-7af40415dc2aa510bdb483519726aa3ae75bd765.tar.bz2
Merge "Fix QS header animation for RTL" into lmp-dev
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java23
1 files changed, 19 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java
index 3a110bd..938d888 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java
@@ -545,7 +545,13 @@ public class StatusBarHeaderView extends RelativeLayout implements View.OnClickL
target.avatarScale = mMultiUserAvatar.getScaleX();
target.avatarX = mMultiUserSwitch.getLeft() + mMultiUserAvatar.getLeft();
target.avatarY = mMultiUserSwitch.getTop() + mMultiUserAvatar.getTop();
- target.batteryX = mSystemIconsSuperContainer.getLeft() + mSystemIconsContainer.getRight();
+ if (getLayoutDirection() == LAYOUT_DIRECTION_LTR) {
+ target.batteryX = mSystemIconsSuperContainer.getLeft()
+ + mSystemIconsContainer.getRight();
+ } else {
+ target.batteryX = mSystemIconsSuperContainer.getLeft()
+ + mSystemIconsContainer.getLeft();
+ }
target.batteryY = mSystemIconsSuperContainer.getTop() + mSystemIconsContainer.getTop();
target.batteryLevelAlpha = getAlphaForVisibility(mBatteryLevel);
target.settingsAlpha = getAlphaForVisibility(mSettingsButton);
@@ -582,11 +588,20 @@ public class StatusBarHeaderView extends RelativeLayout implements View.OnClickL
mMultiUserAvatar.setScaleY(values.avatarScale);
mMultiUserAvatar.setX(values.avatarX - mMultiUserSwitch.getLeft());
mMultiUserAvatar.setY(values.avatarY - mMultiUserSwitch.getTop());
- mSystemIconsSuperContainer.setX(values.batteryX - mSystemIconsContainer.getRight());
+ if (getLayoutDirection() == LAYOUT_DIRECTION_LTR) {
+ mSystemIconsSuperContainer.setX(values.batteryX - mSystemIconsContainer.getRight());
+ } else {
+ mSystemIconsSuperContainer.setX(values.batteryX - mSystemIconsContainer.getLeft());
+ }
mSystemIconsSuperContainer.setY(values.batteryY - mSystemIconsContainer.getTop());
if (mSignalCluster != null && mExpanded) {
- mSignalCluster.setX(mSystemIconsSuperContainer.getX()
- - mSignalCluster.getWidth());
+ if (getLayoutDirection() == LAYOUT_DIRECTION_LTR) {
+ mSignalCluster.setX(mSystemIconsSuperContainer.getX()
+ - mSignalCluster.getWidth());
+ } else {
+ mSignalCluster.setX(mSystemIconsSuperContainer.getX()
+ + mSystemIconsSuperContainer.getWidth());
+ }
mSignalCluster.setY(
mSystemIconsSuperContainer.getY() + mSystemIconsSuperContainer.getHeight()/2
- mSignalCluster.getHeight()/2);