Customize-Touch-Feedback
2015-03-11 11:41
274 查看
Touch feedback in material design provides an instantaneous visual confirmation at the point of contact when users interact with UI elements. The default touch feedback animations for buttons use the new RippleDrawable class, which transitions between different states with a ripple effect.
In most cases, you should apply this functionality in your view XML by specifying the view background as:
Note: selectableItemBackgroundBorderless is a new attribute introduced in API level 21. Alternatively, you can define a RippleDrawable as an XML resource using the ripple element.
You can assign a color to RippleDrawable objects. To change the default touch feedback color, use the theme’sandroid:colorControlHighlight attribute.
In most cases, you should apply this functionality in your view XML by specifying the view background as:
?android:attr/selectableItemBackgroundfor a bounded ripple
?android:attr/selectableItemBackgroundBorderlessfor a ripple that extends beyond the view
Note: selectableItemBackgroundBorderless is a new attribute introduced in API level 21. Alternatively, you can define a RippleDrawable as an XML resource using the ripple element.
You can assign a color to RippleDrawable objects. To change the default touch feedback color, use the theme’sandroid:colorControlHighlight attribute.
Reference
https://developer.android.com/training/material/animations.html相关文章推荐
- Touch Feedback(触摸反馈):水波纹
- Touch_Feedback
- Android Material Design动画 Touch Feedback | 触摸反馈
- Material Design - Touch feedback , Reveal effect
- Material Design 之 Touch Feedback
- android Lollipop(5.0)--touch feedback(触摸反馈)
- onInterceptTouchEvent和onTouchEvent调用时序
- android 事件处理机制之requestDisallowInterceptTouchEvent
- sencha touch笔记(6)——路由控制(1)
- 关于研究了两天的TransformFeedback的一些东西
- 让UITableView响应touch事件
- 重写 View 的 Touch 方法,实现一个酷炫的九宫格图片
- 苹果 iPod touch 卸载应用
- 将粒子发射器与Transformfeedback相结合
- touch - 修改文件的时间戳记.
- 面试题之touch事件相关问题
- WPF Multi-Touch 开发:基础触屏操作(Raw Touch)
- Android-事件分发(OnTouchEvent,OnTouch,OnClick)
- setOnItemSelectedListener、setOnItemClickListener与setOnTouchlistener的区别
- Kinect V2 + TouchDesigner Test Code Clip