代码改变世界

在Button中添加图片简单的方法

2013-07-10 11:30  加油~修  阅读(1715)  评论(0编辑  收藏  举报

后来突然发现这个可以用Button做到,Button中是可以添加icon,用android:drawableLeft,icon可以用top,left等设置显示位置,drawableleft也可以是selector的xml

<Button

                android:text="test" 

                android:id="@+id/test1" 

                android:layout_width="wrap_content"

                android:layout_height="wrap_content"
                android:drawableLeft="@drawable/dial_num_1_no_vm"
                android:background="@drawable/call_btn_hold"></Button>