been updating task edit. just finished urgency... rest of stuff should be fast

pull/14/head
Tim Su 15 years ago
parent 917cb8f7c4
commit 52d61e7bd0

@ -1,4 +1,4 @@
#Tue Jun 29 14:53:46 PDT 2010
#Wed Jun 30 18:54:52 PDT 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
@ -34,7 +34,7 @@ org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
@ -49,7 +49,7 @@ org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning

@ -80,7 +80,7 @@ public class DateUtilities {
public static long ONE_DAY = 3600000L;
/** Represents a single week */
public static long WEEK = 7 * 3600000L;
public static long ONE_WEEK = 7 * 3600000L;
/* ======================================================================
* =========================================================== formatters
@ -159,7 +159,6 @@ public class DateUtilities {
getTimeFormatString(context));
}
private static final String ISO_8601_FORMAT = "yyyy-MM-dd'T'HH:mm:ssz";
/**
* @return formatted date (will contain month, day, year)

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

@ -1,410 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
ASTRID: Android's Simple Task Recording Dashboard
Copyright (c) 2009 Tim Su
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/frame"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ScrollView
android:id="@+id/tab_basic"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout android:id="@+id/event"
android:paddingRight="8dip"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView android:id="@+id/name_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/name_label"
style="@style/TextAppearance.EditEvent_Label"/>
<EditText android:id="@+id/name"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="@string/name_hint"
android:autoText="true"
android:capitalize="sentences"/>
<TextView android:id="@+id/importance_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/importance_label"
style="@style/TextAppearance.EditEvent_Label"/>
<LinearLayout android:id="@+id/importance_container"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
</LinearLayout>
<TextView android:id="@+id/tags_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/tags_label"
style="@style/TextAppearance.EditEvent_Label"/>
<LinearLayout android:id="@+id/tags_container"
android:orientation="vertical"
android:paddingBottom="5dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:background="@android:drawable/divider_horizontal_dark"
/>
<TextView android:id="@+id/estimatedDuration_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/estimatedDuration_label"
style="@style/TextAppearance.EditEvent_Label"/>
<Button android:id="@+id/estimatedDuration"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<TextView android:id="@+id/notes_label"
android:paddingTop="5dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/notes_label"
style="@style/TextAppearance.EditEvent_Label"/>
<EditText android:id="@+id/notes"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:scrollbars="vertical"
android:gravity="top"
android:hint="@string/notes_hint"
android:autoText="true"
android:capitalize="sentences"
android:singleLine="false" />
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="5dip"
android:baselineAligned="false">
<Button android:id="@+id/save_general"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/save_label"
/>
<Button android:id="@+id/discard_general"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/discard_label"
/>
<Button android:id="@+id/delete_general"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/delete_label"
/>
</LinearLayout>
</LinearLayout>
</ScrollView>
<!-- DATES -->
<ScrollView
android:id="@+id/tab_dates"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout android:id="@+id/event"
android:paddingRight="8dip"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView android:id="@+id/definiteDueDate_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/definiteDueDate_label"
style="@style/TextAppearance.EditEvent_Label"/>
<LinearLayout
android:orientation="horizontal"
android:paddingRight="10dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<CheckBox android:id="@+id/definiteDueDate_notnull"
android:layout_marginRight="10dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Button android:id="@+id/definiteDueDate_date"
android:layout_weight="0.7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Button android:id="@+id/definiteDueDate_time"
android:layout_weight="1"
android:layout_marginRight="10dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
<TextView android:id="@+id/preferredDueDate_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/preferredDueDate_label"
style="@style/TextAppearance.EditEvent_Label"/>
<LinearLayout
android:orientation="horizontal"
android:paddingRight="10dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<CheckBox android:id="@+id/preferredDueDate_notnull"
android:layout_marginRight="10dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Button android:id="@+id/preferredDueDate_date"
android:layout_weight="0.7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Button android:id="@+id/preferredDueDate_time"
android:layout_weight="1"
android:layout_marginRight="10dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
<CheckBox android:id="@+id/add_to_calendar"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/addToCalendar_label"/>
<TextView android:id="@+id/hiddenUntil_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hiddenUntil_label"
style="@style/TextAppearance.EditEvent_Label"/>
<LinearLayout
android:orientation="horizontal"
android:paddingRight="10dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<CheckBox android:id="@+id/hiddenUntil_notnull"
android:layout_marginRight="10dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Button android:id="@+id/hiddenUntil_date"
android:layout_weight="0.7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Button android:id="@+id/hiddenUntil_time"
android:layout_weight="1"
android:layout_marginRight="10dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
<TextView android:id="@+id/repeat_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/repeat_label"
style="@style/TextAppearance.EditEvent_Label"/>
<LinearLayout
android:orientation="horizontal"
android:paddingRight="10dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<Button android:id="@+id/repeat_value"
android:layout_weight="1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Spinner android:id="@+id/repeat_interval"
android:layout_weight="1"
android:layout_marginRight="10dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:padding="5dip"
android:background="@android:drawable/divider_horizontal_dark"
/>
<TextView android:id="@+id/elapsedDuration_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/elapsedDuration_label"
style="@style/TextAppearance.EditEvent_Label"/>
<Button android:id="@+id/elapsedDuration"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="5dip"
android:baselineAligned="false">
<Button android:id="@+id/save_dates"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/save_label"
/>
<Button android:id="@+id/discard_dates"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/discard_label"
/>
<Button android:id="@+id/delete_dates"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/delete_label"
/>
</LinearLayout>
</LinearLayout>
</ScrollView>
<ScrollView
android:id="@+id/tab_notification"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout android:id="@+id/event"
android:paddingRight="8dip"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView android:id="@+id/notification_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/notification_label"
style="@style/TextAppearance.EditEvent_Label"/>
<Button android:id="@+id/notification"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<TextView android:id="@+id/alerts_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/alerts_label"
style="@style/TextAppearance.EditEvent_Label"/>
<LinearLayout android:id="@+id/alert_container"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
</LinearLayout>
<Button android:id="@+id/addAlert"
android:text="@string/add_alert"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<TextView android:id="@+id/flags_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/flags_label"
style="@style/TextAppearance.EditEvent_Label"/>
<CheckBox android:id="@+id/flag_before"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/flag_before"/>
<CheckBox android:id="@+id/flag_during"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/flag_during"/>
<CheckBox android:id="@+id/flag_after"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/flag_after"/>
<CheckBox android:id="@+id/flag_nonstop"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/flag_nonstop"/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="5dip"
android:baselineAligned="false">
<Button android:id="@+id/save_notify"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/save_label"
/>
<Button android:id="@+id/discard_notify"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/discard_label"
/>
<Button android:id="@+id/delete_notify"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/delete_label"
/>
</LinearLayout>
</LinearLayout>
</ScrollView>
</FrameLayout>

@ -1,126 +1,322 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
ASTRID: Android's Simple Task Recording Dashboard
Copyright (c) 2009 Tim Su
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/background_gradient">
<!-- ======================================================= tab: basic == -->
<ScrollView
android:id="@+id/tab_basic"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/background_gradient">
<LinearLayout android:id="@+id/event"
android:paddingRight="8px"
android:orientation="vertical"
android:layout_height="fill_parent">
<LinearLayout
android:id="@+id/event"
android:paddingRight="8dip"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<!-- title -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/TEA_title_label"
style="@style/TextAppearance.GEN_EditLabel" />
<EditText
android:id="@+id/title"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView android:id="@+id/name_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/TEA_name_label"
style="@style/TextAppearance.GEN_EditLabel"/>
android:layout_height="wrap_content"
android:hint="@string/TEA_title_hint"
android:autoText="true"
android:capitalize="sentences" />
<EditText android:id="@+id/name"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="@string/TEA_name_hint"
android:autoText="true"
android:capitalize="sentences"/>
<TextView android:id="@+id/importance_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/TEA_importance_label"
style="@style/TextAppearance.GEN_EditLabel"/>
<!-- importance -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/TEA_importance_label"
style="@style/TextAppearance.GEN_EditLabel" />
<LinearLayout
android:id="@+id/importance_container"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
</LinearLayout>
<LinearLayout android:id="@+id/importance_container"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
</LinearLayout>
<TextView android:id="@+id/urgency_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/TEA_urgency_label"
style="@style/TextAppearance.GEN_EditLabel"/>
<Spinner android:id="@+id/urgency"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<Button android:id="@+id/fixedDate"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:visibility="gone"/>
<TextView android:id="@+id/hiddenUntil_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/TEA_hiddenUntil_label"
style="@style/TextAppearance.GEN_EditLabel"/>
<!-- urgency -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/TEA_urgency_label"
style="@style/TextAppearance.GEN_EditLabel" />
<Spinner
android:id="@+id/urgency"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<!-- hide until -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/TEA_hideUntil_label"
style="@style/TextAppearance.GEN_EditLabel" />
<Spinner
android:id="@+id/hideUntil"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<!-- notes -->
<TextView
android:paddingTop="5dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/TEA_note_label"
style="@style/TextAppearance.GEN_EditLabel" />
<EditText
android:id="@+id/notes"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:scrollbars="vertical"
android:gravity="top"
android:hint="@string/TEA_notes_hint"
android:autoText="true"
android:capitalize="sentences"
android:singleLine="false" />
<!-- buttons -->
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="5dip"
android:baselineAligned="false">
<Button
android:id="@+id/save_basic"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/TEA_save_label" />
<Button
android:id="@+id/discard_basic"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/TEA_cancel_label" />
<Button
android:id="@+id/delete_basic"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/TEA_delete_label" />
</LinearLayout>
</LinearLayout>
</ScrollView>
<Button android:id="@+id/hiddenUntil"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<!-- ======================================================= tab: extra == -->
<TextView android:id="@+id/plugins_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/TEA_plugins_label"
android:visibility="gone"
style="@style/TextAppearance.GEN_EditLabel"/>
<ScrollView
android:id="@+id/tab_extra"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:paddingRight="8dip"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<!-- reminders -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/TEA_reminder_label"
style="@style/TextAppearance.GEN_EditLabel" />
<CheckBox
android:id="@+id/reminder_due"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/TEA_reminder_due" />
<CheckBox
android:id="@+id/reminder_overdue"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/TEA_reminder_overdue" />
<CheckBox
android:id="@+id/reminder_random"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/TEA_reminder_random" />
<LinearLayout android:id="@+id/plugins_container"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
</LinearLayout>
<!-- reminder mode -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/TEA_reminder_alarm_label"
style="@style/TextAppearance.GEN_EditLabel" />
<Spinner
android:id="@+id/reminder_alarm"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:background="@drawable/black_white_gradient"
/>
<!-- separator -->
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:padding="5dip"
android:background="@android:drawable/divider_horizontal_dark" />
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="5dip"
android:baselineAligned="false">
<Button android:id="@+id/save"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/TEA_save_label"
/>
<Button android:id="@+id/discard"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/TEA_discard_label"
/>
</LinearLayout>
<!-- tags -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/TEA_tags_label"
style="@style/TextAppearance.GEN_EditLabel" />
<LinearLayout
android:id="@+id/tags_container"
android:orientation="vertical"
android:paddingBottom="5dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:padding="5dip"
android:background="@android:drawable/divider_horizontal_dark" />
<!-- repeat -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/repeat_label"
style="@style/TextAppearance.GEN_EditLabel" />
<LinearLayout
android:orientation="horizontal"
android:paddingRight="10dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<Button
android:id="@+id/repeat_value"
android:layout_weight="1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<Spinner
android:id="@+id/repeat_interval"
android:layout_weight="1"
android:layout_marginRight="10dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<!-- buttons -->
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="5dip"
android:baselineAligned="false">
<Button
android:id="@+id/save_extra"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/save_label" />
<Button
android:id="@+id/discard_extra"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/discard_label" />
<Button
android:id="@+id/delete_extra"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/delete_label" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</ScrollView>
<!-- ===================================================== tab: add-ons == -->
<ScrollView
android:id="@+id/tab_addons"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:paddingRight="8dip"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<!-- calendar integration -->
<CheckBox
android:id="@+id/add_to_calendar"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/TEA_addToCalendar_label" />
<Button
android:id="@+id/view_calendar_event"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/TEA_showCalendar_label"
android:visibility="gone" />
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:padding="5dip"
android:background="@android:drawable/divider_horizontal_dark" />
<!-- estimated time -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/TEA_estimatedDuration_label"
style="@style/TextAppearance.GEN_EditLabel" />
<Button
android:id="@+id/estimatedDuration"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<!-- elapsed time -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/TEA_elapsedDuration_label"
style="@style/TextAppearance.GEN_EditLabel" />
<Button
android:id="@+id/elapsedDuration"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="5dip"
android:baselineAligned="false">
<Button
android:id="@+id/save_addons"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/save_label" />
<Button
android:id="@+id/discard_addons"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/discard_label" />
<Button
android:id="@+id/delete_addons"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/delete_label" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</FrameLayout>

@ -26,6 +26,8 @@
<resources>
<!-- ====================================================== reminders == -->
<string-array name="reminders">
<!-- reminders: Make these < 20 chars so the task name is displayed -->
<item>Hi there! Have a sec?</item>
@ -81,6 +83,41 @@
<item>I can\'t help you organize your life if you do that...</item>
</string-array>
<!-- ==================================================== task values == -->
<string-array name="TEA_urgency">
<!-- urgency: labels for edit page. item #4 -> auto filled -->
<item>No Urgency</item>
<item>Today</item>
<item>Tomorrow</item>
<item></item>
<item>Next Week</item>
<item>Next Month</item>
<item>Specific Day</item>
<item>Specific Day &amp; Time</item>
</string-array>
<string-array name="TEA_hideUntil">
<!-- hideUntil: labels for edit page. -->
<item>Don\'t hide</item>
<item>Task is due</item>
<item>Day before due</item>
<item>Week before due</item>
<item>Specific Day</item>
</string-array>
<!-- ==================================================== preferences == -->
<string-array name="EPr_default_urgency">
<!-- urgency: default urgency labels for preferences. -->
<item>No Urgency</item>
<item>Today</item>
<item>Tomorrow</item>
<item>Day After Tomorrow</item>
<item>Next Week</item>
<item>Next Month</item>
</string-array>
<string-array name="notif_icon_entries">
<!-- Icons for notification tray -->
<item>Pink</item>

@ -2,221 +2,214 @@
<!-- See the file "LICENSE" for the full license governing this code. -->
<resources>
<!-- ======================== AndroidManifest ========================== -->
<!-- ======================== AndroidManifest ========================== -->
<string name="app_name">Astrid Tasks</string>
<!-- permission title for READ_TASKS -->
<string name="read_permission_label">Astrid Permission</string>
<!-- permission description for READ_TASKS -->
<string name="read_permission_desc">read tasks, display task filters</string>
<!-- permission title for READ_TASKS -->
<string name="write_permission_label">Astrid Permission</string>
<!-- permission description for READ_TASKS -->
<string name="write_permission_desc">create new tasks, edit existing tasks</string>
<!-- ======================== Generic Plurals ========================== -->
<plurals name="DUt_years">
<!-- plurals: years -->
<item quantity="one">1 Year</item>
<item quantity="other">%d Years</item>
</plurals>
<plurals name="DUt_months">
<!-- plurals: months -->
<item quantity="one">1 Month</item>
<item quantity="other">%d Months</item>
</plurals>
<plurals name="DUt_days">
<!-- plurals: days -->
<item quantity="one">1 Day</item>
<item quantity="other">%d Days</item>
</plurals>
<plurals name="DUt_hours">
<!-- plurals: hours -->
<item quantity="one">1 Hour</item>
<item quantity="other">%d Hours</item>
</plurals>
<plurals name="DUt_minutes">
<!-- plurals: minutes -->
<item quantity="one">1 Minute</item>
<item quantity="other">%d Minutes</item>
</plurals>
<plurals name="DUt_seconds">
<!-- plurals: seconds -->
<item quantity="one">1 Second</item>
<item quantity="other">%d Seconds</item>
</plurals>
<plurals name="DUt_hoursShort">
<!-- plurals: hours (abbreviated) -->
<item quantity="one">1 Hr</item>
<item quantity="other">%d Hrs</item>
</plurals>
<plurals name="DUt_minutesShort">
<!-- plurals: minutes (abbreviated) -->
<item quantity="one">1 Min</item>
<item quantity="other">%d Min</item>
</plurals>
<plurals name="DUt_secondsShort">
<!-- plurals: seconds (abbreviated) -->
<item quantity="one">1 Sec</item>
<item quantity="other">%d Sec</item>
</plurals>
<!-- ========================= Generic Dialogs ========================= -->
<!-- confirmation dialog title -->
<string name="DLG_confirm_title">Confirm?</string>
<!-- question dialog title -->
<string name="DLG_question_title">Question:</string>
<!-- information dialog title -->
<string name="DLG_information_title">Information</string>
<!-- Dialog yes-->
<string name="DLG_yes">Yes</string>
<!-- Dialog no-->
<string name="DLG_no">No</string>
<!-- Dialog close-->
<string name="DLG_close">Close</string>
<string name="app_name">Astrid Tasks</string>
<!-- communicating with servers ext -->
<string name="DLG_communicating_text">Communicating with Server...</string>
<!-- error dialog -->
<string name="DLG_error">Oops, looks like some trouble occurred! Here\'s what happened:\n\n%s</string>
<!-- question for deleting tasks -->
<string name="DLG_delete_this_task_question">Delete this task?</string>
<!-- Button for advancing to next page/message -->
<string name="DLG_next">Next</string>
<!-- Button for retreating to previous page/message -->
<string name="DLG_prev">Previous</string>
<!-- Button for being done -->
<string name="DLG_done">Done</string>
<!-- Button for canceling out of this page -->
<string name="DLG_cancel">Cancel</string>
<!-- ============================= Widgets ============================= -->
<!-- Label for DateButtons with no value -->
<string name="WID_dateButtonUnset">Click To Set</string>
<!-- String formatter for DateButtons ($D => date, $T => time) -->
<string name="WID_dateButtonLabel">$D $T</string>
<!-- String formatter for Disable button -->
<string name="WID_disableButton">Disable</string>
<!-- ======================== TaskListActivity ======================== -->
<!-- Title (%s => name of filter) -->
<string name="TLA_title">Astrid: %s</string>
<!-- Displayed instead of list when no items present -->
<string name="TLA_no_items">No Tasks!</string>
<!-- Menu: Add Task -->
<string name="TLA_menu_add">Add Task</string>
<!-- Menu: Plugins -->
<string name="TLA_menu_plugins">Plugins</string>
<!-- Menu: Settings -->
<string name="TLA_menu_settings">Settings</string>
<!-- Menu: Help -->
<string name="TLA_menu_help">Help</string>
<!-- Search Label-->
<string name="TLA_search_label">Search Within This Filter</string>
<!-- Search Hint-->
<string name="TLA_search_hint">Search Within This Filter</string>
<!-- Quick Add Hint-->
<string name="TLA_quick_add_hint">Add to this list</string>
<!-- Help (HTML)-->
<string name="TLA_help"><![CDATA[
<center><h1>Help: Tasks Page</h1></center>
This page displays all of your tasks belonging to the filter you have chosen.
The back button at the top of the screen lets you pick a different filter
to display.
<br />
You can use the quick-add widget at the bottom of the screen to add tasks
without going to the edit page.
<br />
uh... that\'s it for help for today.
]]></string>
<!-- =========================== TaskAdapter =========================== -->
<!-- Format string to indicate task is hidden (%s => task name) -->
<string name="TAd_hiddenFormat">%s [hidden]</string>
<!-- Displayed when adapter is flung (scrolled quickly) -->
<string name="TAd_isFling">loading</string>
<!-- due date for tasks ($D => date) -->
<string name="TAd_dueDate">$D</string>
<!-- due date for tasks with date and time ($D => date, $T => time) -->
<string name="TAd_dueDateTime">$D at $T</string>
<!-- indicates task was completed. %s => date or time ago -->
<string name="TAd_completed">Finished %s</string>
<!-- textview indicating details are being loaded -->
<string name="TAd_loading">... loading ...</string>
<!-- Context Item: edit task -->
<string name="TAd_contextEditTask">Edit Task</string>
<!-- permission title for READ_TASKS -->
<string name="read_permission_label">Astrid Permission</string>
<!-- permission description for READ_TASKS -->
<string name="read_permission_desc">read tasks, display task filters</string>
<!-- permission title for READ_TASKS -->
<string name="write_permission_label">Astrid Permission</string>
<!-- permission description for READ_TASKS -->
<string name="write_permission_desc">create new tasks, edit existing tasks</string>
<!-- ======================== Generic Plurals ========================== -->
<plurals name="DUt_years">
<!-- plurals: years -->
<item quantity="one">1 Year</item>
<item quantity="other">%d Years</item>
</plurals>
<plurals name="DUt_months">
<!-- plurals: months -->
<item quantity="one">1 Month</item>
<item quantity="other">%d Months</item>
</plurals>
<plurals name="DUt_days">
<!-- plurals: days -->
<item quantity="one">1 Day</item>
<item quantity="other">%d Days</item>
</plurals>
<plurals name="DUt_hours">
<!-- plurals: hours -->
<item quantity="one">1 Hour</item>
<item quantity="other">%d Hours</item>
</plurals>
<plurals name="DUt_minutes">
<!-- plurals: minutes -->
<item quantity="one">1 Minute</item>
<item quantity="other">%d Minutes</item>
</plurals>
<plurals name="DUt_seconds">
<!-- plurals: seconds -->
<item quantity="one">1 Second</item>
<item quantity="other">%d Seconds</item>
</plurals>
<plurals name="DUt_hoursShort">
<!-- plurals: hours (abbreviated) -->
<item quantity="one">1 Hr</item>
<item quantity="other">%d Hrs</item>
</plurals>
<plurals name="DUt_minutesShort">
<!-- plurals: minutes (abbreviated) -->
<item quantity="one">1 Min</item>
<item quantity="other">%d Min</item>
</plurals>
<plurals name="DUt_secondsShort">
<!-- plurals: seconds (abbreviated) -->
<item quantity="one">1 Sec</item>
<item quantity="other">%d Sec</item>
</plurals>
<!-- ========================= Generic Dialogs ========================= -->
<!-- confirmation dialog title -->
<string name="DLG_confirm_title">Confirm?</string>
<!-- question dialog title -->
<string name="DLG_question_title">Question:</string>
<!-- information dialog title -->
<string name="DLG_information_title">Information</string>
<!-- Dialog yes-->
<string name="DLG_yes">Yes</string>
<!-- Dialog no-->
<string name="DLG_no">No</string>
<!-- Dialog close-->
<string name="DLG_close">Close</string>
<!-- communicating with servers ext -->
<string name="DLG_communicating_text">Communicating with Server...</string>
<!-- error dialog -->
<string name="DLG_error">Oops, looks like some trouble occurred! Here\'s what happened:\n\n%s</string>
<!-- question for deleting tasks -->
<string name="DLG_delete_this_task_question">Delete this task?</string>
<!-- Button for advancing to next page/message -->
<string name="DLG_next">Next</string>
<!-- Button for retreating to previous page/message -->
<string name="DLG_prev">Previous</string>
<!-- Button for being done -->
<string name="DLG_done">Done</string>
<!-- Button for canceling out of this page -->
<string name="DLG_cancel">Cancel</string>
<!-- ============================= Widgets ============================= -->
<!-- Label for DateButtons with no value -->
<string name="WID_dateButtonUnset">Click To Set</string>
<!-- String formatter for DateButtons ($D => date, $T => time) -->
<string name="WID_dateButtonLabel">$D $T</string>
<!-- String formatter for Disable button -->
<string name="WID_disableButton">Disable</string>
<!-- ======================== TaskListActivity ======================== -->
<!-- Displayed instead of list when no items present -->
<string name="TLA_no_items">No Tasks!</string>
<!-- Menu: Add-ons -->
<string name="TLA_menu_addons">Add-ons</string>
<!-- Menu: Settings -->
<string name="TLA_menu_settings">Settings</string>
<!-- Menu: Help -->
<string name="TLA_menu_help">Help</string>
<!-- Search Label-->
<string name="TLA_search_label">Search Within This Filter</string>
<!-- Search Hint-->
<string name="TLA_search_hint">Search Within This Filter</string>
<!-- Quick Add Hint-->
<string name="TLA_quick_add_hint">Add to this list...</string>
<!-- Help (HTML)-->
<string name="TLA_help"><![CDATA[
<center><h1>Help: Task Listing</h1></center>
<b>bar at the top</b>: shows the name of this filter, and a button to go back
to your list of filters.
<p />
<b>middle</b>: shows all your tasks.
<p />
<b>bottom</b>: quick add tasks. left button: add straight to the list. right
button: add task & go to the edit page.
]]></string>
<!-- =========================== TaskAdapter =========================== -->
<!-- Format string to indicate task is hidden (%s => task name) -->
<string name="TAd_hiddenFormat">%s [hidden]</string>
<!-- Format string to indicate task is deleted (%s => task name) -->
<string name="TAd_deletedFormat">%s [deleted]</string>
<!-- Displayed when adapter is flung (scrolled quickly) -->
<string name="TAd_flingText"></string>
<!-- due date for tasks with date and time ($D => date, $T => time) -->
<string name="TAd_dueDateTime">$D at $T</string>
<!-- indicates task was completed. %s => date or time ago -->
<string name="TAd_completed">Finished %s</string>
<!-- placeholder for loading task detail -->
<string name="TAd_loading">Loading...</string>
<!-- Context Item: edit task -->
<string name="TAd_contextEditTask">Edit Task</string>
<!-- Context Item: delete task -->
<string name="TAd_contextDeleteTask">Delete Task</string>
<!-- ======================= FilterListActivity ======================== -->
<!-- Context Item: delete task -->
<string name="TAd_contextDeleteTask">Delete Task</string>
<!-- ======================= FilterListActivity ======================== -->
<!-- Title -->
<string name="FLA_title">Astrid: Filters</string>
<!-- Loading -->
<string name="FLA_loading">Please Wait...</string>
<!-- Context Menu: Shortcut -->
<string name="FLA_context_shortcut">Create Shortcut On Desktop</string>
<!-- Menu: Search -->
<string name="FLA_menu_search">Search...</string>
<!-- Menu: Help -->
<string name="FLA_menu_help">Help</string>
<!-- Create Shortcut Dialog -->
<string name="FLA_shortcut_dialog">Create Shortcut:</string>
<!-- Search Label-->
<string name="FLA_search_label">Search For Tasks</string>
<!-- Search Hint-->
<string name="FLA_search_hint">Search For Tasks</string>
<!-- Help (HTML)-->
<string name="FLA_help"><![CDATA[
<!-- Title -->
<string name="FLA_title">Astrid: Filters</string>
<!-- Loading -->
<string name="FLA_loading">Loading Filters...</string>
<!-- Context Menu: Shortcut -->
<string name="FLA_context_shortcut">Create Shortcut On Desktop</string>
<!-- Menu: Search -->
<string name="FLA_menu_search">Search...</string>
<!-- Menu: Help -->
<string name="FLA_menu_help">Help</string>
<!-- Create Shortcut Dialog -->
<string name="FLA_shortcut_dialog">Create Shortcut:</string>
<!-- Search Label-->
<string name="FLA_search_label">Search For Tasks</string>
<!-- Search Hint-->
<string name="FLA_search_hint">Search For Tasks</string>
<!-- Help (HTML)-->
<string name="FLA_help"><![CDATA[
<center><h1>Help: Filters Page</h1></center>
<p>On the Filters page you can see all of the filters that you can use to
organize your tasks. Some Astrid Plugins will add new filters to this
organize your tasks. Some Astrid Add-ons will add new filters to this
list.
</p><p>
You can turn any filter into a shortcut on your desktop by long-pressing
@ -227,113 +220,184 @@ are using.
If you are having trouble with a particular plugin, please report errors
to the plugin creator for fastest service.
</p>
]]></string>
<!-- Toast: created shortcut (%s => label) -->
<string name="FLA_toast_onCreateShortcut">Created Shortcut: %s</string>
<!-- ======================== TaskEditActivity ========================= -->
<!-- Title when editing a task (%s => task title) -->
<string name="TEA_title">Astrid: Editing </string>
<!-- Title when creating a new task -->
<string name="TEA_titleNew">Astrid: New Task</string>
<!-- Task title label -->
<string name="TEA_name_label">Summary</string>
<!-- Task title hint (displayed when edit box is empty) -->
<string name="TEA_name_hint">Task Name</string>
<!-- Task importance label -->
<string name="TEA_importance_label">How important is it?</string>
<!-- Task urgency label -->
<string name="TEA_urgency_label">When must you finish it?</string>
<!-- Task hidden until label -->
<string name="TEA_hiddenUntil_label">Hide Until This Date</string>
<!-- Task plugins label -->
<string name="TEA_plugins_label">Plugins</string>
<!-- Save button -->
<string name="TEA_save_label">Save</string>
<!-- Don't Save button -->
<string name="TEA_discard_label">Don\'t Save</string>
]]></string>
<!-- Toast: created shortcut (%s => label) -->
<string name="FLA_toast_onCreateShortcut">Created Shortcut: %s</string>
<!-- ================================================= TaskEditActivity == -->
<!-- Title when editing a task (%s => task title) -->
<string name="TEA_view_title">Astrid: Editing \'%s\'</string>
<!-- Title when creating a new task -->
<string name="TEA_view_titleNew">Astrid: New Task</string>
<!-- First Tab - basic task details -->
<string name="TEA_tab_basic">Basic</string>
<!-- Second Tab - extra details -->
<string name="TEA_tab_extra">Extra</string>
<!-- Third Tab - add-ons -->
<string name="TEA_tab_addons">Add-ons</string>
<!-- Task title label -->
<string name="TEA_title_label">What to do?</string>
<!-- Task title hint (displayed when edit box is empty) -->
<string name="TEA_title_hint">Task Summary</string>
<!-- Task importance label -->
<string name="TEA_importance_label">How Important?</string>
<!-- Task urgency label -->
<string name="TEA_urgency_label">When to Start?</string>
<!-- Task hide until label -->
<string name="TEA_hideUntil_label">Hide Until?</string>
<!-- Task note label -->
<string name="TEA_note_label">Notes:</string>
<!-- Task note hint -->
<string name="TEA_notes_hint">Enter Task Notes...</string>
<!-- Estimated time label -->
<string name="TEA_estimatedDuration_label">How Long Will it Take?</string>
<!-- Elapsed time label -->
<string name="TEA_elapsedDuration_label">Time Already Spent on Task</string>
<!-- Label for adding task to calendar -->
<string name="TEA_addToCalendar_label">Add Task To Calendar</string>
<!-- Label when calendar event already exists -->
<string name="TEA_showCalendar_label">Open Calendar Event</string>
<!-- Repeat Setting label -->
<string name="TEA_repeat_label">Repeat Every</string>
<!-- Repeat label when repeats are not set -->
<string name="TEA_repeat_value_unset">No Repeat Set</string>
<!-- Menu: Save -->
<string name="TEA_menu_save">Save Changes</string>
<!-- Menu: Don't Save -->
<string name="TEA_menu_discard">Don\'t Save</string>
<!-- Menu: Delete Task -->
<string name="TEA_menu_delete">Delete Task</string>
<!-- Toast: task saved with deadline (%s => time units) -->
<string name="TEA_onTaskSave_due">Task Saved: due in %s</string>
<!-- Toast: task saved with deadline in past (%s => time units) -->
<string name="TEA_onTaskSave_overdue">Task Saved: due %s ago</string>
<!-- Toast: task saved without deadlines -->
<string name="TEA_onTaskSave_notDue">Task Saved</string>
<!-- Toast: task was not saved -->
<string name="TEA_onTaskDiscard">Task Editing Was Abandoned</string>
<!-- ========================== Notifications ========================== -->
<!-- Reminder header label -->
<string name="TEA_reminder_label">Remind me when...</string>
<!-- Notification title for tasks -->
<string name="Ntf_task_title">Astrid: New Reminder</string>
<!-- ===================== IntroductionActivity ======================== -->
<!-- Window title -->
<string name="InA_title">Welcome to Astrid!</string>
<!-- Button to agree to EULA -->
<string name="InA_agree">I Agree</string>
<!-- Button to disagree with EULA -->
<string name="InA_disagree">I Disagree</string>
<!-- Button to show legal -->
<string name="InA_show_eula">Start Using Todoroo</string>
<!-- =========================== HelpActivity ========================== -->
<!-- Button to send e-mail to Todoroo -->
<string name="HlA_email_us">E-mail Todoroo</string>
<!-- ========================== UpdateService ========================== -->
<!-- Reminder @ deadline -->
<string name="TEA_reminder_due">it\'s time to start the task</string>
<!-- Reminder after deadline -->
<string name="TEA_reminder_overdue">task is overdue</string>
<!-- Reminder at random times (%s => time plural)-->
<string name="TEA_reminder_random">randomly every %s</string>
<!-- Reminder alarm clock label -->
<string name="TEA_reminder_alarm_label">Ring/Vibrate Type:</string>
<!-- Reminder alarm clock toggle: off -->
<string name="TEA_reminder_alarm_off">Ring Once</string>
<!-- Reminder alarm clock toggle: on -->
<string name="TEA_reminder_alarm_on">Ring Until I Dismiss Alarm</string>
<!-- Tags label -->
<string name="TEA_tags_label">Tags:</string>
<!-- Tags hint -->
<string name="TEA_tag_hint">Tag Name</string>
<!-- dialog boxes -->
<string name="TEA_repeat_picker_title">Repeat Every (0 to disable)</string>
<string name="TEA_repeat_help_dialog_title">Help: Astrid Repeats</string>
<string name="TEA_repeat_help_dialog">
To use repeats, set at least one of the deadlines above. When you complete this task, the deadline will be automatically advanced.
\n\n
If you don\'t want to see the new task right after you complete the old one, you should use the \"Hide Until\" field, which will also be advanced automatically.
\n
</string>
<string name="TEA_repeat_help_hide">Don\'t Show Help Anymore</string>
<!-- Save button -->
<string name="TEA_save_label">Save</string>
<!-- Don't Save button -->
<string name="TEA_cancel_label">Cancel</string>
<!-- Delete button -->
<string name="TEA_delete_label">Delete</string>
<!-- Menu: Save -->
<string name="TEA_menu_save">Save Changes</string>
<!-- Menu: Don't Save -->
<string name="TEA_menu_discard">Don\'t Save</string>
<!-- Menu: Delete Task -->
<string name="TEA_menu_delete">Delete Task</string>
<!-- Toast: task saved with deadline (%s => time units) -->
<string name="TEA_onTaskSave_due">Task Saved: due in %s</string>
<!-- Toast: task saved with deadline in past (%s => time units) -->
<string name="TEA_onTaskSave_overdue">Task Saved: due %s ago</string>
<!-- Toast: task saved without deadlines -->
<string name="TEA_onTaskSave_notDue">Task Saved</string>
<!-- Toast: task was not saved -->
<string name="TEA_onTaskCancel">Task Editing Was Canceled</string>
<!-- Toast: task was deleted -->
<string name="TEA_onTaskDelete">Task Deleted!</string>
<!-- ========================== Notifications ========================== -->
<!-- Notification title for tasks -->
<string name="Ntf_task_title">Astrid: New Reminder</string>
<!-- ===================== IntroductionActivity ======================== -->
<!-- Window title -->
<string name="InA_title">Welcome to Astrid!</string>
<!-- Button to agree to EULA -->
<string name="InA_agree">I Agree!!</string>
<!-- Button to disagree with EULA -->
<string name="InA_disagree">I Disagree</string>
<!-- =========================== HelpActivity ========================== -->
<!-- Button to send e-mail to Todoroo -->
<string name="HlA_email_us">E-mail Todoroo</string>
<!-- Change Log Window Title -->
<string name="UpS_changelog_title">What\'s New In Astrid?</string>
<!-- ========================== UpdateService ========================== -->
<!-- Change Log Window Title -->
<string name="UpS_changelog_title">What\'s New In Astrid?</string>
<!-- ========================= EditPreferences ========================= -->
<!-- ========================= EditPreferences ========================= -->
<!-- Window Title -->
<string name="EPr_title">Astrid: Preferences</string>
<!-- Window Title -->
<string name="EPr_title">Astrid: Preferences</string>
<!-- Defaults Title -->
<string name="EPr_defaults_header">New Task Defaults</string>
<!-- Default Urgency Title -->
<string name="EPr_default_urgency_title">Default Urgency</string>
<!-- Default Urgency Description (%s => setting) -->
<string name="EPr_default_urgency_desc">Currently Set To: %s</string>
<!-- Preference Key (do not translate) -->
<string name="EPr_default_urgency_key">p_durg</string>
<!-- Defaults Title -->
<string name="EPr_defaults_header">New Task Defaults</string>
<!-- Default Urgency Title -->
<string name="EPr_default_urgency_title">Default Urgency</string>
<!-- Default Urgency Description (%s => setting) -->
<string name="EPr_default_urgency_desc">Currently Set To: %s</string>
<!-- Preference Key (do not translate) -->
<string name="EPr_default_urgency_key">p_durg</string>
<!-- Default Importance Title -->
<string name="EPr_default_importance_title">Default Importance</string>
<!-- Default Importance Description (%s => setting) -->
<string name="EPr_default_importance_desc">Currently Set To: %s</string>
<!-- Preference Key (do not translate) -->
<string name="EPr_default_importance_key">p_dimp</string>
<!-- Default Importance Title -->
<string name="EPr_default_importance_title">Default Importance</string>
<!-- Default Importance Description (%s => setting) -->
<string name="EPr_default_importance_desc">Currently Set To: %s</string>
<!-- Preference Key (do not translate) -->
<string name="EPr_default_importance_key">p_dimp</string>
</resources>

@ -62,6 +62,7 @@ import com.timsu.astrid.data.tag.TagModelForView;
import com.timsu.astrid.data.task.TaskIdentifier;
import com.timsu.astrid.utilities.DialogUtilities;
import com.timsu.astrid.utilities.Preferences;
import com.todoroo.astrid.activity.TaskEditActivity;
/**
@ -309,8 +310,7 @@ public class TagListSubActivity extends SubActivity {
// --- list adapter
private void createTask(TagModelForView tag) {
Intent intent = new Intent(getParent(), TaskEdit.class);
intent.putExtra(TaskEdit.TAG_NAME_TOKEN, tag.getName());
Intent intent = new Intent(getParent(), TaskEditActivity.class);
launchActivity(intent, ACTIVITY_CREATE);
}
@ -439,9 +439,9 @@ public class TagListSubActivity extends SubActivity {
class TagListAdapter extends ArrayAdapter<TagModelForView> {
private List<TagModelForView> objects;
private int resource;
private LayoutInflater inflater;
private final List<TagModelForView> objects;
private final int resource;
private final LayoutInflater inflater;
private HashMap<TagModelForView, Integer> tagCount;
public TagListAdapter(Context context, int resource,

@ -1,970 +0,0 @@
/*
* ASTRID: Android's Simple Task Recording Dashboard
*
* Copyright (c) 2009 Tim Su
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package com.timsu.astrid.activities;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import android.app.AlertDialog;
import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Resources;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.widget.ArrayAdapter;
import android.widget.AutoCompleteTextView;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.SimpleCursorAdapter;
import android.widget.Spinner;
import android.widget.TabHost;
import android.widget.TextView;
import android.widget.Toast;
import android.widget.ToggleButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
import com.flurry.android.FlurryAgent;
import com.timsu.astrid.R;
import com.timsu.astrid.data.alerts.AlertController;
import com.timsu.astrid.data.enums.Importance;
import com.timsu.astrid.data.enums.RepeatInterval;
import com.timsu.astrid.data.sync.SyncDataController;
import com.timsu.astrid.data.tag.TagController;
import com.timsu.astrid.data.tag.TagIdentifier;
import com.timsu.astrid.data.tag.TagModelForView;
import com.timsu.astrid.data.task.TaskIdentifier;
import com.timsu.astrid.data.task.TaskModelForEdit;
import com.timsu.astrid.data.task.TaskModelForList;
import com.timsu.astrid.data.task.AbstractTaskModel.RepeatInfo;
import com.timsu.astrid.utilities.AstridUtilities;
import com.timsu.astrid.utilities.Constants;
import com.timsu.astrid.utilities.DateUtilities;
import com.timsu.astrid.utilities.Notifications;
import com.timsu.astrid.utilities.Preferences;
import com.timsu.astrid.widget.DateControlSet;
import com.timsu.astrid.widget.DateWithNullControlSet;
import com.timsu.astrid.widget.NumberPicker;
import com.timsu.astrid.widget.NumberPickerDialog;
import com.timsu.astrid.widget.TimeDurationControlSet;
import com.timsu.astrid.widget.NumberPickerDialog.OnNumberPickedListener;
import com.timsu.astrid.widget.TimeDurationControlSet.TimeDurationType;
/**
* This activity is responsible for creating new tasks and editing existing
* ones. It saves a task when it is paused (screen rotated, back button
* pressed) as long as the task has a title.
*
* @author timsu
*
*/
public class TaskEdit extends TaskModificationTabbedActivity<TaskModelForEdit> {
// bundle arguments
public static final String TAG_NAME_TOKEN = "t";
public static final String START_CHAR_TOKEN = "s";
// menu items
private static final int SAVE_ID = Menu.FIRST;
private static final int DISCARD_ID = Menu.FIRST + 1;
private static final int DELETE_ID = Menu.FIRST + 2;
// other constants
private static final int MAX_TAGS = 5;
private static final int MAX_ALERTS = 5;
private static final String TAB_BASIC = "basic";
private static final String TAB_DATES = "dates";
private static final String TAB_ALERTS = "alerts";
private static final int DEFAULT_CAL_TIME = 3600;
// UI components
private EditText name;
private ImportanceControlSet importance;
private TimeDurationControlSet estimatedDuration;
private TimeDurationControlSet elapsedDuration;
private TimeDurationControlSet notification;
private DateControlSet definiteDueDate;
private DateControlSet preferredDueDate;
private DateControlSet hiddenUntil;
private EditText notes;
private LinearLayout tagsContainer;
private NotifyFlagControlSet flags;
private LinearLayout alertsContainer;
private Button repeatValue;
private Spinner repeatInterval;
private CheckBox addToCalendar;
// other instance variables
private boolean shouldSaveState = true;
private boolean repeatHelpShown = false;
private TagController tagController;
private AlertController alertController;
private List<TagModelForView> tags;
private List<TagIdentifier> taskTags;
// OnClickListeners for save, discard and delete
private View.OnClickListener mSaveListener = new View.OnClickListener() {
public void onClick(View v) {
saveButtonClick();
}
};
private View.OnClickListener mDiscardListener = new View.OnClickListener() {
public void onClick(View v) {
discardButtonClick();
}
};
private View.OnClickListener mDeleteListener = new View.OnClickListener() {
public void onClick(View v) {
deleteButtonClick();
}
};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
tagController = new TagController(this);
tagController.open();
alertController = new AlertController(this);
alertController.open();
TabHost tabHost = getTabHost();
tabHost.setPadding(0, 4, 0, 0);
Resources r = getResources();
LayoutInflater.from(this).inflate(R.layout.task_edit, tabHost.getTabContentView(), true);
tabHost.addTab(tabHost.newTabSpec(TAB_BASIC).setIndicator(r.getString(R.string.taskEdit_tab_basic),
r.getDrawable(R.drawable.ic_dialog_info_c)).setContent(R.id.tab_basic));
tabHost.addTab(tabHost.newTabSpec(TAB_DATES).setIndicator(r.getString(R.string.taskEdit_tab_dates),
r.getDrawable(R.drawable.ic_dialog_time_c)).setContent(R.id.tab_dates));
tabHost.addTab(tabHost.newTabSpec(TAB_ALERTS).setIndicator(r.getString(R.string.taskEdit_tab_alerts),
r.getDrawable(R.drawable.ic_dialog_alert_c)).setContent(R.id.tab_notification));
setUpUIComponents();
setUpListeners();
// disable name input box until user requests it
AstridUtilities.suppressVirtualKeyboard(name);
}
@Override
protected TaskModelForEdit getModel(TaskIdentifier identifier) {
if (identifier != null) {
TaskModelForEdit task = controller.fetchTaskForEdit(this, identifier);
if(task.getCursor().getCount() > 0)
return task;
}
return controller.createNewTaskForEdit();
}
/* ======================================================================
* =============================================== model reading / saving
* ====================================================================== */
/** Populate UI component values from the model */
private void populateFields() {
Resources r = getResources();
// set UI components based on model variables
if(model.getCursor() != null)
startManagingCursor(model.getCursor());
if(model.getTaskIdentifier() == null) {
FlurryAgent.onEvent("create-task");
Bundle extras = getIntent().getExtras();
if(extras != null && extras.containsKey(START_CHAR_TOKEN))
name.setText("" + extras.getChar(START_CHAR_TOKEN));
} else {
FlurryAgent.onEvent("edit-task");
name.setText(model.getName());
}
if(model.getName().length() > 0)
setTitle(new StringBuilder().
append(r.getString(R.string.taskEdit_titlePrefix)).
append(" ").
append(model.getName()));
estimatedDuration.setTimeDuration(model.getEstimatedSeconds());
elapsedDuration.setTimeDuration(model.getElapsedSeconds());
importance.setImportance(model.getImportance());
definiteDueDate.setDate(model.getDefiniteDueDate());
preferredDueDate.setDate(model.getPreferredDueDate());
hiddenUntil.setDate(model.getHiddenUntil());
notification.setTimeDuration(model.getNotificationIntervalSeconds());
flags.setValue(model.getNotificationFlags());
notes.setText(model.getNotes());
if(model.getTaskIdentifier() == null) {
Integer reminder = Preferences.getDefaultReminder(this);
if(reminder != null)
notification.setTimeDuration(24*3600*reminder);
}
if(model.getCalendarUri() != null)
addToCalendar.setText(r.getString(R.string.showCalendar_label));
// tags (only configure if not already set)
if(tagsContainer.getChildCount() == 0) {
tags = tagController.getAllTags();
if(model.getTaskIdentifier() != null) {
taskTags = tagController.getTaskTags(model.getTaskIdentifier());
if(taskTags.size() > 0) {
Map<TagIdentifier, TagModelForView> tagsMap =
new HashMap<TagIdentifier, TagModelForView>();
for(TagModelForView tag : tags)
tagsMap.put(tag.getTagIdentifier(), tag);
for(TagIdentifier id : taskTags) {
if(!tagsMap.containsKey(id))
continue;
TagModelForView tag = tagsMap.get(id);
addTag(tag.getName());
}
}
} else {
taskTags = new LinkedList<TagIdentifier>();
Bundle extras = getIntent().getExtras();
if(extras != null && extras.containsKey(TAG_NAME_TOKEN)) {
addTag(extras.getString(TAG_NAME_TOKEN));
}
}
addTag("");
}
// alerts
if(model.getTaskIdentifier() != null) {
List<Date> alerts = alertController.getTaskAlerts(model.getTaskIdentifier());
for(Date alert : alerts) {
addAlert(alert);
}
}
// repeats
RepeatInfo repeatInfo = model.getRepeat();
if(repeatInfo != null) {
setRepeatValue(repeatInfo.getValue());
repeatInterval.setSelection(repeatInfo.getInterval().ordinal());
} else
setRepeatValue(0);
}
/** Save task model from values in UI components */
private void save() {
// don't save if user accidentally created a new task
if(name.getText().length() == 0)
return;
// tell the task list to update itself
TaskListSubActivity.shouldRefreshTaskList = true;
model.setName(name.getText().toString());
model.setEstimatedSeconds(estimatedDuration.getTimeDurationInSeconds());
model.setElapsedSeconds(elapsedDuration.getTimeDurationInSeconds());
model.setImportance(importance.getImportance());
model.setDefiniteDueDate(definiteDueDate.getDate());
model.setPreferredDueDate(preferredDueDate.getDate());
model.setHiddenUntil(hiddenUntil.getDate());
model.setNotificationFlags(flags.getValue());
model.setNotes(notes.getText().toString());
model.setNotificationIntervalSeconds(notification.getTimeDurationInSeconds());
model.setRepeat(getRepeatValue());
try {
// write out to database
controller.saveTask(model, false);
saveTags();
saveAlerts();
Notifications.updateAlarm(this, controller, alertController, model);
Date dueDate = model.getPreferredDueDate();
if (dueDate == null) {
dueDate = model.getDefiniteDueDate();
}
if (dueDate != null && model.getProgressPercentage() != TaskModelForEdit.COMPLETE_PERCENTAGE) {
showSaveToast(dueDate);
} else {
showSaveToast();
}
} catch (Exception e) {
Log.e("astrid", "Error saving", e);
}
}
/**
* Displays a Toast reporting that the selected task has been saved and is
* due in 'x' amount of time, to 2 time-units of precision (e.g. Days + Hours).
* @param dueDate the Date when the task is due
*/
private void showSaveToast(Date dueDate) {
int stringResource;
int timeInSeconds = (int)((dueDate.getTime() - System.currentTimeMillis())/1000L);
if (timeInSeconds < 0) {
timeInSeconds *= -1; // DateUtilities.getDurationString() requires positive integer
stringResource = R.string.taskEdit_onTaskSave_Overdue;
} else {
stringResource = R.string.taskEdit_onTaskSave_Due;
}
String formattedDate = DateUtilities.getDurationString(getResources(), timeInSeconds, 2);
Toast.makeText(this,
getResources().getString(stringResource, formattedDate),
Toast.LENGTH_SHORT).show();
}
/**
* Displays a Toast reporting that the selected task has been saved.
* Use this version when no due Date has been set.
*/
private void showSaveToast() {
Toast.makeText(this, R.string.taskEdit_onTaskSave_notDue, Toast.LENGTH_SHORT).show();
}
/** Save task tags. Must be called after task already has an ID */
private void saveTags() {
Set<TagIdentifier> tagsToDelete;
Set<TagIdentifier> tagsToAdd;
HashSet<String> tagNames = new HashSet<String>();
for(int i = 0; i < tagsContainer.getChildCount(); i++) {
TextView tagName = (TextView)tagsContainer.getChildAt(i).findViewById(R.id.text1);
if(tagName.getText().length() == 0)
continue;
tagNames.add(tagName.getText().toString());
}
// map names to tag identifiers, creating them if necessary
HashSet<TagIdentifier> tagIds = new HashSet<TagIdentifier>();
HashMap<String, TagIdentifier> tagsByName = new HashMap<String, TagIdentifier>();
for(TagModelForView tag : tags)
tagsByName.put(tag.getName(), tag.getTagIdentifier());
for(String tagName : tagNames) {
if(tagsByName.containsKey(tagName))
tagIds.add(tagsByName.get(tagName));
else {
TagIdentifier newTagId = tagController.createTag(tagName);
tagIds.add(newTagId);
}
}
// intersect tags to figure out which we need to add / remove
tagsToDelete = new HashSet<TagIdentifier>(taskTags);
tagsToDelete.removeAll(tagIds);
tagsToAdd = tagIds;
tagsToAdd.removeAll(taskTags);
// perform the database updates
for(TagIdentifier tagId : tagsToDelete)
tagController.removeTag(model.getTaskIdentifier(), tagId);
for(TagIdentifier tagId : tagsToAdd)
tagController.addTag(model.getTaskIdentifier(), tagId);
if(tagsToDelete.size() > 0 || tagsToAdd.size() > 0)
SyncDataController.taskUpdated(this, model);
}
/** Helper method to save alerts for this task */
private void saveAlerts() {
alertController.removeAlerts(model.getTaskIdentifier());
for(int i = 0; i < alertsContainer.getChildCount(); i++) {
DateControlSet dateControlSet = (DateControlSet)alertsContainer.
getChildAt(i).getTag();
Date date = dateControlSet.getDate();
alertController.addAlert(model.getTaskIdentifier(), date);
}
}
/* ======================================================================
* ==================================================== UI initialization
* ====================================================================== */
/** Initialize UI components */
private void setUpUIComponents() {
Resources r = getResources();
setTitle(new StringBuilder()
.append(r.getString(R.string.taskEdit_titleGeneric)));
// populate instance variables
name = (EditText)findViewById(R.id.name);
importance = new ImportanceControlSet(R.id.importance_container);
tagsContainer = (LinearLayout)findViewById(R.id.tags_container);
estimatedDuration = new TimeDurationControlSet(this,
R.id.estimatedDuration, 0, R.string.hour_minutes_dialog,
TimeDurationType.HOURS_MINUTES);
elapsedDuration = new TimeDurationControlSet(this, R.id.elapsedDuration,
0, R.string.hour_minutes_dialog,
TimeDurationType.HOURS_MINUTES);
notification = new TimeDurationControlSet(this, R.id.notification,
R.string.notification_prefix, R.string.notification_dialog,
TimeDurationType.DAYS_HOURS);
definiteDueDate = new DateWithNullControlSet(this, R.id.definiteDueDate_notnull,
R.id.definiteDueDate_date, R.id.definiteDueDate_time);
preferredDueDate = new DateWithNullControlSet(this, R.id.preferredDueDate_notnull,
R.id.preferredDueDate_date, R.id.preferredDueDate_time);
hiddenUntil = new DateWithNullControlSet(this, R.id.hiddenUntil_notnull,
R.id.hiddenUntil_date, R.id.hiddenUntil_time);
notes = (EditText)findViewById(R.id.notes);
flags = new NotifyFlagControlSet(R.id.flag_before,
R.id.flag_during, R.id.flag_after, R.id.flag_nonstop);
alertsContainer = (LinearLayout)findViewById(R.id.alert_container);
repeatInterval = (Spinner)findViewById(R.id.repeat_interval);
repeatValue = (Button)findViewById(R.id.repeat_value);
addToCalendar = (CheckBox)findViewById(R.id.add_to_calendar);
// individual ui component initialization
ArrayAdapter<String> repeatAdapter = new ArrayAdapter<String>(
this, android.R.layout.simple_spinner_item,
RepeatInterval.getLabels(getResources()));
repeatAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
repeatInterval.setAdapter(repeatAdapter);
}
/** Set up button listeners */
private void setUpListeners() {
Button saveButtonGeneral = (Button) findViewById(R.id.save_general);
saveButtonGeneral.setOnClickListener(mSaveListener);
Button saveButtonDates = (Button) findViewById(R.id.save_dates);
saveButtonDates.setOnClickListener(mSaveListener);
Button saveButtonNotify = (Button) findViewById(R.id.save_notify);
saveButtonNotify.setOnClickListener(mSaveListener);
Button discardButtonGeneral = (Button) findViewById(R.id.discard_general);
discardButtonGeneral.setOnClickListener(mDiscardListener);
Button discardButtonDates = (Button) findViewById(R.id.discard_dates);
discardButtonDates.setOnClickListener(mDiscardListener);
Button discardButtonNotify = (Button) findViewById(R.id.discard_notify);
discardButtonNotify.setOnClickListener(mDiscardListener);
Button deleteButtonGeneral = (Button) findViewById(R.id.delete_general);
Button deleteButtonDates = (Button) findViewById(R.id.delete_dates);
Button deleteButtonNotify = (Button) findViewById(R.id.delete_notify);
if(model.getTaskIdentifier() == null) {
deleteButtonGeneral.setVisibility(View.GONE);
deleteButtonDates.setVisibility(View.GONE);
deleteButtonNotify.setVisibility(View.GONE);
} else {
deleteButtonGeneral.setOnClickListener(mDeleteListener);
deleteButtonDates.setOnClickListener(mDeleteListener);
deleteButtonNotify.setOnClickListener(mDeleteListener);
}
Button addAlertButton = (Button) findViewById(R.id.addAlert);
addAlertButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
addAlert(null);
}
});
repeatValue.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
repeatValueClick();
}
});
}
/** Set up the repeat value button */
private void setRepeatValue(int value) {
if(value == 0)
repeatValue.setText(R.string.repeat_value_unset);
else
repeatValue.setText(Integer.toString(value));
repeatValue.setTag(value);
}
private RepeatInfo getRepeatValue() {
if(repeatValue.getTag().equals(0))
return null;
return new RepeatInfo(RepeatInterval.values()
[repeatInterval.getSelectedItemPosition()],
(Integer)repeatValue.getTag());
}
/** Adds an alert to the alert field */
private boolean addAlert(Date alert) {
if(alertsContainer.getChildCount() >= MAX_ALERTS)
return false;
LayoutInflater inflater = getLayoutInflater();
final View alertItem = inflater.inflate(R.layout.edit_alert_item, null);
alertsContainer.addView(alertItem);
DateControlSet dcs = new DateControlSet(this,
(Button)alertItem.findViewById(R.id.date),
(Button)alertItem.findViewById(R.id.time));
dcs.setDate(alert);
alertItem.setTag(dcs);
ImageButton reminderRemoveButton;
reminderRemoveButton = (ImageButton)alertItem.findViewById(R.id.button1);
reminderRemoveButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
alertsContainer.removeView(alertItem);
}
});
return true;
}
/** Adds a tag to the tag field */
private boolean addTag(String tagName) {
if (tagsContainer.getChildCount() >= MAX_TAGS) {
return false;
}
LayoutInflater inflater = getLayoutInflater();
final View tagItem = inflater.inflate(R.layout.edit_tag_item, null);
tagsContainer.addView(tagItem);
AutoCompleteTextView textView = (AutoCompleteTextView)tagItem.
findViewById(R.id.text1);
textView.setText(tagName);
ArrayAdapter<TagModelForView> tagsAdapter =
new ArrayAdapter<TagModelForView>(this,
android.R.layout.simple_dropdown_item_1line, tags);
textView.setAdapter(tagsAdapter);
textView.addTextChangedListener(new TextWatcher() {
public void onTextChanged(CharSequence s, int start, int before,
int count) {
if(start == 0 && tagsContainer.getChildAt(
tagsContainer.getChildCount()-1) == tagItem) {
addTag("");
}
}
public void afterTextChanged(Editable s) {
//
}
public void beforeTextChanged(CharSequence s, int start, int count,
int after) {
//
}
});
ImageButton reminderRemoveButton;
reminderRemoveButton = (ImageButton)tagItem.findViewById(R.id.button1);
reminderRemoveButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
tagsContainer.removeView(tagItem);
}
});
return true;
}
/* ======================================================================
* ======================================================= event handlers
* ====================================================================== */
@Override
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
if(hasFocus && TaskList.shouldCloseInstance) { // user wants to quit
finish();
}
}
private void saveButtonClick() {
setResult(RESULT_OK);
finish();
}
private void discardButtonClick() {
shouldSaveState = false;
setResult(Constants.RESULT_DISCARD);
finish();
}
private void deleteButtonClick() {
new AlertDialog.Builder(this)
.setTitle(R.string.delete_title)
.setMessage(R.string.delete_this_task_title)
.setIcon(android.R.drawable.ic_dialog_alert)
.setPositiveButton(android.R.string.ok,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
// tell the task list to update itself
TaskListSubActivity.shouldRefreshTaskList = true;
controller.deleteTask(model.getTaskIdentifier());
shouldSaveState = false;
setResult(Constants.RESULT_GO_HOME);
finish();
}
})
.setNegativeButton(android.R.string.cancel, null)
.show();
}
private void repeatValueClick() {
final int tagValue = (Integer)repeatValue.getTag();
if(tagValue > 0)
repeatHelpShown = true;
final Runnable openDialogRunnable = new Runnable() {
public void run() {
repeatHelpShown = true;
int dialogValue = tagValue;
if(dialogValue == 0)
dialogValue = 1;
new NumberPickerDialog(TaskEdit.this, new OnNumberPickedListener() {
public void onNumberPicked(NumberPicker view, int number) {
setRepeatValue(number);
}
}, getResources().getString(R.string.repeat_picker_title),
dialogValue, 1, 0, 31).show();
}
};
if(repeatHelpShown || !Preferences.shouldShowRepeatHelp(this)) {
openDialogRunnable.run();
return;
}
new AlertDialog.Builder(this)
.setTitle(R.string.repeat_help_dialog_title)
.setMessage(R.string.repeat_help_dialog)
.setIcon(android.R.drawable.ic_dialog_info)
.setPositiveButton(android.R.string.ok,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
openDialogRunnable.run();
}
})
.setNeutralButton(R.string.repeat_help_hide,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
Preferences.setShowRepeatHelp(TaskEdit.this, false);
openDialogRunnable.run();
}
})
.show();
}
@Override
public boolean onMenuItemSelected(int featureId, MenuItem item) {
switch(item.getItemId()) {
case SAVE_ID:
saveButtonClick();
return true;
case DISCARD_ID:
discardButtonClick();
return true;
case DELETE_ID:
deleteButtonClick();
return true;
}
return super.onMenuItemSelected(featureId, item);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu);
MenuItem item;
item = menu.add(Menu.NONE, SAVE_ID, 0, R.string.save_label);
item.setIcon(android.R.drawable.ic_menu_save);
item.setAlphabeticShortcut('s');
item = menu.add(Menu.NONE, DISCARD_ID, 0, R.string.discard_label);
item.setIcon(android.R.drawable.ic_menu_close_clear_cancel);
item.setAlphabeticShortcut('c');
if (model.getTaskIdentifier() != null) {
item = menu.add(Menu.NONE, DELETE_ID, 0, R.string.delete_label);
item.setIcon(android.R.drawable.ic_menu_delete);
item.setAlphabeticShortcut('d');
}
return true;
}
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
// save the tag name token for when we rotate the screen
Bundle extras = getIntent().getExtras();
if(extras != null && extras.containsKey(TAG_NAME_TOKEN))
outState.putString(TAG_NAME_TOKEN,
extras.getString(TAG_NAME_TOKEN));
}
/** Take the values from the model and set the calendar start and end times
* based on these. Sets keys 'dtstart' and 'dtend'.
*
* @param preferred preferred due date or null
* @param definite definite due date or null
* @param estimatedSeconds estimated duration or null
* @param values
*/
public static void createCalendarStartEndTimes(Date preferred, Date definite,
Integer estimatedSeconds, ContentValues values) {
FlurryAgent.onEvent("create-calendar-event");
Long deadlineDate = null;
if (preferred != null && preferred.after(new Date()))
deadlineDate = preferred.getTime();
else if (definite != null)
deadlineDate = definite.getTime();
else
deadlineDate = System.currentTimeMillis() + 24*3600*1000L;
int estimatedTime = DEFAULT_CAL_TIME;
if(estimatedSeconds != null && estimatedSeconds > 0) {
estimatedTime = estimatedSeconds;
}
values.put("dtstart", deadlineDate - estimatedTime * 1000L);
values.put("dtend", deadlineDate);
}
@Override
protected void onPause() {
// create calendar event
if(addToCalendar.isChecked() && model.getCalendarUri() == null) {
Uri uri = Uri.parse("content://calendar/events");
ContentResolver cr = getContentResolver();
ContentValues values = new ContentValues();
values.put("title", name.getText().toString());
values.put("calendar_id", Preferences.getDefaultCalendarIDSafe(this));
values.put("description", notes.getText().toString());
values.put("hasAlarm", 0);
values.put("transparency", 0);
values.put("visibility", 0);
createCalendarStartEndTimes(model.getPreferredDueDate(),
model.getDefiniteDueDate(), model.getEstimatedSeconds(),
values);
Uri result = null;
try{
result = cr.insert(uri, values);
model.setCalendarUri(result.toString());
} catch (IllegalArgumentException e) {
Log.e("astrid", "Error creating calendar event!", e);
}
}
if(shouldSaveState)
save();
if(addToCalendar.isChecked() && model.getCalendarUri() != null) {
Uri result = Uri.parse(model.getCalendarUri());
Intent intent = new Intent(Intent.ACTION_EDIT, result);
ContentValues values = new ContentValues();
createCalendarStartEndTimes(model.getPreferredDueDate(),
model.getDefiniteDueDate(), model.getEstimatedSeconds(),
values);
intent.putExtra("beginTime", values.getAsLong("dtstart"));
intent.putExtra("endTime", values.getAsLong("dtend"));
startActivity(intent);
}
super.onPause();
}
@Override
protected void onResume() {
super.onResume();
populateFields();
}
@Override
protected void onDestroy() {
super.onDestroy();
tagController.close();
alertController.close();
}
/* ======================================================================
* ========================================== UI component helper classes
* ====================================================================== */
/** Control set dealing with notification flags */
public class NotifyFlagControlSet {
private CheckBox before, during, after, nonstop;
public NotifyFlagControlSet(int beforeId, int duringId,
int afterId, int nonstopId) {
before = (CheckBox)findViewById(beforeId);
during = (CheckBox)findViewById(duringId);
after = (CheckBox)findViewById(afterId);
nonstop = (CheckBox)findViewById(nonstopId);
}
public void setValue(int flags) {
before.setChecked((flags &
TaskModelForEdit.NOTIFY_BEFORE_DEADLINE) > 0);
during.setChecked((flags &
TaskModelForEdit.NOTIFY_AT_DEADLINE) > 0);
after.setChecked((flags &
TaskModelForEdit.NOTIFY_AFTER_DEADLINE) > 0);
nonstop.setChecked((flags &
TaskModelForEdit.NOTIFY_NONSTOP) > 0);
}
public int getValue() {
int value = 0;
if(before.isChecked())
value |= TaskModelForEdit.NOTIFY_BEFORE_DEADLINE;
if(during.isChecked())
value |= TaskModelForEdit.NOTIFY_AT_DEADLINE;
if(after.isChecked())
value |= TaskModelForEdit.NOTIFY_AFTER_DEADLINE;
if(nonstop.isChecked())
value |= TaskModelForEdit.NOTIFY_NONSTOP;
return value;
}
}
/** Control set dealing with importance */
public class ImportanceControlSet {
private List<CompoundButton> buttons = new LinkedList<CompoundButton>();
public ImportanceControlSet(int containerId) {
LinearLayout layout = (LinearLayout)findViewById(containerId);
Resources r = getResources();
for(Importance i : Importance.values()) {
final ToggleButton button = new ToggleButton(TaskEdit.this);
button.setLayoutParams(new LinearLayout.LayoutParams(
LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT, 1));
button.setTextColor(r.getColor(i.getColorResource()));
button.setTextOff(r.getString(i.getLabelResource()));
button.setTextOn(r.getString(i.getLabelResource()));
button.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
setImportance((Importance)button.getTag());
}
});
button.setTag(i);
buttons.add(button);
layout.addView(button);
}
}
public void setImportance(Importance i) {
for(CompoundButton b : buttons) {
if(b.getTag() == i) {
b.setTextSize(24);
b.setChecked(true);
} else {
b.setTextSize(16);
b.setChecked(false);
}
}
}
public Importance getImportance() {
for(CompoundButton b : buttons)
if(b.isChecked())
return (Importance)b.getTag();
return Importance.DEFAULT;
}
}
/** Control set dealing with "blocking on" */
public class BlockingOnControlSet {
private CheckBox activatedCheckBox;
private Spinner taskBox;
public BlockingOnControlSet(int checkBoxId, int taskBoxId) {
activatedCheckBox = (CheckBox)findViewById(checkBoxId);
taskBox = (Spinner)findViewById(taskBoxId);
Cursor tasks = controller.getActiveTaskListCursor();
startManagingCursor(tasks);
SimpleCursorAdapter tasksAdapter = new SimpleCursorAdapter(TaskEdit.this,
android.R.layout.simple_list_item_1, tasks,
new String[] { TaskModelForList.getNameField() },
new int[] { android.R.id.text1 });
taskBox.setAdapter(tasksAdapter);
activatedCheckBox.setOnCheckedChangeListener(
new OnCheckedChangeListener() {
public void onCheckedChanged(CompoundButton buttonView,
boolean isChecked) {
taskBox.setEnabled(isChecked);
}
});
}
public void setBlockingOn(TaskIdentifier value) {
activatedCheckBox.setChecked(value != null);
if(value == null) {
return;
}
for(int i = 0; i < taskBox.getCount(); i++)
if(taskBox.getItemIdAtPosition(i) == value.getId()) {
taskBox.setSelection(i);
return;
}
// not found
activatedCheckBox.setChecked(false);
}
public TaskIdentifier getBlockingOn() {
if(!activatedCheckBox.isChecked())
return null;
return new TaskIdentifier(taskBox.getSelectedItemId());
}
}
}

