Merge "Sets icon invisible when alpha 0 (Cannot be tapped while TaskView modal)" into ub-launcher3-rvc-dev

This commit is contained in:
TreeHugger Robot
2020-05-01 20:27:40 +00:00
committed by Android (Google) Code Review
@@ -21,12 +21,12 @@ import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.View;
import androidx.annotation.NonNull;
import com.android.launcher3.FastBitmapDrawable;
import java.util.ArrayList;
import androidx.annotation.NonNull;
/**
* A view which draws a drawable stretched to fit its size. Unlike ImageView, it avoids relayout
* when the drawable changes.
@@ -130,4 +130,14 @@ public class IconView extends View {
mScaleListeners.remove(listener);
}
}
@Override
public void setAlpha(float alpha) {
super.setAlpha(alpha);
if (alpha > 0) {
setVisibility(VISIBLE);
} else {
setVisibility(INVISIBLE);
}
}
}