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