@ -83,6 +83,7 @@ import com.timsu.astrid.widget.NumberPicker;
import com.timsu.astrid.widget.NumberPickerDialog;
import com.timsu.astrid.widget.NNumberPickerDialog.OnNNumberPickedListener;
import com.timsu.astrid.widget.NumberPickerDialog.OnNumberPickedListener;
import com.todoroo.astrid.activity.TaskEditActivity;
/**
* Primary view for the Astrid Application. Lists all of the tasks in the
@ -797,8 +798,8 @@ public class TaskListSubActivity extends SubActivity {
class TaskListHooks implements TaskListAdapterHooks {
private HashMap<TaskModelForList, String> myTaskTags;
private List<TaskModelForList> myTaskArray;
private final HashMap<TaskModelForList, String> myTaskTags;
private final List<TaskModelForList> myTaskArray;
public TaskListHooks() {
this.myTaskTags = context.taskTags;
@ -1033,12 +1034,7 @@ public class TaskListSubActivity extends SubActivity {
/** Call an activity to create the given task */
private void createTask(Character startCharacter) {
Intent intent = new Intent(getParent(), TaskEdit.class);
if (context.filterTag != null)
intent.putExtra(TaskEdit.TAG_NAME_TOKEN, context.filterTag
.getName());
if (startCharacter != null)
intent.putExtra(TaskEdit.START_CHAR_TOKEN, startCharacter);
Intent intent = new Intent(getParent(), TaskEditActivity.class);
launchActivity(intent, ACTIVITY_CREATE);
}
@ -1062,8 +1058,8 @@ public class TaskListSubActivity extends SubActivity {
/** Take you to the task edit page */
private void editTask(TaskModelForList task) {
Intent intent = new Intent(getParent(), TaskEdit.class);
intent.putExtra(TaskEdit.LOAD_INSTANCE_TOKEN, task.getTaskIdentifier()
Intent intent = new Intent(getParent(), TaskEditActivity.class);
intent.putExtra(TaskEditActivity.ID_TOKEN, task.getTaskIdentifier()
.getId());
launchActivity(intent, ACTIVITY_EDIT);
}

@ -16,10 +16,10 @@ import android.view.View;
import android.widget.RemoteViews;
import com.timsu.astrid.R;
import com.timsu.astrid.activities.TaskEdit;
import com.timsu.astrid.activities.TaskList;
import com.timsu.astrid.data.task.TaskController;
import com.timsu.astrid.data.task.TaskModelForWidget;
import com.todoroo.astrid.activity.TaskEditActivity;
import com.todoroo.astrid.service.AstridDependencyInjector;
public class AstridAppWidgetProvider extends AppWidgetProvider {
@ -114,7 +114,7 @@ public class AstridAppWidgetProvider extends AppWidgetProvider {
views.setTextColor(textIDs[i], textColor);
}
Intent editIntent = new Intent(context, TaskEdit.class);
Intent editIntent = new Intent(context, TaskEditActivity.class);
pendingIntent = PendingIntent.getActivity(context, 0,
editIntent, 0);
views.setOnClickPendingIntent(R.id.widget_button, pendingIntent);

@ -36,7 +36,6 @@ import android.database.sqlite.SQLiteOpenHelper;
import android.net.Uri;
import android.util.Log;
import com.timsu.astrid.activities.TaskEdit;
import com.timsu.astrid.activities.TaskListSubActivity;
import com.timsu.astrid.appwidget.AstridAppWidgetProvider.UpdateService;
import com.timsu.astrid.data.AbstractController;
@ -342,8 +341,8 @@ public class TaskController extends AbstractController {
// create new start and end date for this event
ContentValues newValues = new ContentValues();
TaskEdit.createCalendarStartEndTimes(task.getPreferredDueDate(),
task.getDefiniteDueDate(), estimated, newValues);
/*TaskEditActivity.createCalendarStartEndTimes(task.getPreferredDueDate(),
task.getDefiniteDueDate(), estimated, newValues); TODO */
cr.update(uri, newValues, null, null);
}
} catch (Exception e) {

File diff suppressed because it is too large Load Diff

@ -72,15 +72,14 @@ public class TaskListActivity extends ListActivity implements OnScrollListener {
// --- menu codes
private static final int MENU_ADD_TASK_ID = Menu.FIRST + 0;
private static final int MENU_PLUGINS_ID = Menu.FIRST + 1;
private static final int MENU_ADDONS_ID = Menu.FIRST + 1;
private static final int MENU_SETTINGS_ID = Menu.FIRST + 2;
private static final int MENU_HELP_ID = Menu.FIRST + 3;
private static final int MENU_PLUGIN_INTENT_ID = Menu.FIRST + 4;
private static final int MENU_ADDON_INTENT_ID = Menu.FIRST + 4;
private static final int CONTEXT_MENU_EDIT_TASK_ID = Menu.FIRST + 5;
private static final int CONTEXT_MENU_DELETE_TASK_ID = Menu.FIRST + 6;
private static final int CONTEXT_MENU_PLUGIN_INTENT_ID = Menu.FIRST + 7;
private static final int CONTEXT_MENU_ADDON_INTENT_ID = Menu.FIRST + 7;
// --- constants
@ -159,12 +158,8 @@ public class TaskListActivity extends ListActivity implements OnScrollListener {
MenuItem item;
item = menu.add(Menu.NONE, MENU_ADD_TASK_ID, Menu.NONE,
R.string.TLA_menu_add);
item.setIcon(android.R.drawable.ic_menu_add);
item = menu.add(Menu.NONE, MENU_PLUGINS_ID, Menu.NONE,
R.string.TLA_menu_plugins);
item = menu.add(Menu.NONE, MENU_ADDONS_ID, Menu.NONE,
R.string.TLA_menu_addons);
item.setIcon(android.R.drawable.ic_menu_set_as);
item = menu.add(Menu.NONE, MENU_SETTINGS_ID, Menu.NONE,
@ -182,7 +177,7 @@ public class TaskListActivity extends ListActivity implements OnScrollListener {
int length = resolveInfoList.size();
for(int i = 0; i < length; i++) {
ResolveInfo resolveInfo = resolveInfoList.get(i);
item = menu.add(Menu.NONE, MENU_PLUGIN_INTENT_ID, Menu.NONE,
item = menu.add(Menu.NONE, MENU_ADDON_INTENT_ID, Menu.NONE,
resolveInfo.loadLabel(pm));
item.setIcon(resolveInfo.loadIcon(pm));
Intent intent = new Intent(AstridApiConstants.ACTION_TASK_LIST_MENU);
@ -438,7 +433,7 @@ public class TaskListActivity extends ListActivity implements OnScrollListener {
long taskId = task.getId();
for(int i = 0; i < contextMenuItemCache.length; i++) {
Intent intent = contextMenuItemCache[i].getRight();
MenuItem item = menu.add(id, CONTEXT_MENU_PLUGIN_INTENT_ID, Menu.NONE,
MenuItem item = menu.add(id, CONTEXT_MENU_ADDON_INTENT_ID, Menu.NONE,
contextMenuItemCache[i].getLeft());
intent.putExtra(AstridApiConstants.EXTRAS_TASK_ID, taskId);
item.setIntent(intent);
@ -468,16 +463,11 @@ public class TaskListActivity extends ListActivity implements OnScrollListener {
// handle my own menus
switch (item.getItemId()) {
case MENU_ADD_TASK_ID:
intent = new Intent(TaskListActivity.this, TaskEditActivity.class);
intent.putExtra(TaskEditActivity.ID_TOKEN, Task.NO_ID);
startActivityForResult(intent, ACTIVITY_EDIT_TASK);
return true;
case MENU_PLUGINS_ID:
case MENU_ADDONS_ID:
dialogUtilities.okDialog(
this,
"if this were real life, I would display your " + //$NON-NLS-1$
"plugins so you could enable/disable/rearrange them.", //$NON-NLS-1$
"add-ons so you could enable/disable/rearrange them.", //$NON-NLS-1$
null);
return true;
case MENU_SETTINGS_ID:
@ -490,7 +480,7 @@ public class TaskListActivity extends ListActivity implements OnScrollListener {
// context menu items
case CONTEXT_MENU_PLUGIN_INTENT_ID: {
case CONTEXT_MENU_ADDON_INTENT_ID: {
intent = item.getIntent();
AndroidUtilities.startExternalIntent(this, intent);
return true;

@ -55,7 +55,6 @@ public class TaskAdapter extends CursorAdapter {
Task.ID,
Task.TITLE,
Task.IMPORTANCE,
Task.URGENCY,
Task.DUE_DATE,
Task.COMPLETION_DATE,
Task.HIDE_UNTIL,
@ -189,7 +188,7 @@ public class TaskAdapter extends CursorAdapter {
if(isFling) {
viewHolder.details.removeViews(2, viewHolder.details.getChildCount() - 2);
viewHolder.dueDate.setVisibility(View.INVISIBLE);
viewHolder.nameView.setText(R.string.TAd_isFling);
viewHolder.nameView.setText(R.string.TAd_flingText);
viewHolder.importance.setVisibility(View.INVISIBLE);
viewHolder.completeBox.setVisibility(View.INVISIBLE);
return;
@ -236,9 +235,7 @@ public class TaskAdapter extends CursorAdapter {
"$D", dateValue).replace("$T", timeValue); //$NON-NLS-1$ //$NON-NLS-2$
dueDateView.setText(string);
} else {
String string = r.getString(R.string.TAd_dueDate).replace(
"$D", dateValue); //$NON-NLS-1$
dueDateView.setText(string);
dueDateView.setText(dateValue);
}
setVisibility(dueDateView);
} else {

@ -6,6 +6,8 @@
package com.todoroo.astrid.model;
import java.util.Date;
import android.content.ContentValues;
import android.content.res.Resources;
@ -42,10 +44,6 @@ public final class Task extends AbstractModel {
public static final StringProperty TITLE = new StringProperty(
TABLE, "title");
/** Urgency of Task (see urgency flags) */
public static final IntegerProperty URGENCY = new IntegerProperty(
TABLE, "urgency");
/** Importance of Task (see importance flags) */
public static final IntegerProperty IMPORTANCE = new IntegerProperty(
TABLE, "importance");
@ -113,17 +111,7 @@ public final class Task extends AbstractModel {
/** List of all properties for this model */
public static final Property<?>[] PROPERTIES = generateProperties(Task.class);
// --- urgency settings
public static final int URGENCY_NONE = 0;
public static final int URGENCY_TODAY = 1;
public static final int URGENCY_THIS_WEEK = 2;
public static final int URGENCY_THIS_MONTH = 3;
public static final int URGENCY_WITHIN_THREE_MONTHS = 4;
public static final int URGENCY_WITHIN_SIX_MONTHS = 5;
public static final int URGENCY_WITHIN_A_YEAR = 6;
public static final int URGENCY_SPECIFIC_DAY = 7;
public static final int URGENCY_SPECIFIC_DAY_TIME = 8;
// --- flags
// --- importance settings
@ -158,7 +146,6 @@ public final class Task extends AbstractModel {
defaultValues.put(HIDE_UNTIL.name, 0);
defaultValues.put(COMPLETION_DATE.name, 0);
defaultValues.put(DELETION_DATE.name, 0);
defaultValues.put(URGENCY.name, URGENCY_NONE);
defaultValues.put(IMPORTANCE.name, IMPORTANCE_NONE);
defaultValues.put(CALENDAR_URI.name, "");
@ -254,4 +241,36 @@ public final class Task extends AbstractModel {
return getValue(DUE_DATE) > 0;
}
/**
* @return true if hours, minutes, and seconds indicate end of day
*/
private boolean isEndOfDay(Date date) {
return date.getHours() == 23 && date.getMinutes() == 59 &&
date.getSeconds() == 59;
}
/**
* Sets due date for this task. If this due date has no time associated,
* we move it to the last millisecond of the day.
*
* @param date
* @param hasDueTime
*/
public void setDueDate(Date dueDate, boolean hasDueTime) {
if(!hasDueTime) {
dueDate.setHours(23);
dueDate.setMinutes(59);
dueDate.setSeconds(59);
} else if(isEndOfDay(dueDate)) {
dueDate.setSeconds(58);
}
setValue(Task.DUE_DATE, dueDate.getTime());
}
/**
* Checks whether this due date has a due time or only a date
*/
public boolean hasDueTime() {
return isEndOfDay(new Date(getValue(DUE_DATE)));
}
}

@ -65,20 +65,17 @@ public class TaskService {
}
/**
* Delete the given task. If this task had a title, instead of deleting
* from the database, we set the deleted flag.
* Delete the given task. Instead of deleting from the database, we set
* the deleted flag.
*
* @param model
*/
public void delete(Task item) {
if(!item.isSaved())
return;
if(item.getValue(Task.TITLE).length() == 0)
taskDao.delete(item.getId());
else {
item.setValue(Task.DELETION_DATE, DateUtilities.now());
taskDao.save(item, false);
}
item.clear();
item.setValue(Task.DELETION_DATE, DateUtilities.now());
taskDao.save(item, false);
}
/**

@ -24,7 +24,7 @@ public class Preferences {
if(getIntegerFromString(R.string.EPr_default_urgency_key) == null) {
editor.putString(r.getString(R.string.EPr_default_urgency_key),
Integer.toString(Task.URGENCY_THIS_WEEK));
Integer.toString(4));
}
if(getIntegerFromString(R.string.EPr_default_importance_key) == null) {
editor.putString(r.getString(R.string.EPr_default_importance_key),

@ -0,0 +1,68 @@
task edit
<!-- title bar -->
<string name="taskEdit_titleGeneric">Astrid: Editing Task</string>
<string name="taskEdit_titlePrefix">Astrid: Editing </string>
<string name="taskEdit_label">Astrid: New Task</string>
<!-- tabs -->
<string name="taskEdit_tab_basic">Basic</string>
<string name="taskEdit_tab_dates">Dates</string>
<string name="taskEdit_tab_alerts">Alerts</string>
<!-- labels -->
<string name="name_label">Summary</string>
<string name="name_hint">Task Name</string>
<string name="importance_label">How Important is it?</string>
<string name="tags_label">Tags:</string>
<string name="tag_hint">Tag Name</string>
<string name="estimatedDuration_label">How Long Will it Take?</string>
<string name="elapsedDuration_label">Time Already Spent on Task</string>
<string name="definiteDueDate_label">Absolute Deadline</string>
<string name="preferredDueDate_label">Goal Deadline</string>
<string name="addToCalendar_label">Add Task To Calendar</string>
<string name="showCalendar_label">Open Calendar Event</string>
<string name="hiddenUntil_label">Hide Until This Date</string>
<string name="repeat_label">Repeat Every</string>
<string name="repeat_value_unset">No Repeat Set</string>
<string name="blockingOn_label">Hide Until This Task is Done</string>
<string name="notes_label">Notes</string>
<string name="notes_hint">Enter Task Notes</string>
<string name="notification_label">Periodic Reminders</string>
<string name="notification_prefix">Every</string>
<string name="flags_label">Notify me...</string>
<string name="flag_before">As Deadlines Approach</string>
<string name="flag_during">At Deadlines</string>
<string name="flag_after">After Absolute Deadline Passes</string>
<string name="flag_nonstop">Alarm Clock Mode</string>
<string name="alerts_label">Fixed Reminders</string>
<string name="add_alert">Add New Reminder</string>
<!-- dialog boxes -->
<string name="hour_minutes_dialog">Time (hours : minutes)</string>
<string name="notification_dialog">Remind Me Every</string>
<string name="repeat_picker_title">Repeat Every (0 to disable)</string>
<string name="repeat_help_dialog_title">Help: Astrid Repeats</string>
<string name="repeat_help_dialog">
To use repeats, set at least one of the deadlines above. When you complete this task, the deadline will be automatically advanced.
\n\n
If you don\'t want to see the new task right after you complete the old one, you should use the \"Hide Until\" field, which will also be advanced automatically.
\n
</string>
<string name="repeat_help_hide">Don\'t Show Help Anymore</string>
<!-- buttons -->
<string name="save_label">Save</string>
<string name="discard_label">Discard</string>
<string name="edit_label">Edit</string>
<string name="delete_label">Delete</string>
<string name="blank_button_title">Click to Set</string>
<string name="startTimer_label">Start Timer</string>
<string name="stopTimer_label">Stop Timer</string>
<string name="taskEdit_menu_save">Save</string>
<string name="taskEdit_onTaskSave_Due">Task Saved: due in %s</string>
<string name="taskEdit_onTaskSave_Overdue">Task Saved: due %s ago</string>
<string name="taskEdit_onTaskSave_notDue">Task Saved</string>
Loading…
Cancel
Save