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....

pull/14/head
Arne Jans 14 years ago
parent 49ac72b647
commit b25e6c21ab

@ -53,7 +53,7 @@
<supports-screens />
<application android:icon="@drawable/icon"
android:label="@string/app_name">
android:label="@string/app_name" android:debuggable="true">
<!-- ====================================================== Activities = -->

@ -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<ProducteevUser> users = null;
private ArrayList<ProducteevDashboard> 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<dashboardsData.length+1;i++) {
ProducteevDashboard dashboard = new ProducteevDashboard(dashboardsData[i]);
ProducteevDashboard dashboard = new ProducteevDashboard(dashboardsData[i-1]);
dashboards.add(dashboard);
if(dashboard.getId() == dashboardId) {
ownerDashboard = dashboard;
@ -123,7 +123,6 @@ public class ProducteevControlSet implements TaskEditControlSet {
return;
}
responsibleSelector.setEnabled(true);
// Fill the responsible-spinner and set the current responsible
users = ownerDashboard.getUsers();
long responsibleId = metadata.getValue(ProducteevTask.RESPONSIBLE_ID);

@ -31,9 +31,9 @@ public class ProducteevDashboard {
StoreObject.VALUE2.name);
// data class-part
private long id;
private final long id;
private String name;
private final String name;
private ArrayList<ProducteevUser> 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();

@ -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) {

@ -219,7 +219,7 @@ public final class TaskEditActivity extends TabActivity {
controls.add(new RepeatControlSet(this, extrasAddons));
LinearLayout addonsAddons = (LinearLayout) findViewById(R.id.tab_addons_addons);
AddOn producteevAddon = addOnService.getAddOn(Constants.PACKAGE, "Producteev");
AddOn producteevAddon = addOnService.getAddOn(AddOnService.PRODUCTEEV_PACKAGE, "Producteev");
if (addOnService.isInstalled(producteevAddon) && ProducteevUtilities.INSTANCE.isLoggedIn()) {
controls.add(new ProducteevControlSet(this, addonsAddons));
}

@ -42,6 +42,9 @@ public class AddOnService {
/** Astrid Locale package */
public static final String LOCALE_PACKAGE = "com.todoroo.astrid.locale";
/** Astrid Producteev package */
public static final String PRODUCTEEV_PACKAGE = "com.todoroo.astrid.producteev";
/** Astrid Power Pack label */
public static final String POWER_PACK_LABEL = "Astrid Power Pack";
@ -152,6 +155,9 @@ public class AddOnService {
* @return
*/
public boolean isInstalled(AddOn addOn) {
// it isnt installed if it is null...
if (addOn == null)
return false;
return isInstalled(addOn.getPackageName(), addOn.isInternal());
}
@ -165,6 +171,8 @@ public class AddOnService {
return true;
if(LOCALE_PACKAGE.equals(packageName))
return true;
if(PRODUCTEEV_PACKAGE.equals(packageName))
return true;
Context context = ContextManager.getContext();
PackageInfo packageInfo;
@ -231,7 +239,7 @@ public class AddOnService {
list[3] = new AddOn(true, true, "Producteev", null,
"Synchronize with Producteev service. Also changes Astrid's importance levels to stars.",
Constants.PACKAGE, "http://www.producteev.com",
PRODUCTEEV_PACKAGE, "http://www.producteev.com",
((BitmapDrawable)r.getDrawable(R.drawable.icon_producteev)).getBitmap());
return list;

Loading…
Cancel
Save