Merge "Fixed a flickering of the icon when it goes into the shelf" into pi-dev
am: 40e41a6299
Change-Id: I37585d06d53e6213f163a38592605c855b551539
This commit is contained in:
@@ -197,6 +197,7 @@ public class StatusBarIconView extends AnimatedImageView implements StatusIconDi
|
||||
mDarkAmount);
|
||||
final int outerBounds = mStatusBarIconSize;
|
||||
mIconScale = (float)imageBounds / (float)outerBounds;
|
||||
updatePivot();
|
||||
}
|
||||
|
||||
private void updateIconScaleForSystemIcons() {
|
||||
@@ -859,6 +860,12 @@ public class StatusBarIconView extends AnimatedImageView implements StatusIconDi
|
||||
mLayoutRunnable.run();
|
||||
mLayoutRunnable = null;
|
||||
}
|
||||
updatePivot();
|
||||
}
|
||||
|
||||
private void updatePivot() {
|
||||
setPivotX((1 - mIconScale) / 2.0f * getWidth());
|
||||
setPivotY((getHeight() - mIconScale * getWidth()) / 2.0f);
|
||||
}
|
||||
|
||||
public void executeOnLayout(Runnable runnable) {
|
||||
|
||||
Reference in New Issue
Block a user