从xml中改变checkBox大小和形状

前端之家收集整理的这篇文章主要介绍了从xml中改变checkBox大小和形状前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

主程序很简单了

setContentView(R.layout.main);

看一下main

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. android:orientation="vertical" android:layout_width="fill_parent"
  4. android:layout_height="fill_parent">
  5. <CheckBox android:layout_width="wrap_content"
  6. android:layout_height="wrap_content" android:text="a checkBox" />
  7. <CheckBox android:layout_width="wrap_content"
  8. android:layout_height="wrap_content" android:text="checked checkBox"
  9. android:checked="true" />
  10. <CheckBox android:layout_width="wrap_content"
  11. android:layout_height="wrap_content" android:text="new checkBox"
  12. android:background="@drawable/checkBox_background" android:button="@drawable/checkBox" />
  13. <CheckBox android:layout_width="wrap_content"
  14. android:layout_height="wrap_content" android:text="new checked checkBox"
  15. android:checked="true" android:background="@drawable/checkBox_background"
  16. android:button="@drawable/checkBox" />
  17. </LinearLayout>
  18. <?xml version="1.0" encoding="utf-8"?>
  19. <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android

下载地址:http://www.eoeandroid.com/thread-28706-1-1.html

猜你在找的XML相关文章