Merge "Sets icon invisible when alpha 0 (Cannot be tapped while TaskView modal)" into ub-launcher3-rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
c6d8838c33
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user