mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 18:06:48 +00:00
Fix: restoring holo outlines in paged views on tablet
Change-Id: Ifb319731f76c8154e2dff5336641862b7427d836
This commit is contained in:
@@ -33,7 +33,6 @@ import android.os.Message;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.KeyEvent;
|
||||
import android.widget.Checkable;
|
||||
import android.widget.TextView;
|
||||
|
||||
|
||||
|
||||
@@ -57,7 +56,6 @@ public class PagedViewIcon extends CachedTextView implements Checkable {
|
||||
private int mAlpha = 255;
|
||||
private int mHolographicAlpha;
|
||||
|
||||
private boolean mHolographicEffectsEnabled;
|
||||
private boolean mIsChecked;
|
||||
private ObjectAnimator mCheckedAlphaAnimator;
|
||||
private float mCheckedAlpha = 1.0f;
|
||||
@@ -133,7 +131,6 @@ public class PagedViewIcon extends CachedTextView implements Checkable {
|
||||
}
|
||||
|
||||
mHolographicOutlineView = new HolographicPagedViewIcon(context, this);
|
||||
mHolographicEffectsEnabled = isHardwareAccelerated();
|
||||
}
|
||||
|
||||
protected HolographicPagedViewIcon getHolographicOutlineView() {
|
||||
@@ -166,7 +163,7 @@ public class PagedViewIcon extends CachedTextView implements Checkable {
|
||||
mIconCache = cache;
|
||||
mIconCacheKey = new PagedViewIconCache.Key(info);
|
||||
mHolographicOutline = mIconCache.getOutline(mIconCacheKey);
|
||||
if (mHolographicEffectsEnabled && !queueHolographicOutlineCreation()) {
|
||||
if (!queueHolographicOutlineCreation()) {
|
||||
getHolographicOutlineView().invalidate();
|
||||
}
|
||||
}
|
||||
@@ -184,7 +181,7 @@ public class PagedViewIcon extends CachedTextView implements Checkable {
|
||||
mIconCache = cache;
|
||||
mIconCacheKey = new PagedViewIconCache.Key(info);
|
||||
mHolographicOutline = mIconCache.getOutline(mIconCacheKey);
|
||||
if (mHolographicEffectsEnabled && !queueHolographicOutlineCreation()) {
|
||||
if (!queueHolographicOutlineCreation()) {
|
||||
getHolographicOutlineView().invalidate();
|
||||
}
|
||||
}
|
||||
@@ -220,7 +217,7 @@ public class PagedViewIcon extends CachedTextView implements Checkable {
|
||||
|
||||
// draw any blended overlays
|
||||
if (mCheckedOutline == null) {
|
||||
if (mHolographicEffectsEnabled && mHolographicOutline != null
|
||||
if (canvas.isHardwareAccelerated() && mHolographicOutline != null
|
||||
&& mHolographicAlpha > 0) {
|
||||
mPaint.setAlpha(mHolographicAlpha);
|
||||
overlay = mHolographicOutline;
|
||||
|
||||
Reference in New Issue
Block a user