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

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

android:
设置该控件的颜色滤镜
按下时:
drawable.setColorFilter(Color.GRAY,PorterDuff.Mode.MULTIPLY);


弹起时:
drawable.clearColorFilter();

更多相关文章

  1. android TextView控件属性列表
  2. android 常用控件一览(从底层分析,为自定义控件做下小铺垫)
  3. Android中日期和时间控件的使用
  4. Android 常用控件讲解
  5. Android给控件添加默认点击效果
  6. android控件常用属性区别
  7. Android常见控件初探
  8. Android中设置控件可见与不可见详…
  9. Android 自定义控件-SnakeLayout (仿gallery)

随机推荐

  1. 申请Android Map 的API Key(v2)的最新申
  2. portrait表示横向,landscape表示纵向
  3. Android动态污点分析工具TaintDroid部署
  4. android 中文 api (87) —— BaseInputConn
  5. Android中文API(116)――TableLayout
  6. android app崩溃日志收集以及上传
  7. context对于android的重要意义
  8. android以及ios平台的开发工具设想
  9. Android检测版本更新
  10. android.util.XML介绍