本文主要是介绍Ripple波纹效果的使用,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
Android5.0以后的新增的Ripple(波纹效果):
1.ripple_effect.xml
<?xml version="1.0" encoding="utf-8"?> <ripple xmlns:android="http://schemas.android.com/apk/res/android"android:color="#FF0000" ></ripple>
使用方式:
android:background="@drawable/ripple_effect"
2.直接在控件使用的地方添加属性:
android:background="?android:attr/selectableItemBackground"
这篇关于Ripple波纹效果的使用的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!