android Button如何用代码设置background
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/login"
android:text="立即充值"
android:onClick="onClick"
android:textColor="#fff" />
上面的background是指定了xml文件,
那么我想用代码来设置background为xml。怎么设置呢?
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/login"
android:text="立即充值"
android:onClick="onClick"
android:textColor="#fff" />
上面的background是指定了xml文件,
那么我想用代码来设置background为xml。怎么设置呢?
...全文
相关推荐
安卓系统下button的样式
安卓操作系统下,一些页面不免会有些按钮,需要我们采用不同的样式可以得到更好的用户体验,此资源就是关于修改按钮样式的一些小例子。希望对您有些帮助。
android-image-button.zip_Android button_android_image button
tutorial create image button in android
安卓源码button圆形进度条.zip
安卓源码button圆形进度条.zip
安卓最简单的一个布局代码
安卓最简单的一个布局代码,一个图片显示加一个按钮功能,分多就下
安卓Android源码——不用更换图片的点击效果.zip
安卓Android源码——不用更换图片的点击效果.zip


