Added new check box images for tasks

pull/14/head
Andrew Shaw 14 years ago
parent 21e66cc82f
commit fe16310518

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

@ -3,9 +3,9 @@
<item android:state_checked="false" <item android:state_checked="false"
android:state_enabled="true" android:state_enabled="true"
android:drawable="@drawable/repeat_box_1" /> android:drawable="@drawable/check_box_1" />
<item android:state_checked="true" <item android:state_checked="true"
android:state_enabled="true" android:state_enabled="true"
android:drawable="@drawable/repeat_box_1" /> android:drawable="@drawable/check_box_checked_1" />
</selector> </selector>

@ -3,9 +3,9 @@
<item android:state_checked="false" <item android:state_checked="false"
android:state_enabled="true" android:state_enabled="true"
android:drawable="@drawable/repeat_box_2" /> android:drawable="@drawable/check_box_2" />
<item android:state_checked="true" <item android:state_checked="true"
android:state_enabled="true" android:state_enabled="true"
android:drawable="@drawable/repeat_box_2" /> android:drawable="@drawable/check_box_checked_2" />
</selector> </selector>

@ -3,9 +3,9 @@
<item android:state_checked="false" <item android:state_checked="false"
android:state_enabled="true" android:state_enabled="true"
android:drawable="@drawable/repeat_box_3" /> android:drawable="@drawable/check_box_3" />
<item android:state_checked="true" <item android:state_checked="true"
android:state_enabled="true" android:state_enabled="true"
android:drawable="@drawable/repeat_box_3" /> android:drawable="@drawable/check_box_checked_3" />
</selector> </selector>

@ -3,9 +3,9 @@
<item android:state_checked="false" <item android:state_checked="false"
android:state_enabled="true" android:state_enabled="true"
android:drawable="@drawable/repeat_box_4" /> android:drawable="@drawable/check_box_4" />
<item android:state_checked="true" <item android:state_checked="true"
android:state_enabled="true" android:state_enabled="true"
android:drawable="@drawable/repeat_box_4" /> android:drawable="@drawable/check_box_checked_4" />
</selector> </selector>

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="false"
android:state_enabled="true"
android:drawable="@drawable/check_box_repeat_1" />
<item android:state_checked="true"
android:state_enabled="true"
android:drawable="@drawable/check_box_repeat_checked_1" />
</selector>

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="false"
android:state_enabled="true"
android:drawable="@drawable/check_box_repeat_2" />
<item android:state_checked="true"
android:state_enabled="true"
android:drawable="@drawable/check_box_repeat_checked_2" />
</selector>

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="false"
android:state_enabled="true"
android:drawable="@drawable/check_box_repeat_3" />
<item android:state_checked="true"
android:state_enabled="true"
android:drawable="@drawable/check_box_repeat_checked_3" />
</selector>

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="false"
android:state_enabled="true"
android:drawable="@drawable/check_box_repeat_4" />
<item android:state_checked="true"
android:state_enabled="true"
android:drawable="@drawable/check_box_repeat_checked_4" />
</selector>

@ -11,7 +11,7 @@
<RelativeLayout android:id="@+id/rowBody" <RelativeLayout android:id="@+id/rowBody"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="15dip" android:layout_marginLeft="10dip"
android:paddingBottom="4dip"> android:paddingBottom="4dip">
<!-- completion check-box --> <!-- completion check-box -->
@ -19,13 +19,14 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentTop="true" android:layout_alignParentTop="true"
android:layout_marginTop="5dip" android:layout_marginTop="10dip"
android:button="@drawable/btn_check"/> android:button="@drawable/btn_check"/>
<!-- assignee photo --> <!-- assignee photo -->
<greendroid.widget.AsyncImageView android:id="@+id/picture" <greendroid.widget.AsyncImageView
android:id="@+id/picture"
android:layout_width="35dip" android:layout_width="35dip"
android:layout_height="35dip" android:layout_height="35dip"
android:padding="5dip" android:layout_marginTop="10dip"
android:scaleType="fitCenter" android:scaleType="fitCenter"
astrid:defaultSrc="@drawable/icn_default_person_image" astrid:defaultSrc="@drawable/icn_default_person_image"
android:visibility="gone"/> android:visibility="gone"/>

@ -129,7 +129,10 @@ public class TaskAdapter extends CursorAdapter implements Filterable {
}; };
private static int[] IMPORTANCE_REPEAT_RESOURCES = new int[] { private static int[] IMPORTANCE_REPEAT_RESOURCES = new int[] {
// stuff will go here R.drawable.importance_check_repeat_1, //task_indicator_0,
R.drawable.importance_check_repeat_2, //task_indicator_1,
R.drawable.importance_check_repeat_3, //task_indicator_2,
R.drawable.importance_check_repeat_4, //task_indicator_3,
}; };
// --- instance variables // --- instance variables
@ -377,13 +380,25 @@ public class TaskAdapter extends CursorAdapter implements Filterable {
final CheckBox checkBoxView = viewHolder.completeBox; { final CheckBox checkBoxView = viewHolder.completeBox; {
int value = task.getValue(Task.IMPORTANCE); int value = task.getValue(Task.IMPORTANCE);
if(value < IMPORTANCE_RESOURCES.length) if(value < IMPORTANCE_RESOURCES.length)
if (!TextUtils.isEmpty(task.getValue(Task.RECURRENCE))) if (!TextUtils.isEmpty(task.getValue(Task.RECURRENCE))) {
checkBoxView.setButtonDrawable(IMPORTANCE_RESOURCES[value]); checkBoxView.setButtonDrawable(IMPORTANCE_REPEAT_RESOURCES[value]);
else pictureView.setBackgroundResource(IMPORTANCE_REPEAT_RESOURCES[value]);
}
else {
checkBoxView.setButtonDrawable(IMPORTANCE_RESOURCES[value]); checkBoxView.setButtonDrawable(IMPORTANCE_RESOURCES[value]);
pictureView.setBackgroundResource(IMPORTANCE_RESOURCES[value]);
}
else else
{
checkBoxView.setBackgroundResource(R.drawable.btn_check); checkBoxView.setBackgroundResource(R.drawable.btn_check);
} }
if (pictureView.getVisibility() == View.VISIBLE){
checkBoxView.setVisibility(View.INVISIBLE);
}
else {
checkBoxView.setVisibility(View.VISIBLE);
}
}
String details; String details;
if(viewHolder.details1 != null) { if(viewHolder.details1 != null) {

Loading…
Cancel
Save