摘要: 在使用button时,经常会用到wrapcontent属性来设置button的大小,这样button的大小就取决于background的图片大小在大多数情况下,背景图片的大小是不可以拉伸放大的,这样如果要增加用户的点击范围,就不能使用button了解决方法如下:使用imagebutton,把背景设置为透明,src设置为图片大小,再增加padding属性增加点击范围即可,例如: <ImageButton android:id="@+id/button_face" android:layout_width="wrap_content" andro... 阅读全文
posted @ 2013-04-15 16:28 tanqiantot 阅读(262) 评论(0) 推荐(0) 编辑