steal a more compact android-standard checkbox style from AOSP. Tighten
up the touchview
This commit is contained in:
parent
045eb93e3c
commit
0061b3da81
5 changed files with 9 additions and 15 deletions
BIN
res/drawable/btn_check_buttonless_off.png
Executable file
BIN
res/drawable/btn_check_buttonless_off.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 608 B |
BIN
res/drawable/btn_check_buttonless_on.png
Executable file
BIN
res/drawable/btn_check_buttonless_on.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 721 B |
|
@ -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>
|
|
@ -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"
|
||||
/>
|
||||
|
||||
|
|
|
@ -23,6 +23,5 @@
|
|||
android:layout_centerVertical="true"
|
||||
android:focusable="false"
|
||||
android:button="@drawable/checkbox"
|
||||
android:background="@drawable/checkbox_background"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
|
Loading…
Reference in a new issue