【发布时间】:2013-08-16 16:27:42
【问题描述】:
我正在使用按钮
<Button
android:id="@+id/zoom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/trans"
android:drawableLeft="@drawable/left_img"
android:fontFamily="arial"
android:text="My Name is "
android:textSize="50sp" />
并使用 :
zoom.setTextColor(Color.parseColor("voilet"));
但看不懂how to change its image??
【问题讨论】:
-
看看developer.android.com/guide/topics/ui/controls/… 为您的按钮设置样式
-
这样设置 button.setBackground(R.drawable.ic_launcher);在 onclick 监听器中。
标签: android image button textview drawable