diff options
author | John Reck <jreck@google.com> | 2018-01-19 13:51:24 -0800 |
---|---|---|
committer | John Reck <jreck@google.com> | 2018-01-19 13:51:24 -0800 |
commit | 1954cf52fa5d7af120a36cd66eb56280aac0194d (patch) | |
tree | 9a89104baf18858629e34bbb14daaaa71cfe45d1 /tools/aapt2/java/JavaClassGenerator_test.cpp | |
parent | 2baa9ab4be183ac1e432f08e8b5549d0bfa180c2 (diff) |
Limit ripple alpha to 50%
Many themes appear to have forgotten to set
the alphas value on the color state list they
pass to RippleDrawable. The previous implementation
always divided the alpha by 2 which resulted in
the accidentally opaque color being 50% opacity instead.
To match that behavior without adding back the
unusual divide by 2 we simply cap the alpha to 128.
Similarly we surpress the hover & focus events if
a press is already in progress, which prevents a funky
background flicker on views with FOCUSABLE_AUTO that
gain focus part way through a click event.
Also fixes a bug where rapid tapping resulted in the
hardware animation appearing to not play as it had
a start value of 0 instead of paint.getAlpha()
Software animation already has this correct behavior,
so no changes needed for the fallback path.
Bug: 72173993
Test: tested hangouts, pin entry
Change-Id: I7110779234422e82cdd5d737aa00c1280b13760c
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions