摘要: 实现按钮的点击效果,往往需要两张图片,但是图片多了,项目就变得很大了,为了减少图片的目的,只需要用一张图片来实现点击的效果。查了一些资料,可以通过改变当前按钮背景的亮度,来实现这一效果。可能有更好的办法实现。public static StateListDrawable getStateListDrawable(Drawable normal) { StateListDrawable listDrawable = new StateListDrawable(); Bitmap srcBitmap = ((BitmapDrawable) normal).getBitm... 阅读全文
posted @ 2013-05-17 19:50 百里抱木 阅读(827) 评论(3) 推荐(1) 编辑