From b25e6c21abe2097a99ba665655e867b9d0506918 Mon Sep 17 00:00:00 2001 From: Arne Jans Date: Fri, 13 Aug 2010 03:15:47 +0200 Subject: [PATCH] Changed manifest, so Astrid works on 2.1-phones. Fixed Task-assignment- and dashboard-spinner on TaskEditActivity. Changes arent pushed to the server, dont know how. Here are 2 bugs left: responsible person and dashboard isnt saved with task (see Producteev-tasks and notes I gave you), and the responsible-spinner is too small, I dont know why.... --- astrid/AndroidManifest.xml | 2 +- .../astrid/producteev/ProducteevControlSet.java | 9 ++++----- .../astrid/producteev/sync/ProducteevDashboard.java | 8 ++++++-- .../todoroo/astrid/producteev/sync/ProducteevUser.java | 2 +- astrid/res/layout/producteev_control.xml | 2 +- .../com/todoroo/astrid/activity/TaskEditActivity.java | 2 +- .../src/com/todoroo/astrid/service/AddOnService.java | 10 +++++++++- 7 files changed, 23 insertions(+), 12 deletions(-) diff --git a/astrid/AndroidManifest.xml b/astrid/AndroidManifest.xml index 1f665b0b3..ad004d1c5 100644 --- a/astrid/AndroidManifest.xml +++ b/astrid/AndroidManifest.xml @@ -53,7 +53,7 @@ + android:label="@string/app_name" android:debuggable="true"> diff --git a/astrid/plugin-src/com/todoroo/astrid/producteev/ProducteevControlSet.java b/astrid/plugin-src/com/todoroo/astrid/producteev/ProducteevControlSet.java index 114650f89..aa852321c 100644 --- a/astrid/plugin-src/com/todoroo/astrid/producteev/ProducteevControlSet.java +++ b/astrid/plugin-src/com/todoroo/astrid/producteev/ProducteevControlSet.java @@ -38,11 +38,11 @@ public class ProducteevControlSet implements TaskEditControlSet { @Autowired private ExceptionService exceptionService; - private Activity activity; + private final Activity activity; private Task myTask; - private Spinner responsibleSelector; - private Spinner dashboardSelector; + private final Spinner responsibleSelector; + private final Spinner dashboardSelector; private ArrayList users = null; private ArrayList dashboards = null; @@ -101,7 +101,7 @@ public class ProducteevControlSet implements TaskEditControlSet { //dashboard to not sync as first spinner-entry dashboards.add(new ProducteevDashboard(ProducteevUtilities.DASHBOARD_NO_SYNC, activity.getString(R.string.producteev_no_dashboard),null)); for (int i=1;i users = null; @@ -51,6 +51,10 @@ public class ProducteevDashboard { public ProducteevDashboard(long id, String name, String usercsv) { this.id = id; this.name = name; + + if (usercsv == null) + return; + StringTokenizer tokenizer = new StringTokenizer(usercsv, ";"); int usercount = tokenizer.countTokens(); diff --git a/astrid/plugin-src/com/todoroo/astrid/producteev/sync/ProducteevUser.java b/astrid/plugin-src/com/todoroo/astrid/producteev/sync/ProducteevUser.java index a116f1017..adcdae80d 100644 --- a/astrid/plugin-src/com/todoroo/astrid/producteev/sync/ProducteevUser.java +++ b/astrid/plugin-src/com/todoroo/astrid/producteev/sync/ProducteevUser.java @@ -63,7 +63,7 @@ public long getId() { @Override public String toString() { - String displayString = null; + String displayString = ""; boolean hasFirstname = false; boolean hasLastname = false; if (firstname != null && firstname.length() > 0) { diff --git a/astrid/res/layout/producteev_control.xml b/astrid/res/layout/producteev_control.xml index 58e9c107d..c10d3e95c 100644 --- a/astrid/res/layout/producteev_control.xml +++ b/astrid/res/layout/producteev_control.xml @@ -18,7 +18,7 @@ android:id="@+id/producteev_TEA_task_assign" android:prompt="@string/producteev_TEA_task_assign_label" android:layout_width="fill_parent" - android:layout_height="wrap_content" /> + android:layout_height="wrap_content" />