Android 涟漪效果,自定义涟漪效果叠加层
Android ripple effect, customise the ripple effect overlay layer
我想自定义涟漪效果。
我有这个xml
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@android:color/holo_orange_light">
<item>
<color android:color="@color/colorPrimary" />
</item>
</ripple>
全橙色显示完美,但我不知道如何在激活涟漪效果时更改叠加层的颜色。有什么想法吗?
请参考下面link并尝试使用他们的涟漪代码。
https://developer.android.com/reference/android/graphics/drawable/RippleDrawable.html
我想自定义涟漪效果。
我有这个xml
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@android:color/holo_orange_light">
<item>
<color android:color="@color/colorPrimary" />
</item>
</ripple>
全橙色显示完美,但我不知道如何在激活涟漪效果时更改叠加层的颜色。有什么想法吗?
请参考下面link并尝试使用他们的涟漪代码。
https://developer.android.com/reference/android/graphics/drawable/RippleDrawable.html