Merge "Simplify code for All Apps touch feedback"
This commit is contained in:
committed by
Android (Google) Code Review
commit
dcb4eddebe
@@ -50,15 +50,7 @@ public class PagedViewIcon extends TextView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void drawableStateChanged() {
|
protected void drawableStateChanged() {
|
||||||
if (isPressed()) {
|
setAlpha(isPressed() ? 0.5f : 1f);
|
||||||
if (getAlpha() != 0.5f) {
|
|
||||||
setAlpha(0.5f);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (getAlpha() != 1f) {
|
|
||||||
setAlpha(1f);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
super.drawableStateChanged();
|
super.drawableStateChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user