涟漪效应持续时间在Android的XML [英] Ripple Effect Duration in Android XML
问题描述
我学习材料设计。我试着按钮连锁反应使用此gradle这个
{相关性
编译com.github.traex.rippleeffect:库:1.3'
}
此 https://github.com/traex/RippleEffect 链接
有很多的属性,它不工作
如
应用:rv_rippleDuration =1200
应用:rv_color =#d3d3d3
我有按钮和连锁反应事件,但是当我点击按钮方法被调用。我要的是第一个连锁反应应该得到完整的话应该发生的动作。
XML code
块引用>< LinearLayout中的xmlns:机器人=http://schemas.android.com/apk/res/android
的xmlns:程序=http://schemas.android.com/tools
机器人:layout_width =match_parent
机器人:layout_height =WRAP_CONTENT
机器人:方向=垂直
机器人:layout_marginLeft =10dp
机器人:layout_marginRight =10dp> < com.andexert.library.RippleView
机器人:ID =@ + ID / ripple1
机器人:layout_width =match_parent
机器人:layout_height =match_parent
rv_centered =真
应用:rv_rippleDuration =1800
应用:rv_color =#000000> <按钮
机器人:layout_width =match_parent
机器人:layout_height =WRAP_CONTENT
机器人:文字=新按钮
机器人:ID =@ + ID / fromDateButton/> < /com.andexert.library.RippleView> < / LinearLayout中>用户无法体验动画。
解决方案您需要添加
的xmlns:程序=http://schemas.android.com/apk/res-auto
为的xmlns
在RippleView使用应用程序资源之前。I am Learning Material Design. I tried ripple effect on button using this gradle
dependencies { compile 'com.github.traex.rippleeffect:library:1.3' }
from this https://github.com/traex/RippleEffect link
there are many attribute which are not working such as
app:rv_rippleDuration="1200" app:rv_color="#d3d3d3"
I have event on button and ripple effect but when I click on button method is get called. What I want is first ripple effect should get complete then action should occur.
XML code
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:layout_marginLeft="10dp" android:layout_marginRight="10dp"> <com.andexert.library.RippleView android:id="@+id/ripple1" android:layout_width="match_parent" android:layout_height="match_parent" rv_centered="true" app:rv_rippleDuration="1800" app:rv_color="#000000"> <Button android:layout_width="match_parent" android:layout_height="wrap_content" android:text="New Button" android:id="@+id/fromDateButton" /> </com.andexert.library.RippleView> </LinearLayout>
user cannot experience animation.
解决方案You need to add
xmlns:app="http://schemas.android.com/apk/res-auto"
as anxmlns
in your RippleView before using the app resource.这篇关于涟漪效应持续时间在Android的XML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!