一、上图
二、主要代码:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#22ccaa">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="40dip"
android:background="#337722"
android:orientation="horizontal"
android:gravity="center_vertical">
<TextView
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:text="@string/remember_password"
android:textSize="16sp"
android:textColor="#ffffff"/>
<CheckBox
android:id="@+id/login_remember_password"
android:layout_width="51dp"
android:layout_height="25dp"
android:layout_marginRight="8dp"
android:button="@drawable/remember_password_selector"
android:checked="true" />
</LinearLayout>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/login_switch_password_on" android:state_checked="true"/>
<item android:drawable="@drawable/login_switch_password_off" />
</selector>
三、资源下载地址
http://download.csdn.net/detail/xiogjie_67/9144123