android - How to achieve ripple animation using support library? -
hi trying add together ripple animation on button click. did below requires minsdkversion 21.
ripple.xml
<ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="?android:colorcontrolhighlight"> <item> <shape android:shape="rectangle"> <solid android:color="?android:coloraccent" /> </shape> </item> </ripple>
button
<com.devspark.robototextview.widget.robotobutton android:id="@+id/loginbutton" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/ripple" android:text="@string/login_button" />
i want create backward compatible design library.
any thought how can done?
i formerly voted close question off-topic changed mind quite nice visual effect which, unfortunately, not yet part of back upwards library. show in future update, there's no time frame announced.
luckily there few custom implementations available:
https://github.com/traex/rippleeffect https://github.com/balysv/material-ripple https://github.com/siriscac/rippleview https://github.com/ozodrukh/rippledrawableincluding materlial themed widget sets compatible older versions of android:
https://github.com/keithellis/materialwidgetso can seek 1 of these or google other "material widgets" or so...
android material-design
No comments:
Post a Comment