Mar*_*coS 2 icons android text button
我需要在Android应用中的代码(不是xml)中为按钮添加图标和一些文本.
图标(库存图标,"expander_open_holo_light.9.png")应位于左侧,文本位于右侧.
我找不到任何线索......
hoo*_*d82 9
看一下setCompoundDrawableWithIntrinsicBounds().你可以在这里找到信息:
http://developer.android.com/reference/android/widget/TextView.html#setCompoundDrawablesWithIntrinsicBounds(int,int,int,int)
基本上,这是以编程方式设置按钮的android:drawableLeft属性的方法.
归档时间:
14 年,3 月 前
查看次数:
5088 次
最近记录:
13 年,1 月 前