【声明】转载请注明出处,此文出自指尖飞落的博客:http://blog.csdn.net/huntersnail
——每天写一篇博客,每天做一点技术积累!
Android自定义矩形及selector、shape的使用
由于项目开发需要,以前虽然用过selector、shape但是都没有好好去研究过,只知道用,不知道它们的属性具体有哪些作用。虽然网上一查就都知道了,感觉还是要自己去弄懂一下。
下面咱们一起去研究下:
一、xml布局文件
/测试Demo/res/layout/check_box.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/order_meth"
style="@style/style_padding"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:background="@drawable/selector_mine"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content&#