ITeye博客

android和ios button点击变暗效果

xushans · 2015-03-24 20:35 · ios · android · 移动开发 · iOS · Android · Markdown

button点击时,需要变暗效果。

ios: 只需要check该元素的highlighted adjusts image的属性

android: 设置该控件的颜色滤镜 按下时:


drawable.setColorFilter(Color.GRAY,PorterDuff.Mode.MULTIPLY);

弹起时:


drawable.clearColorFilter();

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。