diff --git a/astrid/res/layout/task_list_body_user.xml b/astrid/res/layout/task_list_body_user.xml
index c6711105d..2c4a375e2 100644
--- a/astrid/res/layout/task_list_body_user.xml
+++ b/astrid/res/layout/task_list_body_user.xml
@@ -31,7 +31,8 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignTop="@id/user_image"
- android:layout_toRightOf="@id/user_image"/>
+ android:layout_toRightOf="@id/user_image"
+ android:textColor="@android:color/black"/>
diff --git a/astrid/res/values/attrs.xml b/astrid/res/values/attrs.xml
index 00bace149..96c96544c 100644
--- a/astrid/res/values/attrs.xml
+++ b/astrid/res/values/attrs.xml
@@ -28,6 +28,7 @@
+
diff --git a/astrid/res/values/styles.xml b/astrid/res/values/styles.xml
index 17a8e7734..3eb975e78 100644
--- a/astrid/res/values/styles.xml
+++ b/astrid/res/values/styles.xml
@@ -42,6 +42,7 @@
- @drawable/list_arrow_up_white
- @drawable/filter_selected_icon
- @drawable/task_row_bg_dark
+ - #322c19
- @drawable/header_blue
@@ -93,6 +94,7 @@
- @drawable/list_arrow_up
- @drawable/filter_selected_icon_black
- @drawable/task_row_bg_white
+ - #fff6d7
- @drawable/header_red
diff --git a/astrid/src/com/todoroo/astrid/adapter/TaskAdapter.java b/astrid/src/com/todoroo/astrid/adapter/TaskAdapter.java
index 0d2258e04..2cc49dc37 100644
--- a/astrid/src/com/todoroo/astrid/adapter/TaskAdapter.java
+++ b/astrid/src/com/todoroo/astrid/adapter/TaskAdapter.java
@@ -37,6 +37,7 @@ import android.text.Spanned;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.util.Log;
+import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
@@ -192,6 +193,7 @@ public class TaskAdapter extends CursorAdapter implements Filterable {
protected int applyListeners = APPLY_LISTENERS_PARENT;
private long mostRecentlyMade = -1;
private final ScaleAnimation scaleAnimation;
+ private final int readonlyBackground;
private final AtomicReference query;
@@ -251,6 +253,10 @@ public class TaskAdapter extends CursorAdapter implements Filterable {
Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
scaleAnimation.setDuration(100);
+ TypedValue readonlyBg = new TypedValue();
+ fragment.getActivity().getTheme().resolveAttribute(R.attr.asReadonlyTaskBackground, readonlyBg, false);
+ readonlyBackground = readonlyBg.data;
+
}
private int computeMinRowHeight() {
@@ -401,6 +407,11 @@ public class TaskAdapter extends CursorAdapter implements Filterable {
viewHolder.completeBox.setMinimumHeight(minRowHeight);
}
+ if (task.isEditable())
+ viewHolder.view.setBackgroundColor(resources.getColor(android.R.color.transparent));
+ else
+ viewHolder.view.setBackgroundColor(readonlyBackground);
+
// name
final TextView nameView = viewHolder.nameView; {
String nameValue = task.getValue(Task.TITLE);