steal a more compact android-standard checkbox style from AOSP. Tighten

up the touchview
This commit is contained in:
Jesse Vincent 2010-01-14 00:33:05 +00:00
parent 045eb93e3c
commit 0061b3da81
5 changed files with 9 additions and 15 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 721 B

View file

@ -1,16 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true" android:state_focused="true"
android:drawable="@drawable/checkbox_on_background_focus_yellow" />
<item android:state_checked="false" android:state_focused="true"
android:drawable="@drawable/checkbox_off_background_focus_yellow" />
<item android:state_checked="false"
android:drawable="@drawable/checkbox_off_background" />
android:drawable="@drawable/btn_check_buttonless_off" />
<item android:state_checked="true"
android:drawable="@drawable/checkbox_on_background" />
android:drawable="@drawable/btn_check_buttonless_on" />
</selector>

View file

@ -19,7 +19,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/chip"
android:button="@drawable/checkbox"
android:layout_centerVertical="true"
android:focusable="false"
android:paddingLeft="3dip"
/>
<CheckBox
android:id="@+id/flagged"
@ -39,7 +42,7 @@
android:textColor="?android:attr/textColorPrimary"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dip"
android:layout_marginLeft="1dip"
android:layout_toLeftOf="@id/date"
android:layout_toRightOf="@+id/selected_checkbox"
android:layout_marginRight="1dip"
@ -65,9 +68,9 @@
android:singleLine="false"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingLeft="10dip"
android:layout_marginLeft="1dip"
android:layout_toLeftOf="@id/flagged"
android:layout_marginRight="1dip"
android:layout_marginRight="0dip"
android:bufferType="spannable"
/>

View file

@ -23,6 +23,5 @@
android:layout_centerVertical="true"
android:focusable="false"
android:button="@drawable/checkbox"
android:background="@drawable/checkbox_background"
/>
</LinearLayout>