mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 16:26:47 +00:00
Minor fixes to Launcher
- Adding checks to prevent multiple onSetAlpha's to be called (especially now that we are using display lists) - Removing an old change to keep artificially make the last page wider - Fixing issue where you could click on an item in the paged view while the page it was on is being faded out Change-Id: I9b194565602b5200c0688da2caec9c3c829b3bb0
This commit is contained in:
@@ -52,7 +52,7 @@ public class PagedViewIcon extends TextView implements Checkable {
|
||||
private Object mIconCacheKey;
|
||||
private PagedViewIconCache mIconCache;
|
||||
|
||||
private int mAlpha;
|
||||
private int mAlpha = -1;
|
||||
private int mHolographicAlpha;
|
||||
|
||||
private boolean mIsChecked;
|
||||
@@ -162,9 +162,13 @@ public class PagedViewIcon extends TextView implements Checkable {
|
||||
public void setAlpha(float alpha) {
|
||||
final float viewAlpha = sHolographicOutlineHelper.viewAlphaInterpolator(alpha);
|
||||
final float holographicAlpha = sHolographicOutlineHelper.highlightAlphaInterpolator(alpha);
|
||||
mAlpha = (int) (viewAlpha * 255);
|
||||
mHolographicAlpha = (int) (holographicAlpha * 255);
|
||||
super.setAlpha(viewAlpha);
|
||||
int newViewAlpha = (int) (viewAlpha * 255);
|
||||
int newHolographicAlpha = (int) (holographicAlpha * 255);
|
||||
if ((mAlpha != newViewAlpha) || (mHolographicAlpha != newHolographicAlpha)) {
|
||||
mAlpha = newViewAlpha;
|
||||
mHolographicAlpha = newHolographicAlpha;
|
||||
super.setAlpha(viewAlpha);
|
||||
}
|
||||
}
|
||||
|
||||
public void invalidateCheckedImage() {
|
||||
|
||||
Reference in New Issue
Block a user