Remove caret in overview mode
Bug: 30162951 Change-Id: I71f585e4ae6dfba9dc1d18cd00e45d081cabd4b3
This commit is contained in:
@@ -1529,9 +1529,11 @@ public class Workspace extends PagedView
|
||||
|
||||
private void setHotseatAlphaAtIndex(float alpha, int index) {
|
||||
mHotseatAlpha[index] = alpha;
|
||||
float finalAlpha = mHotseatAlpha[0] * mHotseatAlpha[1] * mHotseatAlpha[2];
|
||||
final float hotseatAlpha = mHotseatAlpha[0] * mHotseatAlpha[1] * mHotseatAlpha[2];
|
||||
final float pageIndicatorAlpha = mHotseatAlpha[0] * mHotseatAlpha[2];
|
||||
|
||||
mLauncher.getHotseat().setAlpha(finalAlpha);
|
||||
mLauncher.getHotseat().setAlpha(hotseatAlpha);
|
||||
mPageIndicator.setAlpha(pageIndicatorAlpha);
|
||||
}
|
||||
|
||||
public ValueAnimator createHotseatAlphaAnimator(float finalValue) {
|
||||
|
||||
@@ -5,7 +5,6 @@ import android.animation.AnimatorListenerAdapter;
|
||||
import android.animation.AnimatorSet;
|
||||
import android.animation.ArgbEvaluator;
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.graphics.Color;
|
||||
import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
|
||||
@@ -53,6 +53,10 @@ public class CaretDrawable extends Drawable {
|
||||
|
||||
@Override
|
||||
public void draw(Canvas canvas) {
|
||||
if (Float.compare(mPaint.getAlpha(), 0f) == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
final float width = getBounds().width();
|
||||
final float height = getBounds().height();
|
||||
final float left = getBounds().left;
|
||||
@@ -78,12 +82,13 @@ public class CaretDrawable extends Drawable {
|
||||
|
||||
@Override
|
||||
public int getOpacity() {
|
||||
return PixelFormat.OPAQUE;
|
||||
return PixelFormat.TRANSLUCENT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAlpha(int alpha) {
|
||||
// no-op
|
||||
mPaint.setAlpha(alpha);
|
||||
invalidateSelf();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user