1
0
mirror of https://github.com/moparisthebest/k-9 synced 2025-01-31 07:10:14 -05:00

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"?> <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <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" <item android:state_checked="false"
android:drawable="@drawable/checkbox_off_background" /> android:drawable="@drawable/btn_check_buttonless_off" />
<item android:state_checked="true" <item android:state_checked="true"
android:drawable="@drawable/checkbox_on_background" /> android:drawable="@drawable/btn_check_buttonless_on" />
</selector> </selector>

View File

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

View File

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