android - How to achieve ripple animation using support library? -
I am trying to add a wave animation to the click button. I was like below but it requires minSdKVersion 21.
ripple.xml
& lt; Wave xmlns: android = "http://schemas.android.com/apk/Native/Android" Android: Color = "? Android: colorControlHighlight" & gt; & Lt; Items & gt; & Lt; Size Android: shape = "rectangle" & gt; & Lt; Solid Android: Color = "Android: Color Score" /> & Lt; / Size & gt; & Lt; / Item & gt; & Lt; / Wave & gt;
button
& lt; Com.devspark.robototextview.widget.RobotoButtonAndroid: id = "@ + id / loginButton" Android: layout_width = "match_parent" Android: layout_height = "wrap_content" Android: background = "@drawable / rip" Android: text = "@ String / login_button "/>
I want to make it backward backward compatible with the design library.
How can this be done?
original waveform setup
- < P> The inherent wave in the scene.
-
Ripples that extend beyond the bounds of the scenes:
Android: background = "selectablebestgroundbroadgroundborderless"
In Java code,
? (Attr)
for xml references.
Support Wave with picture / background There is no clear way to do this sincerely, though Nick Butcher posted the topic of wave with ? Android: attr > instead of
(or ? Attr: Returns
by using
?
shorthand), so the API is available back to 7.
View
with a framelayout
set with a wave setpref ()
or setBackground ()
. ImageView
s.
Comments
Post a Comment