New edit page in its entirety

pull/14/head
Sam Bosley 13 years ago
parent a1c6349c97
commit 0577a5d865

@ -81,7 +81,8 @@
</intent-filter>
</activity>
<activity android:name="com.todoroo.astrid.welcome.WelcomeLogin"
android:windowSoftInputMode="stateHidden">
android:windowSoftInputMode="stateHidden"
android:screenOrientation="portrait">
</activity>
<activity android:name="com.todoroo.astrid.welcome.WelcomeGraphic"
android:windowSoftInputMode="stateHidden">
@ -145,7 +146,7 @@
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="vnd.android.cursor.item/task" />
</intent-filter>
</activity>
</activity>
<!-- Activity that selects and installs add-ons -->
<activity android:name="com.todoroo.astrid.activity.AddOnActivity"
android:windowSoftInputMode="stateHidden" />
@ -348,13 +349,13 @@
android:windowSoftInputMode="stateHidden"/>
<activity android:name="com.todoroo.astrid.actfm.TagUpdatesActivity"
android:windowSoftInputMode="stateHidden"/>
<receiver android:name="com.todoroo.astrid.actfm.EditPeopleExposer">
<!-- <receiver android:name="com.todoroo.astrid.actfm.EditPeopleExposer">
<intent-filter>
<action android:name="com.todoroo.astrid.REQUEST_ACTIONS" />
<action android:name="com.todoroo.astrid.EDIT_PEOPLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>
</receiver> -->
<receiver android:name="com.timsu.astrid.C2DMReceiver" permission="com.google.android.c2dm.permission.SEND">
<!-- Receive the actual message -->
<intent-filter>
@ -500,22 +501,22 @@
</receiver>
<activity android:name="com.todoroo.astrid.notes.EditNoteActivity"
android:theme="@style/Theme.Dialog"/>
<receiver android:name="com.todoroo.astrid.notes.EditNoteExposer">
<!-- <receiver android:name="com.todoroo.astrid.notes.EditNoteExposer">
<intent-filter>
<action android:name="com.todoroo.astrid.REQUEST_ACTIONS" />
<action android:name="com.todoroo.astrid.EDIT_NOTES" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>
</receiver> -->
<!-- timers -->
<receiver android:name="com.todoroo.astrid.timers.TimerActionExposer">
<!-- <receiver android:name="com.todoroo.astrid.timers.TimerActionExposer">
<intent-filter>
<action android:name="com.todoroo.astrid.REQUEST_ACTIONS" />
<action android:name="com.todoroo.astrid.TIMER_BUTTON" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>
</receiver> -->
<receiver android:name="com.todoroo.astrid.timers.TimerFilterExposer">
<intent-filter android:priority="10000">
<action android:name="com.todoroo.astrid.REQUEST_FILTERS" />

@ -1,5 +1,8 @@
package com.todoroo.astrid.actfm;
import android.content.res.Resources;
import android.preference.Preference;
import com.timsu.astrid.R;
import com.todoroo.andlib.service.Autowired;
import com.todoroo.astrid.actfm.sync.ActFmPreferenceService;
@ -45,4 +48,18 @@ public class ActFmPreferences extends SyncProviderPreferences {
new ActFmBackgroundService().scheduleService();
}
@Override
public void updatePreferences(Preference preference, Object value) {
final Resources r = getResources();
if (r.getString(R.string.actfm_https_key).equals(preference.getKey())) {
if ((Boolean)value)
preference.setSummary(R.string.actfm_https_enabled);
else
preference.setSummary(R.string.actfm_https_disabled);
} else {
super.updatePreferences(preference, value);
}
}
}

@ -12,19 +12,22 @@ import org.json.JSONException;
import org.json.JSONObject;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.Intent;
import android.graphics.Color;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.Spinner;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
@ -39,7 +42,6 @@ import com.todoroo.astrid.actfm.sync.ActFmInvoker;
import com.todoroo.astrid.actfm.sync.ActFmPreferenceService;
import com.todoroo.astrid.actfm.sync.ActFmSyncService;
import com.todoroo.astrid.actfm.sync.ActFmSyncService.JsonHelper;
import com.todoroo.astrid.activity.TaskEditActivity.TaskEditControlSet;
import com.todoroo.astrid.api.AstridApiConstants;
import com.todoroo.astrid.dao.MetadataDao.MetadataCriteria;
import com.todoroo.astrid.data.Metadata;
@ -54,9 +56,10 @@ import com.todoroo.astrid.service.TaskService;
import com.todoroo.astrid.tags.TagService;
import com.todoroo.astrid.ui.PeopleContainer;
import com.todoroo.astrid.ui.PeopleContainer.OnAddNewPersonListener;
import com.todoroo.astrid.ui.PopupControlSet;
import com.todoroo.astrid.utility.Flags;
public class EditPeopleControlSet implements TaskEditControlSet {
public class EditPeopleControlSet extends PopupControlSet {
public static final String EXTRA_TASK_ID = "task"; //$NON-NLS-1$
@ -82,13 +85,19 @@ public class EditPeopleControlSet implements TaskEditControlSet {
private final CheckBox cbTwitter;
private final Spinner assignedSpinner;
private final View sharedWithRow;
private final EditText assignedCustom;
private final View sharedWithView;
private final Dialog sharedWithDialog;
private final ArrayList<AssignedToUser> spinnerValues = new ArrayList<AssignedToUser>();
private final ListView assignedList;
private final Activity activity;
private final TextView assignedDisplay;
private final EditText assignedCustom;
private final ArrayList<AssignedToUser> listValues = new ArrayList<AssignedToUser>();
private String saveToast = null;
@ -100,16 +109,28 @@ public class EditPeopleControlSet implements TaskEditControlSet {
// --- UI initialization
public EditPeopleControlSet(Activity activity, int loginRequestCode) {
public EditPeopleControlSet(Activity activity, int viewLayout, int displayViewLayout, int title, int loginRequestCode) {
super(activity, viewLayout, displayViewLayout, title);
DependencyInjectionService.getInstance().inject(this);
this.activity = activity;
this.loginRequestCode = loginRequestCode;
sharedWithContainer = (PeopleContainer) activity.findViewById(R.id.share_container);
assignedCustom = (EditText) activity.findViewById(R.id.assigned_custom);
assignedSpinner = (Spinner) activity.findViewById(R.id.assigned_spinner);
cbFacebook = (CheckBox) activity.findViewById(R.id.checkbox_facebook);
cbTwitter = (CheckBox) activity.findViewById(R.id.checkbox_twitter);
sharedWithRow = LayoutInflater.from(activity).inflate(R.layout.control_set_collaborators_display, null);
sharedWithView = LayoutInflater.from(activity).inflate(R.layout.control_set_collaborators, null);
sharedWithDialog = new AlertDialog.Builder(this.activity)
.setTitle(R.string.actfm_EPA_collaborators_header)
.setView(getSharedWithView())
.setPositiveButton(android.R.string.ok, null).create();
sharedWithDialog.setOwnerActivity(this.activity);
assignedCustom = (EditText) getView().findViewById(R.id.assigned_custom);
assignedList = (ListView) getView().findViewById(R.id.assigned_list);
assignedList.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
assignedList.setItemsCanFocus(false);
assignedDisplay = (TextView) getDisplayView().findViewById(R.id.assigned_display);
sharedWithContainer = (PeopleContainer) getSharedWithView().findViewById(R.id.share_container);
cbFacebook = (CheckBox) getSharedWithView().findViewById(R.id.checkbox_facebook);
cbTwitter = (CheckBox) getSharedWithView().findViewById(R.id.checkbox_twitter);
sharedWithContainer.addPerson(""); //$NON-NLS-1$
setUpListeners();
@ -121,6 +142,14 @@ public class EditPeopleControlSet implements TaskEditControlSet {
setUpData();
}
public View getSharedWithRow() {
return sharedWithRow;
}
private View getSharedWithView() {
return sharedWithView;
}
@SuppressWarnings("nls")
private void setUpData() {
try {
@ -197,7 +226,7 @@ public class EditPeopleControlSet implements TaskEditControlSet {
@Override
public void run() {
HashSet<Long> userIds = new HashSet<Long>();
LinearLayout collaborators = (LinearLayout) activity.findViewById(R.id.collaborators);
LinearLayout collaborators = (LinearLayout) getSharedWithView().findViewById(R.id.collaborators);
for(JSONObject person : sharedPeople) {
if(person == null)
@ -256,7 +285,7 @@ public class EditPeopleControlSet implements TaskEditControlSet {
sharedPeople.add(0, myself);
// de-duplicate by user id and/or email
spinnerValues.clear();
listValues.clear();
for(int i = 0; i < sharedPeople.size(); i++) {
JSONObject person = sharedPeople.get(i);
if(person == null)
@ -275,7 +304,7 @@ public class EditPeopleControlSet implements TaskEditControlSet {
if(id == 0)
name = activity.getString(R.string.actfm_EPA_assign_me);
AssignedToUser atu = new AssignedToUser(name, person);
spinnerValues.add(atu);
listValues.add(atu);
if(names.containsKey(name)) {
AssignedToUser user = names.get(name);
if(user != null && user.user.has("email")) {
@ -288,21 +317,19 @@ public class EditPeopleControlSet implements TaskEditControlSet {
if(!TextUtils.isEmpty("email"))
atu.label = email;
else
spinnerValues.remove(atu);
listValues.remove(atu);
} else
names.put(name, atu);
}
spinnerValues.add(new AssignedToUser(activity.getString(R.string.actfm_EPA_assign_custom), null));
String assignedStr = task.getValue(Task.USER);
int assignedIndex = 0;
if (!TextUtils.isEmpty(assignedStr)) {
JSONObject assigned = new JSONObject(assignedStr);
long assignedId = assigned.optLong("id", -1);
String assignedEmail = assigned.optString("email");
for (int i = 0; i < spinnerValues.size(); i++) {
JSONObject user = spinnerValues.get(i).user;
for (int i = 0; i < listValues.size(); i++) {
JSONObject user = listValues.get(i).user;
if (user != null) {
if (user.optLong("id") == assignedId || (user.optString("email").equals(assignedEmail) && !(TextUtils.isEmpty(assignedEmail))))
assignedIndex = i;
@ -312,59 +339,59 @@ public class EditPeopleControlSet implements TaskEditControlSet {
final int selected = assignedIndex;
final ArrayAdapter<AssignedToUser> usersAdapter = new ArrayAdapter<AssignedToUser>(activity,
android.R.layout.simple_spinner_item, spinnerValues);
usersAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
android.R.layout.simple_list_item_single_choice, listValues);
activity.runOnUiThread(new Runnable() {
@Override
public void run() {
assignedSpinner.setAdapter(usersAdapter);
assignedSpinner.setSelection(selected);
assignedList.setAdapter(usersAdapter);
assignedList.setItemChecked(selected, true);
refreshDisplayView();
}
});
}
private void setUpListeners() {
final View assignedClear = activity.findViewById(R.id.assigned_clear);
final View assignedClear = getView().findViewById(R.id.assigned_clear);
assignedSpinner.setOnItemSelectedListener(new OnItemSelectedListener() {
assignedList.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View v,
int index, long id) {
if(index == spinnerValues.size() - 1) {
assignedCustom.setVisibility(View.VISIBLE);
assignedClear.setVisibility(View.VISIBLE);
assignedSpinner.setVisibility(View.GONE);
assignedCustom.requestFocus();
}
}
@Override
public void onNothingSelected(AdapterView<?> arg0) {
//
public void onItemClick(AdapterView<?> arg0, View arg1, int position,
long id) {
AssignedToUser user = (AssignedToUser) assignedList.getAdapter().getItem(position);
assignedDisplay.setText(user.toString());
assignedCustom.setText("");
refreshDisplayView();
DialogUtilities.dismissDialog(activity, dialog);
}
});
assignedClear.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
assignedCustom.setVisibility(View.GONE);
assignedClear.setVisibility(View.GONE);
assignedCustom.setText(""); //$NON-NLS-1$
assignedSpinner.setVisibility(View.VISIBLE);
assignedSpinner.setSelection(0);
assignedCustom.setText("");
assignedList.setItemChecked(0, true);
}
});
sharedWithContainer.setOnAddNewPerson(new OnAddNewPersonListener() {
@Override
public void textChanged(String text) {
activity.findViewById(R.id.share_additional).setVisibility(View.VISIBLE);
getSharedWithView().findViewById(R.id.share_additional).setVisibility(View.VISIBLE);
if(text.indexOf('@') > -1) {
activity.findViewById(R.id.tag_label).setVisibility(View.VISIBLE);
activity.findViewById(R.id.tag_name).setVisibility(View.VISIBLE);
getSharedWithView().findViewById(R.id.tag_label).setVisibility(View.VISIBLE);
getSharedWithView().findViewById(R.id.tag_name).setVisibility(View.VISIBLE);
}
}
});
sharedWithRow.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
sharedWithDialog.show();
}
});
}
// --- events
@ -390,11 +417,13 @@ public class EditPeopleControlSet implements TaskEditControlSet {
try {
JSONObject userJson = null;
TextView assignedView = null;
if(assignedCustom.getVisibility() == View.VISIBLE) {
if(!TextUtils.isEmpty(assignedCustom.getText())) {
userJson = PeopleContainer.createUserJson(assignedCustom);
assignedView = assignedCustom;
} else if(assignedSpinner.getSelectedItem() != null) {
userJson = ((AssignedToUser) assignedSpinner.getSelectedItem()).user;
} else {
AssignedToUser item = (AssignedToUser) assignedList.getAdapter().getItem(assignedList.getCheckedItemPosition());
if (item != null)
userJson = item.user;
}
if (userJson != null) {
@ -634,13 +663,13 @@ public class EditPeopleControlSet implements TaskEditControlSet {
}
}
String message = ((TextView) activity.findViewById(R.id.message)).getText().toString();
if(!TextUtils.isEmpty(message) && activity.findViewById(R.id.share_additional).getVisibility() == View.VISIBLE) {
String message = ((TextView) getSharedWithView().findViewById(R.id.message)).getText().toString();
if(!TextUtils.isEmpty(message) && getSharedWithView().findViewById(R.id.share_additional).getVisibility() == View.VISIBLE) {
values.add("message");
values.add(message);
}
String tag = ((TextView) activity.findViewById(R.id.tag_name)).getText().toString();
String tag = ((TextView) getSharedWithView().findViewById(R.id.tag_name)).getText().toString();
if(!TextUtils.isEmpty(tag)) {
values.add("tag");
values.add(tag);
@ -655,4 +684,16 @@ public class EditPeopleControlSet implements TaskEditControlSet {
if(requestCode == loginRequestCode && resultCode == Activity.RESULT_OK)
saveSharingSettings(saveToast);
}
@Override
protected void refreshDisplayView() {
if (!TextUtils.isEmpty(assignedCustom.getText())) {
assignedDisplay.setText(assignedCustom.getText());
} else {
AssignedToUser user = (AssignedToUser) assignedList.getAdapter().getItem(assignedList.getCheckedItemPosition());
if (user == null)
user = (AssignedToUser) assignedList.getAdapter().getItem(0);
assignedDisplay.setText(user.toString());
}
}
}

@ -218,6 +218,8 @@ public class TagViewActivity extends TaskListActivity {
refreshData(false, false);
Preferences.setLong(fetchKey, DateUtilities.now());
}
} else {
((TextView)taskListView.findViewById(android.R.id.empty)).setText(R.string.TLA_no_items);
}
setUpMembersGallery();
@ -281,8 +283,10 @@ public class TagViewActivity extends TaskListActivity {
if(!bypassTagShow)
tagShowThread.start();
if(noRemoteId)
if(noRemoteId) {
((TextView)taskListView.findViewById(android.R.id.empty)).setText(R.string.TLA_no_items);
return;
}
setUpMembersGallery();
actFmSyncService.fetchTasksForTag(tagData, manual, new Runnable() {

@ -15,16 +15,18 @@ import org.json.JSONObject;
import android.util.Log;
import com.timsu.astrid.R;
import com.todoroo.andlib.service.Autowired;
import com.todoroo.andlib.service.DependencyInjectionService;
import com.todoroo.andlib.service.RestClient;
import com.todoroo.andlib.utility.Pair;
import com.todoroo.andlib.utility.Preferences;
@SuppressWarnings("nls")
public class ActFmInvoker {
/** NOTE: these values are development values & will not work on production */
private static final String URL = "http://10.0.2.2:3000/api/";
private static final String URL = "//10.0.0.2:3000/api/";
private static final String APP_ID = "a4732a32859dbcd3e684331acd36432c";
private static final String APP_SECRET = "e389bfc82a0d932332f9a8bd8203735f";
@ -187,7 +189,12 @@ public class ActFmInvoker {
String url = URL;
if (method.startsWith("/"))
url = url.replaceAll("/api/", "");
url = url.replaceFirst("/api/", "");
if (Preferences.getBoolean(R.string.actfm_https_key, false))
url = "https:" + url;
else
url = "http:" + url;
StringBuilder requestBuilder = new StringBuilder(url).append(method).append('?');
StringBuilder sigBuilder = new StringBuilder();
for(Pair<String, Object> entry : params) {

@ -6,7 +6,6 @@ import java.util.LinkedHashSet;
import android.app.Activity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.LinearLayout;
@ -15,9 +14,9 @@ import com.timsu.astrid.R;
import com.todoroo.andlib.data.TodorooCursor;
import com.todoroo.andlib.utility.DateUtilities;
import com.todoroo.andlib.widget.DateControlSet;
import com.todoroo.astrid.activity.TaskEditActivity.TaskEditControlSet;
import com.todoroo.astrid.data.Metadata;
import com.todoroo.astrid.data.Task;
import com.todoroo.astrid.helper.TaskEditControlSet;
/**
* Control set to manage adding and removing tags
@ -25,19 +24,19 @@ import com.todoroo.astrid.data.Task;
* @author Tim Su <tim@todoroo.com>
*
*/
public final class AlarmControlSet implements TaskEditControlSet {
public final class AlarmControlSet extends TaskEditControlSet {
// --- instance variables
private final LinearLayout alertsContainer;
private final Activity activity;
public AlarmControlSet(Activity activity, ViewGroup parent) {
View v = LayoutInflater.from(activity).inflate(R.layout.alarm_control, parent, true);
public AlarmControlSet(Activity activity, int layout) {
//View v = LayoutInflater.from(activity).inflate(R.layout.alarm_control, parent, true);
super(activity, layout);
this.activity = activity;
this.alertsContainer = (LinearLayout) v.findViewById(R.id.alert_container);
v.findViewById(R.id.alarms_add).setOnClickListener(new View.OnClickListener() {
this.alertsContainer = (LinearLayout) getView().findViewById(R.id.alert_container);
getView().findViewById(R.id.alarms_add).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
addAlarm(new Date());

@ -205,7 +205,7 @@ public class CustomFilterActivity extends ListActivity {
Integer.toString(Task.IMPORTANCE_NONE),
};
String[] entries = new String[] {
"!!!!", "!!!", "!!", "!"
"!!!", "!!", "!", "o"
};
ContentValues values = new ContentValues();
values.put(Task.IMPORTANCE.name, "?");

@ -26,7 +26,7 @@ import com.todoroo.astrid.api.TaskDecoration;
import com.todoroo.astrid.data.Task;
/**
* Exposes {@link TaskDecoration} for timers
* Exposes {@link TaskDecoration} for phone numbers, emails, urls, etc
*
* @author Tim Su <tim@todoroo.com>
*

@ -1,5 +1,8 @@
package com.todoroo.astrid.gcal;
import java.util.ArrayList;
import java.util.Collections;
import android.app.Activity;
import android.content.ContentResolver;
import android.content.ContentValues;
@ -8,16 +11,14 @@ import android.database.Cursor;
import android.net.Uri;
import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.LinearLayout;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;
import com.timsu.astrid.R;
@ -25,11 +26,11 @@ import com.todoroo.andlib.service.Autowired;
import com.todoroo.andlib.service.DependencyInjectionService;
import com.todoroo.andlib.service.ExceptionService;
import com.todoroo.andlib.utility.Preferences;
import com.todoroo.astrid.activity.TaskEditActivity.TaskEditControlSet;
import com.todoroo.astrid.data.Task;
import com.todoroo.astrid.gcal.Calendars.CalendarResult;
import com.todoroo.astrid.service.StatisticsConstants;
import com.todoroo.astrid.service.StatisticsService;
import com.todoroo.astrid.ui.PopupControlSet;
/**
* Control Set for managing repeats
@ -37,7 +38,7 @@ import com.todoroo.astrid.service.StatisticsService;
* @author Tim Su <tim@todoroo.com>
*
*/
public class GCalControlSet implements TaskEditControlSet {
public class GCalControlSet extends PopupControlSet {
// --- instance variables
@ -50,65 +51,39 @@ public class GCalControlSet implements TaskEditControlSet {
private Task myTask;
private final CalendarResult calendars;
private final CheckBox addToCalendar;
private boolean hasEvent = false;
private final Spinner calendarSelector;
private final Button viewCalendarEvent;
public GCalControlSet(final Activity activity, ViewGroup parent) {
public GCalControlSet(final Activity activity, int viewLayout, int displayViewLayout, int title) {
super(activity, viewLayout, displayViewLayout, title);
DependencyInjectionService.getInstance().inject(this);
((LinearLayout) getDisplayView()).addView(getView()); //hack for spinner
this.activity = activity;
LayoutInflater.from(activity).inflate(R.layout.gcal_control, parent, true);
this.addToCalendar = (CheckBox) activity.findViewById(R.id.add_to_calendar);
this.calendarSelector = (Spinner) activity.findViewById(R.id.calendars);
this.viewCalendarEvent = (Button) activity.findViewById(R.id.view_calendar_event);
this.calendarSelector = (Spinner) getView().findViewById(R.id.calendars);
calendars = Calendars.getCalendars();
ArrayList<String> items = new ArrayList<String>();
Collections.addAll(items, calendars.calendars);
items.add(0, activity.getString(R.string.gcal_TEA_nocal));
ArrayAdapter<String> adapter = new ArrayAdapter<String>(activity,
android.R.layout.simple_spinner_item, calendars.calendars);
android.R.layout.simple_spinner_item, items.toArray(new String[items.size()]));
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
calendarSelector.setPromptId(title);
calendarSelector.setAdapter(adapter);
calendarSelector.setSelection(calendars.defaultIndex);
addToCalendar.setOnCheckedChangeListener(new OnCheckedChangeListener() {
calendarSelector.setOnItemSelectedListener(new OnItemSelectedListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
calendarSelector.setVisibility(isChecked ? View.VISIBLE : View.GONE);
public void onItemSelected(AdapterView<?> arg0, View arg1,
int arg2, long arg3) {
refreshDisplayView();
}
});
viewCalendarEvent.setOnClickListener(new OnClickListener() {
@SuppressWarnings("nls")
@Override
public void onClick(View v) {
if(calendarUri == null)
return;
ContentResolver cr = activity.getContentResolver();
Cursor cursor = cr.query(calendarUri, new String[] { "dtstart", "dtend" },
null, null, null);
Intent intent = new Intent(Intent.ACTION_EDIT, calendarUri);
try {
if(cursor == null || cursor.getCount() == 0) {
// event no longer exists, recreate it
calendarUri = null;
writeToModel(myTask);
return;
}
cursor.moveToFirst();
intent.putExtra("beginTime", cursor.getLong(0));
intent.putExtra("endTime", cursor.getLong(1));
} catch (Exception e) {
Log.e("gcal-error", "Error opening calendar", e); //$NON-NLS-1$ //$NON-NLS-2$
Toast.makeText(activity, R.string.gcal_TEA_error, Toast.LENGTH_LONG);
} finally {
if(cursor != null)
cursor.close();
}
activity.startActivity(intent);
public void onNothingSelected(AdapterView<?> arg0) {
//nothing
}
});
}
@ -131,14 +106,13 @@ public class GCalControlSet implements TaskEditControlSet {
return;
}
addToCalendar.setVisibility(View.GONE);
calendarSelector.setVisibility(View.GONE);
viewCalendarEvent.setVisibility(View.VISIBLE);
hasEvent = true;
} catch (Exception e) {
exceptionService.reportError("unable-to-parse-calendar: " + //$NON-NLS-1$
task.getValue(Task.CALENDAR_URI), e);
}
}
refreshDisplayView();
}
@SuppressWarnings("nls")
@ -146,7 +120,7 @@ public class GCalControlSet implements TaskEditControlSet {
public String writeToModel(Task task) {
boolean gcalCreateEventEnabled = Preferences.getStringValue(R.string.gcal_p_default) != null &&
!Preferences.getStringValue(R.string.gcal_p_default).equals("-1");
if ((gcalCreateEventEnabled || addToCalendar.isChecked()) &&
if ((gcalCreateEventEnabled || calendarSelector.getSelectedItemPosition() != 0) &&
calendarUri == null) {
StatisticsService.reportEvent(StatisticsConstants.CREATE_CALENDAR_EVENT);
@ -154,13 +128,13 @@ public class GCalControlSet implements TaskEditControlSet {
ContentResolver cr = activity.getContentResolver();
ContentValues values = new ContentValues();
String calendarId = calendars.calendarIds[calendarSelector.getSelectedItemPosition()];
String calendarId = calendars.calendarIds[calendarSelector.getSelectedItemPosition() - 1];
values.put("calendar_id", calendarId);
calendarUri = GCalHelper.createTaskEvent(task, cr, values);
task.setValue(Task.CALENDAR_URI, calendarUri.toString());
if (addToCalendar.isChecked() && addToCalendar.isShown()) {
if (calendarSelector.getSelectedItemPosition() != 0 && !hasEvent) {
// pop up the new event
Intent intent = new Intent(Intent.ACTION_EDIT, calendarUri);
intent.putExtra("beginTime", values.getAsLong("dtstart"));
@ -196,4 +170,64 @@ public class GCalControlSet implements TaskEditControlSet {
return null;
}
private void viewCalendarEvent() {
if(calendarUri == null)
return;
ContentResolver cr = activity.getContentResolver();
Cursor cursor = cr.query(calendarUri, new String[] { "dtstart", "dtend" },
null, null, null);
Intent intent = new Intent(Intent.ACTION_EDIT, calendarUri);
try {
if(cursor == null || cursor.getCount() == 0) {
// event no longer exists, recreate it
calendarUri = null;
writeToModel(myTask);
return;
}
cursor.moveToFirst();
intent.putExtra("beginTime", cursor.getLong(0));
intent.putExtra("endTime", cursor.getLong(1));
} catch (Exception e) {
Log.e("gcal-error", "Error opening calendar", e); //$NON-NLS-1$ //$NON-NLS-2$
Toast.makeText(activity, R.string.gcal_TEA_error, Toast.LENGTH_LONG);
} finally {
if(cursor != null)
cursor.close();
}
activity.startActivity(intent);
}
@Override
protected void refreshDisplayView() {
TextView t = (TextView) getDisplayView().findViewById(R.id.calendar_display_title);
if (hasEvent) {
t.setText(R.string.gcal_TEA_showCalendar_label);
} else {
t.setText(R.string.gcal_TEA_addToCalendar_label);
TextView calendar = (TextView) getDisplayView().findViewById(R.id.calendar_display_which);
if (calendarSelector.getSelectedItemPosition() != 0) {
calendar.setText((String)calendarSelector.getSelectedItem());
} else {
calendar.setText("");
}
}
}
@Override
protected OnClickListener getDisplayClickListener() {
return new OnClickListener() {
@Override
public void onClick(View v) {
if (!hasEvent) {
calendarSelector.performClick();
} else {
viewCalendarEvent();
}
}
};
}
}

@ -4,9 +4,7 @@ import java.util.ArrayList;
import android.app.Activity;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
@ -22,7 +20,6 @@ import com.todoroo.andlib.service.Autowired;
import com.todoroo.andlib.service.DependencyInjectionService;
import com.todoroo.andlib.sql.Query;
import com.todoroo.andlib.utility.DateUtilities;
import com.todoroo.astrid.activity.TaskEditActivity.TaskEditControlSet;
import com.todoroo.astrid.dao.StoreObjectDao;
import com.todoroo.astrid.dao.StoreObjectDao.StoreObjectCriteria;
import com.todoroo.astrid.data.Metadata;
@ -30,6 +27,7 @@ import com.todoroo.astrid.data.MetadataApiDao.MetadataCriteria;
import com.todoroo.astrid.data.StoreObject;
import com.todoroo.astrid.data.Task;
import com.todoroo.astrid.service.MetadataService;
import com.todoroo.astrid.ui.PopupControlSet;
/**
* Control Set for managing contact/creator assignments in OpenCRX
@ -37,7 +35,7 @@ import com.todoroo.astrid.service.MetadataService;
* @author Andrey Marchenko <igendou@gmail.com>
*
*/
public class OpencrxControlSet implements TaskEditControlSet {
public class OpencrxControlSet extends PopupControlSet {
/**
* Class that represents OpenCRX ActivityCreator. Duplicates some functionality of OpenCRX plugin.
@ -203,22 +201,23 @@ public class OpencrxControlSet implements TaskEditControlSet {
private StoreObjectDao storeObjectDao;
@SuppressWarnings("unused")
public OpencrxControlSet(final Activity activity, ViewGroup parent) {
public OpencrxControlSet(final Activity activity, int viewLayout, int displayViewLayout, int title) {
super(activity, viewLayout, displayViewLayout, title);
DependencyInjectionService.getInstance().inject(this);
this.activity = activity;
View view = LayoutInflater.from(activity).inflate(R.layout.opencrx_control, parent, true);
//View view = LayoutInflater.from(activity).inflate(R.layout.opencrx_control, parent, true);
this.assignedToSelector = (Spinner) activity.findViewById(R.id.opencrx_TEA_task_assign);
this.assignedToSelector = (Spinner) getView().findViewById(R.id.opencrx_TEA_task_assign);
TextView emptyView = new TextView(activity);
emptyView.setText(activity.getText(R.string.opencrx_no_creator));
assignedToSelector.setEmptyView(emptyView);
this.creatorSelector = (Spinner) activity.findViewById(R.id.opencrx_TEA_dashboard_assign);
this.creatorSelector = (Spinner) getView().findViewById(R.id.opencrx_TEA_dashboard_assign);
this.assignedToTextInput = (AutoCompleteTextView) activity.findViewById(R.id.opencrx_TEA_contact_textinput);
this.creatorTextInput = (AutoCompleteTextView) activity.findViewById(R.id.opencrx_TEA_creator_textinput);
this.assignedToTextInput = (AutoCompleteTextView) getView().findViewById(R.id.opencrx_TEA_contact_textinput);
this.creatorTextInput = (AutoCompleteTextView) getView().findViewById(R.id.opencrx_TEA_creator_textinput);
}
@ -403,4 +402,9 @@ public class OpencrxControlSet implements TaskEditControlSet {
return ret;
}
@Override
protected void refreshDisplayView() {
// Nothing to do
}
}

@ -9,9 +9,7 @@ import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.ArrayAdapter;
@ -26,7 +24,6 @@ import com.todoroo.andlib.service.ExceptionService;
import com.todoroo.andlib.utility.DateUtilities;
import com.todoroo.andlib.utility.DialogUtilities;
import com.todoroo.andlib.utility.Preferences;
import com.todoroo.astrid.activity.TaskEditActivity.TaskEditControlSet;
import com.todoroo.astrid.data.Metadata;
import com.todoroo.astrid.data.StoreObject;
import com.todoroo.astrid.data.Task;
@ -36,6 +33,7 @@ import com.todoroo.astrid.producteev.sync.ProducteevSyncProvider;
import com.todoroo.astrid.producteev.sync.ProducteevTask;
import com.todoroo.astrid.producteev.sync.ProducteevUser;
import com.todoroo.astrid.service.MetadataService;
import com.todoroo.astrid.ui.PopupControlSet;
/**
* Control Set for managing task/dashboard assignments in Producteev
@ -43,13 +41,13 @@ import com.todoroo.astrid.service.MetadataService;
* @author Arne Jans <arne.jans@gmail.com>
*
*/
public class ProducteevControlSet implements TaskEditControlSet {
public class ProducteevControlSet extends PopupControlSet {
// --- instance variables
private final Activity activity;
private final View view;
//private final View view;
private Task myTask;
private final Spinner responsibleSelector;
private final Spinner dashboardSelector;
@ -62,19 +60,20 @@ public class ProducteevControlSet implements TaskEditControlSet {
private int lastDashboardSelection = 0;
public ProducteevControlSet(final Activity activity, ViewGroup parent) {
public ProducteevControlSet(final Activity activity, int layout, int displayViewLayout, int title) {
super(activity, layout, displayViewLayout, title);
DependencyInjectionService.getInstance().inject(this);
this.activity = activity;
view = LayoutInflater.from(activity).inflate(R.layout.producteev_control, parent, true);
//view = LayoutInflater.from(activity).inflate(R.layout.producteev_control, parent, true);
this.responsibleSelector = (Spinner) activity.findViewById(R.id.producteev_TEA_task_assign);
this.responsibleSelector = (Spinner) getView().findViewById(R.id.producteev_TEA_task_assign);
TextView emptyView = new TextView(activity);
emptyView.setText(activity.getText(R.string.producteev_no_dashboard));
responsibleSelector.setEmptyView(emptyView);
this.dashboardSelector = (Spinner) activity.findViewById(R.id.producteev_TEA_dashboard_assign);
this.dashboardSelector = (Spinner) getView().findViewById(R.id.producteev_TEA_dashboard_assign);
this.dashboardSelector.setOnItemSelectedListener(new OnItemSelectedListener() {
@Override
@ -176,7 +175,7 @@ public class ProducteevControlSet implements TaskEditControlSet {
int visibility = newUsers == null ? View.GONE : View.VISIBLE;
view.findViewById(R.id.producteev_TEA_task_assign_label).setVisibility(visibility);
getView().findViewById(R.id.producteev_TEA_task_assign_label).setVisibility(visibility);
responsibleSelector.setVisibility(visibility);
int responsibleSpinnerIndex = 0;
@ -233,7 +232,7 @@ public class ProducteevControlSet implements TaskEditControlSet {
|| ownerDashboard.getId() == ProducteevUtilities.DASHBOARD_CREATE) {
responsibleSelector.setEnabled(false);
responsibleSelector.setAdapter(null);
view.findViewById(R.id.producteev_TEA_task_assign_label).setVisibility(View.GONE);
getView().findViewById(R.id.producteev_TEA_task_assign_label).setVisibility(View.GONE);
return;
}
@ -275,4 +274,10 @@ public class ProducteevControlSet implements TaskEditControlSet {
}
return null;
}
@Override
protected void refreshDisplayView() {
// TODO Auto-generated method stub
}
}

@ -6,19 +6,19 @@ import java.util.Calendar;
import java.util.Date;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.LinearLayout;
import android.widget.Spinner;
import android.widget.TextView;
import com.google.ical.values.Frequency;
import com.google.ical.values.RRule;
@ -28,13 +28,13 @@ import com.timsu.astrid.R;
import com.todoroo.andlib.service.Autowired;
import com.todoroo.andlib.service.DependencyInjectionService;
import com.todoroo.andlib.service.ExceptionService;
import com.todoroo.astrid.activity.TaskEditActivity.TaskEditControlSet;
import com.todoroo.astrid.data.Task;
import com.todoroo.astrid.service.StatisticsConstants;
import com.todoroo.astrid.service.StatisticsService;
import com.todoroo.astrid.ui.NumberPicker;
import com.todoroo.astrid.ui.NumberPickerDialog;
import com.todoroo.astrid.ui.NumberPickerDialog.OnNumberPickedListener;
import com.todoroo.astrid.ui.PopupControlSet;
/**
* Control Set for managing repeats
@ -42,7 +42,7 @@ import com.todoroo.astrid.ui.NumberPickerDialog.OnNumberPickedListener;
* @author Tim Su <tim@todoroo.com>
*
*/
public class RepeatControlSet implements TaskEditControlSet {
public class RepeatControlSet extends PopupControlSet {
// --- spinner constants
@ -59,7 +59,8 @@ public class RepeatControlSet implements TaskEditControlSet {
// --- instance variables
private final Activity activity;
private final CheckBox enabled;
//private final CheckBox enabled;
private boolean doRepeat = true;
private final Button value;
private final Spinner interval;
private final Spinner type;
@ -75,18 +76,17 @@ public class RepeatControlSet implements TaskEditControlSet {
// --- implementation
public RepeatControlSet(final Activity activity, ViewGroup parent) {
public RepeatControlSet(Activity activity, int viewLayout, int displayViewLayout, int title) {
super(activity, viewLayout, displayViewLayout, title);
DependencyInjectionService.getInstance().inject(this);
this.activity = activity;
LayoutInflater.from(activity).inflate(R.layout.repeat_control, parent, true);
enabled = (CheckBox) activity.findViewById(R.id.repeatEnabled);
value = (Button) activity.findViewById(R.id.repeatValue);
interval = (Spinner) activity.findViewById(R.id.repeatInterval);
type = (Spinner) activity.findViewById(R.id.repeatType);
repeatContainer = (LinearLayout) activity.findViewById(R.id.repeatContainer);
daysOfWeekContainer = (LinearLayout) activity.findViewById(R.id.repeatDayOfWeekContainer);
value = (Button) getView().findViewById(R.id.repeatValue);
interval = (Spinner) getView().findViewById(R.id.repeatInterval);
type = (Spinner) getView().findViewById(R.id.repeatType);
repeatContainer = (LinearLayout) getView().findViewById(R.id.repeatContainer);
daysOfWeekContainer = (LinearLayout) getView().findViewById(R.id.repeatDayOfWeekContainer);
setRepeatValue(1);
// set up days of week
@ -109,12 +109,6 @@ public class RepeatControlSet implements TaskEditControlSet {
}
// set up listeners
enabled.setOnCheckedChangeListener(new OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
repeatContainer.setVisibility(isChecked ? View.VISIBLE : View.GONE);
}
});
value.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
repeatValueClick();
@ -233,21 +227,22 @@ public class RepeatControlSet implements TaskEditControlSet {
exceptionService.reportError("repeat-parse-exception", e);
}
}
enabled.setChecked(recurrence.length() > 0);
repeatContainer.setVisibility(enabled.isChecked() ? View.VISIBLE : View.GONE);
doRepeat = recurrence.length() > 0;
// read flag
if(task.getFlag(Task.FLAGS, Task.FLAG_REPEAT_AFTER_COMPLETION))
type.setSelection(TYPE_COMPLETION_DATE);
else
type.setSelection(TYPE_DUE_DATE);
refreshDisplayView();
}
@Override
public String writeToModel(Task task) {
String result;
if(!enabled.isChecked())
if(!doRepeat)
result = ""; //$NON-NLS-1$
else {
if(TextUtils.isEmpty(task.getValue(Task.RECURRENCE))) {
@ -300,4 +295,36 @@ public class RepeatControlSet implements TaskEditControlSet {
type.setSelection(1);
return null;
}
@Override
protected void refreshDisplayView() {
TextView repeatDisplay = (TextView) getDisplayView().findViewById(R.id.repeat_display);
if (doRepeat) {
repeatDisplay.setText(R.string.repeat_enabled);
} else {
repeatDisplay.setText(R.string.repeat_never);
}
}
@Override
protected AlertDialog.Builder getDialogBuilder(int title, DialogInterface.OnClickListener okListener, DialogInterface.OnCancelListener cancelListener) {
DialogInterface.OnClickListener dontRepeatButton = new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
doRepeat = false;
refreshDisplayView();
}
};
DialogInterface.OnClickListener doRepeatButton = new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
doRepeat = true;
refreshDisplayView();
}
};
return super.getDialogBuilder(title, okListener, cancelListener)
.setNegativeButton(R.string.repeat_dont, dontRepeatButton)
.setPositiveButton(android.R.string.ok, doRepeatButton);
}
}

@ -1,7 +1,7 @@
package com.todoroo.astrid.tags;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedHashSet;
import android.app.Activity;
@ -11,27 +11,23 @@ import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.inputmethod.EditorInfo;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.ArrayAdapter;
import android.widget.AutoCompleteTextView;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.Spinner;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.TextView.OnEditorActionListener;
import com.timsu.astrid.R;
import com.todoroo.andlib.data.AbstractModel;
import com.todoroo.andlib.data.TodorooCursor;
import com.todoroo.andlib.service.Autowired;
import com.todoroo.andlib.service.DependencyInjectionService;
import com.todoroo.andlib.utility.DateUtilities;
import com.todoroo.astrid.activity.TaskEditActivity.TaskEditControlSet;
import com.todoroo.astrid.data.Metadata;
import com.todoroo.astrid.data.Task;
import com.todoroo.astrid.service.TagDataService;
import com.todoroo.astrid.tags.TagService.Tag;
import com.todoroo.astrid.ui.PopupControlSet;
import com.todoroo.astrid.utility.Flags;
/**
@ -40,52 +36,41 @@ import com.todoroo.astrid.utility.Flags;
* @author Tim Su <tim@todoroo.com>
*
*/
public final class TagsControlSet implements TaskEditControlSet {
public final class TagsControlSet extends PopupControlSet {
// --- instance variables
private final Spinner tagSpinner;
@Autowired private TagDataService tagDataService;
//private final Spinner tagSpinner;
//@Autowired private TagDataService tagDataService;
private final TagService tagService = TagService.getInstance();
private final Tag[] allTags;
private final LinearLayout tagsContainer;
private final String[] allTagNames;
private final LinearLayout newTags;
private final ListView selectedTags;
private boolean populated = false;
private final HashMap<String, Integer> tagIndices;
//private final LinearLayout tagsContainer;
private final Activity activity;
private final TextView tagsDisplay;
public TagsControlSet(Activity activity, int tagsContainer) {
public TagsControlSet(Activity activity, int viewLayout, int displayViewLayout, int title) {
super(activity, viewLayout, displayViewLayout, title);
DependencyInjectionService.getInstance().inject(this);
allTags = getTagArray();
this.activity = activity;
this.tagsContainer = (LinearLayout) activity.findViewById(tagsContainer);
this.tagSpinner = (Spinner) activity.findViewById(R.id.tags_dropdown);
allTags = getTagArray();
allTagNames = getTagNames(allTags);
tagIndices = buildTagIndices(allTagNames);
if(allTags.length == 0) {
tagSpinner.setVisibility(View.GONE);
} else {
ArrayList<Tag> dropDownList = new ArrayList<Tag>(Arrays.asList(allTags));
dropDownList.add(0, new Tag(activity.getString(R.string.TEA_tag_dropdown), 0, 0));
ArrayAdapter<Tag> tagAdapter = new ArrayAdapter<Tag>(activity,
android.R.layout.simple_spinner_item,
dropDownList);
tagAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
tagSpinner.setAdapter(tagAdapter);
tagSpinner.setSelection(0);
tagSpinner.setOnItemSelectedListener(new OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> arg0, View arg1,
int position, long arg3) {
if(position == 0 || position > allTags.length)
return;
addTag(allTags[position - 1].tag, true);
tagSpinner.setSelection(0);
}
selectedTags = (ListView) getView().findViewById(R.id.existingTags);
selectedTags.setAdapter(new ArrayAdapter<String>(activity,
android.R.layout.simple_list_item_multiple_choice, allTagNames));
selectedTags.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
@Override
public void onNothingSelected(AdapterView<?> arg0) {
// nothing!
}
});
}
this.newTags = (LinearLayout) getView().findViewById(R.id.newTags);
tagsDisplay = (TextView) getDisplayView().findViewById(R.id.tags_display);
}
private Tag[] getTagArray() {
@ -93,45 +78,58 @@ public final class TagsControlSet implements TaskEditControlSet {
return tagsList.toArray(new Tag[tagsList.size()]);
}
@Override
public void readFromTask(Task task) {
tagsContainer.removeAllViews();
private HashMap<String, Integer> buildTagIndices(String[] tagNames) {
HashMap<String, Integer> indices = new HashMap<String, Integer>();
for (int i = 0; i < tagNames.length; i++) {
indices.put(tagNames[i], i);
}
return indices;
}
if(task.getId() != AbstractModel.NO_ID) {
TodorooCursor<Metadata> cursor = tagService.getTags(task.getId());
try {
for(cursor.moveToFirst(); !cursor.isAfterLast(); cursor.moveToNext()) {
String tag = cursor.get(TagService.TAG);
addTag(tag, true);
}
} finally {
cursor.close();
}
private String[] getTagNames(Tag[] tags) {
String[] names = new String[tags.length];
for (int i = 0; i < tags.length; i++) {
names[i] = tags[i].toString();
}
addTag("", false); //$NON-NLS-1$
return names;
}
@Override
public String writeToModel(Task task) {
// this is a case where we're asked to save but the UI was not yet populated
if(tagsContainer.getChildCount() == 0)
return null;
private String buildTagString() {
StringBuilder builder = new StringBuilder();
LinkedHashSet<String> tags = getTagSet();
for (String tag : tags) {
if (builder.length() != 0)
builder.append(", ");
builder.append(tag);
}
if (builder.length() == 0)
builder.append(activity.getString(R.string.TEA_tags_none));
return builder.toString();
}
private void setTagSelected(String tag) {
int index = tagIndices.get(tag);
selectedTags.setItemChecked(index, true);
}
private LinkedHashSet<String> getTagSet() {
LinkedHashSet<String> tags = new LinkedHashSet<String>();
for(int i = 0; i < tagsContainer.getChildCount(); i++) {
TextView tagName = (TextView)tagsContainer.getChildAt(i).findViewById(R.id.text1);
for(int i = 0; i < selectedTags.getAdapter().getCount(); i++) {
if (selectedTags.isItemChecked(i))
tags.add(allTagNames[i]);
}
for(int i = 0; i < newTags.getChildCount(); i++) {
TextView tagName = (TextView) newTags.getChildAt(i).findViewById(R.id.text1);
if(tagName.getText().length() == 0)
continue;
tags.add(tagName.getText().toString());
}
if(TagService.getInstance().synchronizeTags(task.getId(), tags)) {
Flags.set(Flags.TAGS_CHANGED);
task.setValue(Task.MODIFICATION_DATE, DateUtilities.now());
}
return null;
return tags;
}
/** Adds a tag to the tag field */
@ -140,8 +138,8 @@ public final class TagsControlSet implements TaskEditControlSet {
// check if already exists
TextView lastText = null;
for(int i = 0; i < tagsContainer.getChildCount(); i++) {
View view = tagsContainer.getChildAt(i);
for(int i = 0; i < newTags.getChildCount(); i++) {
View view = newTags.getChildAt(i);
lastText = (TextView) view.findViewById(R.id.text1);
if(lastText.getText().equals(tagName))
return false;
@ -152,7 +150,7 @@ public final class TagsControlSet implements TaskEditControlSet {
tagItem = (View) lastText.getParent();
} else {
tagItem = inflater.inflate(R.layout.tag_edit_row, null);
tagsContainer.addView(tagItem);
newTags.addView(tagItem);
}
if(tagName == null)
tagName = ""; //$NON-NLS-1$
@ -160,10 +158,6 @@ public final class TagsControlSet implements TaskEditControlSet {
final AutoCompleteTextView textView = (AutoCompleteTextView)tagItem.
findViewById(R.id.text1);
textView.setText(tagName);
ArrayAdapter<Tag> tagsAdapter =
new ArrayAdapter<Tag>(activity,
android.R.layout.simple_dropdown_item_1line, allTags);
textView.setAdapter(tagsAdapter);
textView.addTextChangedListener(new TextWatcher() {
@Override
@ -178,7 +172,7 @@ public final class TagsControlSet implements TaskEditControlSet {
@Override
public void onTextChanged(CharSequence s, int start, int before,
int count) {
if(count > 0 && tagsContainer.getChildAt(tagsContainer.getChildCount()-1) ==
if(count > 0 && newTags.getChildAt(newTags.getChildCount()-1) ==
tagItem)
addTag("", false); //$NON-NLS-1$
}
@ -204,8 +198,8 @@ public final class TagsControlSet implements TaskEditControlSet {
if(lastView == textView && textView.getText().length() == 0)
return;
if(tagsContainer.getChildCount() > 1)
tagsContainer.removeView(tagItem);
if(newTags.getChildCount() > 1)
newTags.removeView(tagItem);
else
textView.setText(""); //$NON-NLS-1$
}
@ -219,10 +213,52 @@ public final class TagsControlSet implements TaskEditControlSet {
* @return
*/
private TextView getLastTextView() {
if(tagsContainer.getChildCount() == 0)
if(newTags.getChildCount() == 0)
return null;
View lastItem = tagsContainer.getChildAt(tagsContainer.getChildCount()-1);
View lastItem = newTags.getChildAt(newTags.getChildCount()-1);
TextView lastText = (TextView) lastItem.findViewById(R.id.text1);
return lastText;
}
@Override
public void readFromTask(Task task) {
newTags.removeAllViews();
if(task.getId() != AbstractModel.NO_ID) {
TodorooCursor<Metadata> cursor = tagService.getTags(task.getId());
try {
for(cursor.moveToFirst(); !cursor.isAfterLast(); cursor.moveToNext()) {
String tag = cursor.get(TagService.TAG);
setTagSelected(tag);
}
} finally {
cursor.close();
}
}
addTag("", false);
refreshDisplayView();
populated = true;
}
@Override
public String writeToModel(Task task) {
// this is a case where we're asked to save but the UI was not yet populated
if(!populated)
return null;
LinkedHashSet<String> tags = getTagSet();
if(TagService.getInstance().synchronizeTags(task.getId(), tags)) {
Flags.set(Flags.TAGS_CHANGED);
task.setValue(Task.MODIFICATION_DATE, DateUtilities.now());
}
return null;
}
@Override
protected void refreshDisplayView() {
tagsDisplay.setText(buildTagString());
}
}

@ -0,0 +1,81 @@
package com.todoroo.astrid.timers;
import android.app.Activity;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import com.timsu.astrid.R;
import com.todoroo.astrid.data.Task;
import com.todoroo.astrid.helper.TaskEditControlSet;
public class TimerActionControlSet extends TaskEditControlSet {
private final Button timerButton;
private boolean timerActive;
private final Activity activity;
private Task task;
private TimerStoppedListener listener;
public TimerActionControlSet(Activity activity, View buttonParent) {
super(activity, -1);
this.activity = activity;
timerButton = (Button) buttonParent.findViewById(R.id.timer_button);
timerButton.setOnClickListener(timerListener);
}
@Override
@SuppressWarnings("hiding")
public void readFromTask(Task task) {
if (task.getValue(Task.TIMER_START) == 0)
timerActive = false;
else
timerActive = true;
this.task = task;
updateDisplay();
}
@Override
@SuppressWarnings("hiding")
public String writeToModel(Task task) {
// Nothing to do here
return null;
}
private final OnClickListener timerListener = new OnClickListener() {
@Override
public void onClick(View v) {
if (timerActive) {
TimerPlugin.updateTimer(activity, task, false);
if (listener != null)
listener.timerStopped(task);
} else {
TimerPlugin.updateTimer(activity, task, true);
}
timerActive = !timerActive;
updateDisplay();
}
};
private void updateDisplay() {
final int drawable;
if(timerActive) {
drawable = R.drawable.icn_timer_stop;
} else {
if (task.getValue(Task.ELAPSED_SECONDS) == 0)
drawable = R.drawable.icn_edit_timer;
else
drawable = R.drawable.icn_timer_start;
}
timerButton.setBackgroundResource(drawable);
}
public interface TimerStoppedListener {
public void timerStopped(Task task);
}
public void setListener(TimerStoppedListener listener) {
this.listener = listener;
}
}

@ -1,14 +1,14 @@
package com.todoroo.astrid.timers;
import android.app.Activity;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.view.View;
import com.timsu.astrid.R;
import com.todoroo.andlib.data.Property.IntegerProperty;
import com.todoroo.andlib.service.DependencyInjectionService;
import com.todoroo.astrid.activity.TaskEditActivity.TaskEditControlSet;
import com.todoroo.astrid.data.Task;
import com.todoroo.astrid.helper.TaskEditControlSet;
import com.todoroo.astrid.timers.TimerActionControlSet.TimerStoppedListener;
import com.todoroo.astrid.ui.PopupControlSet;
import com.todoroo.astrid.ui.TimeDurationControlSet;
/**
@ -17,22 +17,17 @@ import com.todoroo.astrid.ui.TimeDurationControlSet;
* @author Tim Su <tim@todoroo.com>
*
*/
public class TimerControlSet implements TaskEditControlSet {
private final Activity activity;
public class TimerControlSet extends PopupControlSet implements TimerStoppedListener {
TaskEditControlSet estimated, elapsed;
public TimerControlSet(final Activity activity, ViewGroup parent) {
DependencyInjectionService.getInstance().inject(this);
this.activity = activity;
LayoutInflater.from(activity).inflate(R.layout.timer_control, parent, true);
public TimerControlSet(final Activity activity, int viewLayout, int displayViewLayout, int title) {
super(activity, viewLayout, displayViewLayout, title);
estimated = new TimeDurationTaskEditControlSet(Task.ESTIMATED_SECONDS,
estimated = new TimeDurationTaskEditControlSet(activity, getView(), Task.ESTIMATED_SECONDS,
R.id.estimatedDuration, 0, R.string.DLG_hour_minutes
);
elapsed = new TimeDurationTaskEditControlSet(Task.ELAPSED_SECONDS, R.id.elapsedDuration,
elapsed = new TimeDurationTaskEditControlSet(activity, getView(), Task.ELAPSED_SECONDS, R.id.elapsedDuration,
0, R.string.DLG_hour_minutes
);
}
@ -57,14 +52,15 @@ public class TimerControlSet implements TaskEditControlSet {
* @author Tim Su <tim@todoroo.com>
*
*/
public class TimeDurationTaskEditControlSet implements TaskEditControlSet {
public class TimeDurationTaskEditControlSet extends TaskEditControlSet {
private final TimeDurationControlSet controlSet;
private final IntegerProperty property;
public TimeDurationTaskEditControlSet(IntegerProperty property, int timeButtonId,
public TimeDurationTaskEditControlSet(Activity activity, View v, IntegerProperty property, int timeButtonId,
int prefixResource, int titleResource) {
super(activity, -1);
this.property = property;
this.controlSet = new TimeDurationControlSet(activity,
this.controlSet = new TimeDurationControlSet(activity, v,
timeButtonId, prefixResource, titleResource);
}
@ -80,4 +76,14 @@ public class TimerControlSet implements TaskEditControlSet {
}
}
@Override
protected void refreshDisplayView() {
// Nothing to do here yet
}
@Override
public void timerStopped(Task task) {
elapsed.readFromTask(task);
}
}

@ -56,6 +56,7 @@ public class TimerPlugin extends BroadcastReceiver {
task.setValue(Task.TIMER_START, 0L);
task.setValue(Task.ELAPSED_SECONDS,
task.getValue(Task.ELAPSED_SECONDS) + newElapsed);
System.err.println("Elapsed: " + task.getValue(Task.ELAPSED_SECONDS));
StatisticsService.reportEvent(StatisticsConstants.TIMER_STOP);
}
}

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid
android:color="#ffffff"/>
<stroke
android:color="@android:color/darker_gray"
android:width="1dip" />
<corners
android:topRightRadius="4dp"
android:bottomLeftRadius="4dp" />
<size android:width="40dip"
android:height="40dip"/>
</shape>

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2008 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:drawable="@drawable/footer_editbutton_pressed" />
<item android:drawable="@drawable/footer_editbutton_normal" />
</selector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 871 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 881 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 712 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 940 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 850 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 416 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid
android:color="#00000000"/>
<stroke
android:color="@android:color/darker_gray"
android:width="2dip" />
<corners
android:radius="4dp" />
<size android:width="40dip"
android:height="40dip"/>
</shape>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/importance_1" />
<corners
android:bottomRightRadius="4dp"
android:topLeftRadius="4dp" />
</shape>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/importance_2" />
<corners
android:bottomRightRadius="4dp"
android:topLeftRadius="4dp" />
</shape>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/importance_3" />
<corners
android:bottomRightRadius="4dp"
android:topLeftRadius="4dp" />
</shape>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/importance_4" />
<corners
android:bottomRightRadius="4dp"
android:topLeftRadius="4dp" />
</shape>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/importance_5" />
<corners
android:bottomRightRadius="4dp"
android:topLeftRadius="4dp" />
</shape>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/importance_6" />
<corners
android:bottomRightRadius="4dp"
android:topLeftRadius="4dp" />
</shape>

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- See the file "LICENSE" for the full license governing this code. -->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<TextView android:id="@+id/alarms_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/alarm_ACS_label"
style="@style/TextAppearance.GEN_EditLabel" />
<LinearLayout android:id="@+id/alert_container"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
</LinearLayout>
<Button android:id="@+id/alarms_add"
android:text="@string/alarm_ACS_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
</merge>

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- See the file "LICENSE" for the full license governing this code. -->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView android:id="@+id/alarms_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/alarm_ACS_label"
style="@style/TextAppearance.GEN_EditLabel.DLG_EditLabel" />
<LinearLayout android:id="@+id/alert_container"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<Button android:id="@+id/alarms_add"
android:text="+"
android:layout_width="50dip"
android:layout_height="50dip"/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/alarm_ACS_button"
style="@style/TextAppearance.GEN_EditLabel.DLG_EditLabel" />
</LinearLayout>
</LinearLayout>

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<com.todoroo.astrid.ui.ContactsAutoComplete
android:id="@+id/assigned_custom"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dip"
android:layout_weight="1"
android:hint="@string/actfm_person_hint" />
<ImageButton
android:id="@+id/assigned_clear"
style="?android:attr/buttonStyleInset"
android:src="@android:drawable/ic_delete"
android:layout_width="40dip"
android:layout_height="fill_parent"
android:layout_marginTop="4dip"
android:layout_marginRight="2dip"
android:layout_marginBottom="2dip"
android:gravity="center_vertical" />
</LinearLayout>
<ListView
android:id="@+id/assigned_list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
</LinearLayout>

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<!-- Assigned to -->
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="50dip"
android:gravity="center_vertical">
<ImageView
style="@style/EditRowImage"
android:src="@drawable/icn_edit_who"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="15dip"
style="@style/TextAppearance.GEN_EditLabel"
android:text="@string/actfm_EPA_assign_label" />
<TextView
android:id="@+id/assigned_display"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:gravity="center_vertical|right"
style="@style/TextAppearance.EditRowDisplay" />
<include layout="@layout/task_edit_arrow"/>
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:padding="5dip"
style="@style/TEA_Separator" />
</LinearLayout>

@ -0,0 +1,108 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingLeft="9dip"
android:paddingRight="9dip">
<!-- Shared with -->
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="5dip"
android:paddingBottom="5dip"
style="@style/TextAppearance.GEN_EditLabel.DLG_EditLabel"
android:text="@string/actfm_EPA_share_with" />
<com.todoroo.astrid.ui.PeopleContainer
android:id="@+id/share_container"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<LinearLayout
android:id="@+id/share_additional"
android:orientation="vertical"
android:padding="5dip"
android:visibility="gone"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:background="@android:drawable/divider_horizontal_dark" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="5dip"
android:paddingBottom="5dip"
android:text="@string/actfm_EPA_message_text" />
<EditText
android:id="@+id/message"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:scrollbars="vertical"
android:text="@string/actfm_EPA_message_body"
android:autoText="true"
android:capitalize="sentences"
android:singleLine="false" />
<TextView
android:id="@+id/tag_label"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingBottom="5dip"
android:visibility="gone"
android:text="@string/actfm_EPA_tag_label" />
<EditText
android:id="@+id/tag_name"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:visibility="gone"
android:hint="@string/actfm_EPA_tag_hint" />
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:background="@android:drawable/divider_horizontal_dark" />
</LinearLayout>
<LinearLayout
android:id="@+id/collaborators"
android:orientation="vertical"
android:padding="5dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<CheckBox
style="@style/TextAppearance.GEN_EditLabel.DLG_EditLabel"
android:id="@+id/checkbox_facebook"
android:text="@string/actfm_EPA_facebook"
android:paddingLeft="45dip"
android:visibility="gone"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<CheckBox
style="@style/TextAppearance.GEN_EditLabel.DLG_EditLabel"
android:id="@+id/checkbox_twitter"
android:text="@string/actfm_EPA_twitter"
android:paddingLeft="45dip"
android:visibility="gone"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:layout_margin="15dip"
android:visibility="gone"
android:background="@android:drawable/divider_horizontal_dark" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="15dip"
android:text="@string/actfm_EPA_intro"
android:gravity="center"
android:visibility="gone"
android:textColor="#ee9900" />
</LinearLayout>
</ScrollView>

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<!-- tags -->
<LinearLayout
android:id="@+id/collaborators_body"
android:layout_width="fill_parent"
android:layout_height="50dip"
android:gravity="center_vertical">
<ImageView
style="@style/EditRowImage"
android:src="@drawable/icn_edit_share"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="15dip"
android:text="@string/actfm_EPA_collaborators_header"
style="@style/TextAppearance.GEN_EditLabel" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:maxLines="2"
android:paddingLeft="10dip"
style="@style/TextAppearance.EditRowDisplay" />
<include layout="@layout/task_edit_arrow"/>
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:padding="5dip"
style="@style/TEA_Separator" />
</LinearLayout>

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- See the file "LICENSE" for the full license governing this code. -->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="0dip"
android:layout_height="0dip">
<!-- calendar integration -->
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<Spinner
android:id="@+id/calendars"
android:layout_width="0dip"
android:layout_height="0dip"/>
<Button
android:id="@+id/view_calendar_event"
android:layout_width="0dip"
android:layout_height="0dip"
android:text="@string/gcal_TEA_showCalendar_label"/>
</LinearLayout>
</LinearLayout>

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:id="@+id/gcal_body"
android:layout_width="fill_parent"
android:layout_height="50dip"
android:gravity="center_vertical">
<ImageView
style="@style/EditRowImage"
android:src="@drawable/icn_edit_calendar"/>
<TextView
android:id="@+id/calendar_display_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="15dip"
android:text="@string/gcal_TEA_addToCalendar_label"
style="@style/TextAppearance.GEN_EditLabel" />
<TextView
android:id="@+id/calendar_display_which"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:maxLines="1"
android:ellipsize="end"
android:paddingLeft="10dip"
style="@style/TextAppearance.EditRowDisplay" />
<include layout="@layout/task_edit_arrow"/>
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:padding="5dip"
style="@style/TEA_Separator" />
</LinearLayout>

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="0dip"
android:layout_height="0dip">
<Spinner
android:id="@+id/hideUntil"
android:layout_width="0dip"
android:layout_height="0dip" />
</LinearLayout>

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<!-- tags -->
<LinearLayout
android:id="@+id/hide_until_body"
android:layout_width="fill_parent"
android:layout_height="50dip"
android:gravity="center_vertical">
<ImageView
style="@style/EditRowImage"
android:src="@drawable/icn_edit_hide"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="15dip"
android:text="@string/TEA_hideUntil_label"
style="@style/TextAppearance.GEN_EditLabel" />
<TextView
android:id="@+id/hide_until_display"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:maxLines="2"
android:paddingLeft="10dip"
style="@style/TextAppearance.EditRowDisplay" />
<include layout="@layout/task_edit_arrow"/>
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:padding="5dip"
style="@style/TEA_Separator" />
</LinearLayout>

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:id="@+id/importance_container"
android:orientation="horizontal"
android:paddingTop="5dip"
android:paddingBottom="5dip"
android:gravity="center_vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<ImageView
style="@style/EditRowImage"
android:src="@drawable/icn_edit_priority"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/TEA_importance_label"
style="@style/TextAppearance.GEN_EditLabel" />
<View
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_weight="1"/>
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:padding="5dip"
style="@style/TEA_Separator" />
</LinearLayout>

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<!-- notes -->
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<!-- Voice Add Note Button -->
<ImageButton
android:id="@+id/voiceAddNoteButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:src="@drawable/tango_microphone"
android:scaleType="fitCenter"
android:visibility="gone" />
<EditText
android:id="@+id/notes"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="9dip"
android:layout_marginRight="9dip"
android:layout_weight="100"
android:scrollbars="vertical"
android:gravity="top"
android:hint="@string/TEA_notes_hint"
android:autoText="true"
android:capitalize="sentences"
android:singleLine="false"
android:freezesText="true" />
</LinearLayout>
</LinearLayout>

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<!-- tags -->
<LinearLayout
android:id="@+id/notes_body"
android:layout_width="fill_parent"
android:layout_height="50dip"
android:gravity="center_vertical">
<ImageView
style="@style/EditRowImage"
android:src="@drawable/icn_edit_notes"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="15dip"
android:text="@string/TEA_note_label"
style="@style/TextAppearance.GEN_EditLabel" />
<TextView
android:id="@+id/notes_display"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:maxLines="2"
android:paddingLeft="10dip"
style="@style/TextAppearance.EditRowDisplay" />
<include layout="@layout/task_edit_arrow"/>
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:padding="5dip"
style="@style/TEA_Separator" />
</LinearLayout>

@ -1,6 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- See the file "LICENSE" for the full license governing this code. -->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<!-- opencrx task assignment controlset -->
<LinearLayout
@ -12,7 +16,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/opencrx_TEA_creator_assign_label"
style="@style/TextAppearance.GEN_EditLabel" />
style="@style/TextAppearance.GEN_EditLabel.DLG_EditLabel" />
<AutoCompleteTextView
android:id="@+id/opencrx_TEA_creator_textinput"
@ -32,7 +36,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/opencrx_TEA_task_assign_label"
style="@style/TextAppearance.GEN_EditLabel" />
style="@style/TextAppearance.GEN_EditLabel.DLG_EditLabel" />
<AutoCompleteTextView
android:id="@+id/opencrx_TEA_contact_textinput"
@ -54,5 +58,5 @@
android:padding="5dip"
android:background="@android:drawable/divider_horizontal_dark" />
</merge>
</LinearLayout>

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<!-- tags -->
<LinearLayout
android:id="@+id/opencrx_body"
android:layout_width="fill_parent"
android:layout_height="50dip"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="15dip"
android:text="@string/opencrx_TEA_opencrx_title"
style="@style/TextAppearance.GEN_EditLabel" />
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:padding="5dip"
style="@style/TEA_Separator" />
</LinearLayout>

@ -1,6 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- See the file "LICENSE" for the full license governing this code. -->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:paddingLeft="5dip"
android:paddingRight="5dip">
<!-- producteev task assignment controlset -->
<LinearLayout
@ -12,7 +18,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/producteev_TEA_dashboard_assign_label"
style="@style/TextAppearance.GEN_EditLabel" />
style="@style/TextAppearance.GEN_EditLabel.DLG_EditLabel" />
<Spinner
android:id="@+id/producteev_TEA_dashboard_assign"
@ -25,7 +31,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/producteev_TEA_task_assign_label"
style="@style/TextAppearance.GEN_EditLabel" />
style="@style/TextAppearance.GEN_EditLabel.DLG_EditLabel" />
<Spinner
android:id="@+id/producteev_TEA_task_assign"
@ -40,5 +46,5 @@
android:padding="5dip"
android:background="@android:drawable/divider_horizontal_dark" />
</merge>
</LinearLayout>

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<!-- tags -->
<LinearLayout
android:id="@+id/producteev_display_body"
android:layout_width="fill_parent"
android:layout_height="50dip"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="15dip"
android:text="@string/producteev_TEA_control_set_display"
style="@style/TextAppearance.GEN_EditLabel" />
<TextView
android:id="@+id/producteev_display"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:maxLines="2"
android:paddingLeft="10dip"
style="@style/TextAppearance.EditRowDisplay" />
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:padding="5dip"
style="@style/TEA_Separator" />
</LinearLayout>

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:minWidth="320dip"
android:paddingLeft="5dip"
android:paddingRight="5dip">
<LinearLayout
android:id="@+id/reminders_body"
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.DLG_EditLabel" />
<CheckBox
style="@style/TextAppearance.GEN_EditLabel.DLG_EditLabel"
android:id="@+id/reminder_due"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dip"
android:button="@drawable/btn_check_small"
android:text="@string/TEA_reminder_due" />
<CheckBox
style="@style/TextAppearance.GEN_EditLabel.DLG_EditLabel"
android:id="@+id/reminder_overdue"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dip"
android:button="@drawable/btn_check_small"
android:text="@string/TEA_reminder_overdue" />
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<CheckBox
style="@style/TextAppearance.GEN_EditLabel.DLG_EditLabel"
android:id="@+id/reminder_random"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dip"
android:button="@drawable/btn_check_small"
android:text="@string/TEA_reminder_random" />
<Spinner
android:id="@+id/reminder_random_interval"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/TEA_reminder_alarm_label"
style="@style/TextAppearance.GEN_EditLabel.DLG_EditLabel" />
<Spinner
android:id="@+id/reminder_alarm"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</ScrollView>

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<!-- tags -->
<LinearLayout
android:id="@+id/reminders_body"
android:layout_width="fill_parent"
android:layout_height="50dip"
android:gravity="center_vertical">
<ImageView
style="@style/EditRowImage"
android:src="@drawable/icn_edit_reminders"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="15dip"
android:text="@string/TEA_reminders_group_label"
style="@style/TextAppearance.GEN_EditLabel" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:maxLines="2"
android:paddingLeft="10dip"
style="@style/TextAppearance.EditRowDisplay" />
<include layout="@layout/task_edit_arrow"/>
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:padding="5dip"
style="@style/TEA_Separator" />
</LinearLayout>

@ -1,17 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- See the file "LICENSE" for the full license governing this code. -->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<CheckBox android:id="@+id/repeatEnabled"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dip"
android:button="@drawable/btn_check_small"
android:text="@string/repeat_enabled"
style="@style/TextAppearance.GEN_EditLabel" />
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<LinearLayout android:id="@+id/repeatContainer"
style="@style/Content"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
@ -47,5 +42,5 @@
</LinearLayout>
</merge>
</LinearLayout>

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<!-- tags -->
<LinearLayout
android:id="@+id/repeat_body"
android:layout_width="fill_parent"
android:layout_height="50dip"
android:gravity="center_vertical">
<ImageView
style="@style/EditRowImage"
android:src="@drawable/icn_edit_repeats"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="15dip"
android:text="@string/repeat_enabled"
style="@style/TextAppearance.GEN_EditLabel" />
<TextView
android:id="@+id/repeat_display"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:paddingLeft="10dip"
style="@style/TextAppearance.EditRowDisplay" />
<include layout="@layout/task_edit_arrow"/>
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:padding="5dip"
style="@style/TEA_Separator" />
</LinearLayout>

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:id="@+id/newTags"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dip"
android:layout_marginBottom="5dip"
android:paddingLeft="5dip"
android:paddingRight="3dip"/>
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:padding="5dip"
android:background="@android:drawable/divider_horizontal_dark"/>
<ListView
android:id="@+id/existingTags"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
</LinearLayout>

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<!-- tags -->
<LinearLayout
android:id="@+id/tags_display_body"
android:layout_width="fill_parent"
android:layout_height="50dip"
android:gravity="center_vertical">
<ImageView
style="@style/EditRowImage"
android:src="@drawable/icn_edit_lists"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="15dip"
android:text="@string/TEA_tags_label"
style="@style/TextAppearance.GEN_EditLabel" />
<TextView
android:id="@+id/tags_display"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:maxLines="2"
android:paddingLeft="10dip"
style="@style/TextAppearance.EditRowDisplay" />
<include layout="@layout/task_edit_arrow"/>
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:padding="5dip"
style="@style/TEA_Separator" />
</LinearLayout>

@ -1,13 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- See the file "LICENSE" for the full license governing this code. -->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingLeft="5dip"
android:paddingRight="5dip">
<!-- estimated time -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/TEA_estimatedDuration_label"
style="@style/TextAppearance.GEN_EditLabel" />
style="@style/TextAppearance.GEN_EditLabel.DLG_EditLabel" />
<Button
android:id="@+id/estimatedDuration"
android:layout_width="fill_parent"
@ -18,11 +24,11 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/TEA_elapsedDuration_label"
style="@style/TextAppearance.GEN_EditLabel" />
style="@style/TextAppearance.GEN_EditLabel.DLG_EditLabel" />
<Button
android:id="@+id/elapsedDuration"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</merge>
</LinearLayout>

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<!-- tags -->
<LinearLayout
android:id="@+id/reminders_body"
android:layout_width="fill_parent"
android:layout_height="50dip"
android:gravity="center_vertical">
<ImageView
style="@style/EditRowImage"
android:src="@drawable/icn_edit_timer"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="15dip"
android:text="@string/TEA_timer_controls"
style="@style/TextAppearance.GEN_EditLabel" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:maxLines="2"
android:paddingLeft="10dip"
style="@style/TextAppearance.EditRowDisplay" />
<include layout="@layout/task_edit_arrow"/>
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:padding="5dip"
style="@style/TEA_Separator" />
</LinearLayout>

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="100">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dip"
android:layout_marginBottom="14dip">
<ImageView
android:id="@+id/importance"
android:layout_width="4dip"
android:layout_height="fill_parent"
android:layout_weight="1"/>
<com.todoroo.astrid.ui.ErrorCatchingEditText
android:id="@+id/title"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="100"
android:hint="@string/TEA_title_hint"
android:autoText="true"
android:paddingTop="8dip"
android:paddingBottom="8dip"
android:paddingLeft="5dip"
android:text=""
android:background="@drawable/edit_title_background"
android:capitalize="sentences"
android:freezesText="true"/>
<Button
android:id="@+id/timer_button"
android:layout_width="35dip"
android:layout_height="35dip"
android:layout_marginLeft="10dip"
android:layout_gravity="center_vertical"
android:layout_weight="1"/>
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:padding="5dip"
style="@style/TEA_Separator" />
</LinearLayout>

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dip">
<Button
android:id="@+id/urgency_date"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:drawableLeft="@drawable/gl_date" />
<Button
android:id="@+id/urgency_time"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:drawableLeft="@drawable/gl_time" />
</LinearLayout>
</LinearLayout>

@ -1,48 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- See the file "LICENSE" for the full license governing this code. -->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<!-- calendar integration -->
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/gcal_TEA_calendar_label"
style="@style/TextAppearance.GEN_EditLabel" />
<CheckBox
android:id="@+id/add_to_calendar"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dip"
android:button="@drawable/btn_check_small"
style="@style/TextAppearance.GEN_EditLabel"
android:text="@string/gcal_TEA_addToCalendar_label" />
<Spinner
android:id="@+id/calendars"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:visibility="gone" />
<Button
android:id="@+id/view_calendar_event"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/gcal_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" />
</LinearLayout>
</merge>

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/popup_body"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="@drawable/background_gradient">
<Button android:id="@+id/done"
android:layout_width="fill_parent"
android:layout_height="50dip"
android:layout_weight="1"
android:gravity="center"
android:text="@string/DLG_ok" />
</LinearLayout>

@ -20,16 +20,15 @@
<AutoCompleteTextView android:id="@+id/text1"
android:hint="@string/TEA_tag_hint"
android:layout_width="0dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_gravity="center_vertical"/>
<ImageButton android:id="@+id/button1"
android:background="@drawable/btn_dismiss"
android:layout_width="32dip"
android:layout_height="32dip"
android:layout_gravity="center"
android:layout_margin="4dip"
/>
android:background="@drawable/btn_dismiss"
android:layout_gravity="center_vertical"
android:layout_margin="4dip"/>
</LinearLayout>

@ -50,7 +50,7 @@
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:padding="4dip"
android:padding="7dip"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">

@ -0,0 +1,137 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:astrid="http://schemas.android.com/apk/res/com.timsu.astrid"
android:id="@+id/taskEditParent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
style="@style/Content">
<!-- buttons -->
<LinearLayout android:id="@+id/edit_footer"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="48dip"
android:layout_alignParentBottom="true"
android:padding="5dip"
android:background="@drawable/footer_background"
android:baselineAligned="false">
<Button
android:id="@+id/save"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginRight="5dip"
android:background="@drawable/footer_editbutton"
android:text="@string/DLG_save"
android:textStyle="bold"
style="@style/TextAppearance.TEA_action"
android:layout_weight="1" />
<Button
android:id="@+id/discard"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginLeft="5dip"
android:background="@drawable/footer_editbutton"
android:text="@android:string/cancel"
style="@style/TextAppearance.TEA_action"
android:textColor="#000000"
android:layout_weight="1" />
</LinearLayout>
<ScrollView
android:id="@+id/edit_scroll"
android:layout_above="@id/edit_footer"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
style="@style/Content">
<LinearLayout
android:orientation="vertical"
android:padding="10dip"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:id="@+id/basic_controls"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
</LinearLayout>
<LinearLayout
android:id="@+id/when_container"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/when_header"
android:layout_width="fill_parent"
android:layout_height="50dip"
android:gravity="center_vertical">
<ImageView
android:id="@+id/when_image"
style="@style/EditRowImage"
android:src="@drawable/icn_edit_when"/>
<TextView
android:id="@+id/when_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/TextAppearance.GEN_EditLabel"
android:text="When"/>
<TextView
android:id="@+id/aux_date"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="100"
android:gravity="right"
style="@style/TextAppearance.EditRowDisplay"/>
<include layout="@layout/task_edit_arrow"/>
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:padding="5dip"
style="@style/TEA_Separator" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/more_header"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<TextView
android:layout_width="fill_parent"
android:layout_height="50dip"
android:layout_gravity="center_vertical"
android:gravity="center"
style="@style/TextAppearance.EditRowDisplay"
android:textStyle="bold"
android:text="@string/TEA_more"/>
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:padding="5dip"
style="@style/TEA_Separator" />
</LinearLayout>
<LinearLayout
android:id="@+id/more_controls"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:visibility="gone"/>
</LinearLayout>
</LinearLayout>
</ScrollView>
</RelativeLayout>

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="12dip"
android:layout_height="20dip"
android:layout_marginTop="1dip"
android:layout_marginLeft="7dip"
android:src="@drawable/icn_arrow" />

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/when_dialog"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:padding="10dip">
<LinearLayout
android:id="@+id/when_controls"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="100"
android:orientation="vertical">
</LinearLayout>
<Button
android:id="@+id/when_dismiss"
android:layout_width="150dip"
android:layout_height="50dip"
android:layout_weight="1"
android:layout_gravity="center_horizontal"
android:text="@string/DLG_ok"/>
</LinearLayout>

@ -703,10 +703,10 @@ File %1$s contained %2$s.\n\n
<string-array name="EPr_default_importance">
<!-- importance: labels for "Task Defaults" preference item. -->
<item>!!!! (Màxim)</item>
<item>!!!</item>
<item>!!! (Màxim)</item>
<item>!!</item>
<item>! (Mínim)</item>
<item>!</item>
<item>o (Mínim)</item>
</string-array>
<string-array name="EPr_default_urgency">

@ -698,10 +698,10 @@
<string-array name="EPr_default_importance">
<!-- importance: labels for "Task Defaults" preference item. -->
<item>!!!! (Nejvyšší)</item>
<item>!!!</item>
<item>!!! (Nejvyšší)</item>
<item>!!</item>
<item>! (Nejnižší)</item>
<item>!</item>
<item>o (Nejnižší)</item>
</string-array>
<string-array name="EPr_default_urgency">

@ -698,10 +698,10 @@
<string-array name="EPr_default_importance">
<!-- importance: labels for "Task Defaults" preference item. -->
<item>!!!! (højeste)</item>
<item>!!!</item>
<item>!!! (højeste)</item>
<item>!!</item>
<item>! (laveste)</item>
<item>!</item>
<item>o (laveste)</item>
</string-array>
<string-array name="EPr_default_urgency">

@ -708,10 +708,10 @@
<string-array name="EPr_default_importance">
<!-- importance: labels for "Task Defaults" preference item. -->
<item>!!!! (Höchste)</item>
<item>!!!</item>
<item>!!! (Höchste)</item>
<item>!!</item>
<item>! (Niedrigste)</item>
<item>!</item>
<item>o (Niedrigste)</item>
</string-array>
<string-array name="EPr_default_urgency">

@ -703,10 +703,10 @@ File %1$s contained %2$s.\n\n
<string-array name="EPr_default_importance">
<!-- importance: labels for "Task Defaults" preference item. -->
<item>!!!! (Alto)</item>
<item>!!!</item>
<item>!!! (Alto)</item>
<item>!!</item>
<item>! (Bajo)</item>
<item>!</item>
<item>o (Bajo)</item>
</string-array>
<string-array name="EPr_default_urgency">

@ -697,10 +697,10 @@
<string-array name="EPr_default_importance">
<!-- importance: labels for "Task Defaults" preference item. -->
<item>!!!! (la plus haute)</item>
<item>!!!</item>
<item>!!! (la plus haute)</item>
<item>!!</item>
<item>! (la plus basse)</item>
<item>!</item>
<item>o (la plus basse)</item>
</string-array>
<string-array name="EPr_default_urgency">

@ -705,10 +705,10 @@ File %1$s contained %2$s.\n\n
<string-array name="EPr_default_importance">
<!-- importance: labels for "Task Defaults" preference item. -->
<item>!!!! (הגבוהה ביותר)</item>
<item>!!!</item>
<item>!!! (הגבוהה ביותר)</item>
<item>!!</item>
<item>! (הנמוכה ביותר)</item>
<item>!</item>
<item>o (הנמוכה ביותר)</item>
</string-array>
<string-array name="EPr_default_urgency">

@ -698,10 +698,10 @@
<string-array name="EPr_default_importance">
<!-- importance: labels for "Task Defaults" preference item. -->
<item>!!!! (Più Alta)</item>
<item>!!!</item>
<item>!!! (Più Alta)</item>
<item>!!</item>
<item>! (Più Bassa)</item>
<item>!</item>
<item>o (Più Bassa)</item>
</string-array>
<string-array name="EPr_default_urgency">

@ -700,10 +700,10 @@
<string-array name="EPr_default_importance">
<!-- importance: labels for "Task Defaults" preference item. -->
<item>!!!! (最重要)</item>
<item>!!!</item>
<item>!!! (最重要)</item>
<item>!!</item>
<item>! (最低)</item>
<item>!</item>
<item>o (最低)</item>
</string-array>
<string-array name="EPr_default_urgency">

@ -699,9 +699,9 @@
<string-array name="EPr_default_importance">
<!-- importance: labels for "Task Defaults" preference item. -->
<item>!!! (최고 중요도)</item>
<item>!!!</item>
<item>!!</item>
<item>! (최저 중요도)</item>
<item>!</item>
<item>o (최저 중요도)</item>
</string-array>
<string-array name="EPr_default_urgency">

@ -698,10 +698,10 @@
<string-array name="EPr_default_importance">
<!-- importance: labels for "Task Defaults" preference item. -->
<item>!!!! (Høyest)</item>
<item>!!!</item>
<item>!!! (Høyest)</item>
<item>!!</item>
<item>! (Lavest)</item>
<item>!</item>
<item>o (Lavest)</item>
</string-array>
<string-array name="EPr_default_urgency">

@ -697,10 +697,10 @@
<string-array name="EPr_default_importance">
<!-- importance: labels for "Task Defaults" preference item. -->
<item>!!!! (Hoogste)</item>
<item>!!!</item>
<item>!!! (Hoogste)</item>
<item>!!</item>
<item>! (Laagste)</item>
<item>!</item>
<item>o (Laagste)</item>
</string-array>
<string-array name="EPr_default_urgency">

@ -698,10 +698,10 @@
<string-array name="EPr_default_importance">
<!-- importance: labels for "Task Defaults" preference item. -->
<item>!!!! (Najwyższy)</item>
<item>!!!</item>
<item>!!! (Najwyższy)</item>
<item>!!</item>
<item>! (Najniższy)</item>
<item>!</item>
<item>o (Najniższy)</item>
</string-array>
<string-array name="EPr_default_urgency">

@ -698,10 +698,10 @@
<string-array name="EPr_default_importance">
<!-- importance: labels for "Task Defaults" preference item. -->
<item>!!!! (Highest)</item>
<item>!!!</item>
<item>!!! (Highest)</item>
<item>!!</item>
<item>! (Lowest)</item>
<item>!</item>
<item>o (Lowest)</item>
</string-array>
<string-array name="EPr_default_urgency">

@ -699,9 +699,9 @@
<string-array name="EPr_default_importance">
<!-- importance: labels for "Task Defaults" preference item. -->
<item>!!! (Наивысшая)</item>
<item>!!!</item>
<item>!!</item>
<item>! (Низшая)</item>
<item>!</item>
<item>o (Низшая)</item>
</string-array>
<string-array name="EPr_default_urgency">

@ -698,10 +698,10 @@
<string-array name="EPr_default_importance">
<!-- importance: labels for "Task Defaults" preference item. -->
<item>!!!! (Högst)</item>
<item>!!!</item>
<item>!!! (Högst)</item>
<item>!!</item>
<item>! (Lägst)</item>
<item>!</item>
<item>o (Lägst)</item>
</string-array>
<string-array name="EPr_default_urgency">

@ -705,10 +705,10 @@ File %1$s contained %2$s.\n\n
<string-array name="EPr_default_importance">
<!-- importance: labels for "Task Defaults" preference item. -->
<item>!!!! (สูงสุด)</item>
<item>!!!</item>
<item>!!! (สูงสุด)</item>
<item>!!</item>
<item>! (ต่ำสุด)</item>
<item>!</item>
<item>o (ต่ำสุด)</item>
</string-array>
<string-array name="EPr_default_urgency">

@ -697,10 +697,10 @@
<string-array name="EPr_default_importance">
<!-- importance: labels for "Task Defaults" preference item. -->
<item>!!!! (最高)</item>
<item>!!!</item>
<item>!!! (最高)</item>
<item>!!</item>
<item>! (最低)</item>
<item>!</item>
<item>o (最低)</item>
</string-array>
<string-array name="EPr_default_urgency">

@ -698,10 +698,10 @@
<string-array name="EPr_default_importance">
<!-- importance: labels for "Task Defaults" preference item. -->
<item>!!!! (最高)</item>
<item>!!!</item>
<item>!!! (最高)</item>
<item>!!</item>
<item>! (最低)</item>
<item>!</item>
<item>o (最低)</item>
</string-array>
<string-array name="EPr_default_urgency">

@ -15,10 +15,11 @@
<attr name="asFilterCountColor" format="color"/>
<attr name="asMembersHeaderBackground" format="reference"/>
<attr name="asMembersHeaderArrow" format="reference"/>
<attr name="asSeparatorBackground" format="color"/>
<declare-styleable name="ContactsAutoComplete">
<attr name="allowMultiple" format="boolean"/>
<attr name="completeTags" format="boolean"/>
</declare-styleable>
</resources>
</resources>

@ -12,4 +12,4 @@
<enum name="slideLeft" value="2" />
</attr>
</declare-styleable>
</resources>
</resources>

@ -11,4 +11,4 @@
<string name="opencrx_PPr_host_key">opencrx_host</string>
<string name="opencrx_PPr_segment_key">opencrx_segment</string>
<string name="opencrx_PPr_provider_key">opencrx_provider</string>
</resources>
</resources>

@ -164,6 +164,7 @@
<string name="p_colorize">colorize</string>
<string name="p_fontSize">font_size</string>
<string name="p_showNotes">notesVisible</string>
<string name="p_beastMode">beastMode</string>
<string name="p_transparent_deprecated">transparent</string>
<string name="p_theme">theme</string>
<string name="p_voiceInputEnabled">voiceInputEnabled</string>
@ -286,6 +287,9 @@
<string name="sync_SPr_sync_key">sync_sync</string>
<!-- Preference Key (do not translate) -->
<string name="sync_SPr_forget_key">sync_forget</string>
<!-- ===========================================================ACTFM == -->
<string name="actfm_https_key">actfmHttps</string>
<!-- ============================================================ MILK == -->

@ -8,7 +8,7 @@
<string name="EPE_action">Share</string>
<!-- task sharing dialog: assigned hint -->
<string name="actfm_person_hint">Contact Name or Email</string>
<string name="actfm_person_hint">Contact or Email</string>
<!-- task sharing dialog: shared with hint -->
<string name="actfm_person_or_tag_hint">Contact or Shared List</string>
@ -91,7 +91,7 @@
<string name="actfm_EPA_save">Save &amp; Share</string>
<!-- task sharing dialog: assigned label -->
<string name="actfm_EPA_assign_label">Assigned to:</string>
<string name="actfm_EPA_assign_label">Who</string>
<!-- task sharing dialog: assigned to me -->
<string name="actfm_EPA_assign_me">Me</string>
@ -102,7 +102,10 @@
<!-- task sharing dialog: shared with label -->
<string name="actfm_EPA_share_with">Add Collaborators:</string>
<!-- task sharing dialog: collaborator list name (%s => name of list) -->
<!-- task sharing dialog: shared with label -->
<string name="actfm_EPA_collaborators_header">Share with Friends</string>
<!-- task sharing dialog: collaborator list name (%s => name of list) -->
<string name="actfm_EPA_list">List: %s</string>
<!-- task sharing dialog: assigned hint -->
@ -193,6 +196,10 @@
<!-- Preferences Title: Act.fm -->
<string name="actfm_APr_header">Astrid.com (Beta!)</string>
<string name="actfm_https_title">Use HTTPS</string>
<string name="actfm_https_enabled">HTTPS enabled (slower)</string>
<string name="actfm_https_disabled">HTTPS disabled (faster)</string>
<!-- title for notification tray after synchronizing -->
<string name="actfm_notification_title">Astrid.com Sync</string>

@ -275,7 +275,7 @@
<string name="TEA_urgency_none">None</string>
<!-- Task hide until label -->
<string name="TEA_hideUntil_label">Hide Task From List Until:</string>
<string name="TEA_hideUntil_label">Show Task</string>
<!-- Task editing data being loaded label -->
<string-array name="TEA_loading"><item>Loading...</item></string-array>
@ -327,19 +327,26 @@
<string-array name="TEA_hideUntil">
<!-- hideUntil: labels for edit page. -->
<item>Don\'t hide</item>
<item>Task is due</item>
<item>Always</item>
<item>At due date</item>
<item>Day before due</item>
<item>Week before due</item>
<item>Specific Day/Time</item>
</string-array>
<string name="hide_until_prompt">Show in my list</string>
<!-- Add Ons tab when no add-ons found -->
<string name="TEA_addons_text">Looking for more features?</string>
<!-- Add Ons button -->
<string name="TEA_addons_button">Get the Power Pack!</string>
<!-- More row -->
<string name="TEA_more">More</string>
<!-- When controls dialog -->
<string name="TEA_when_dialog_title">When is this due?</string>
<!-- ============================================= IntroductionActivity == -->
<!-- Introduction Window title -->
@ -381,6 +388,11 @@
<!-- Preference: Task List Show Notes -->
<string name="EPr_showNotes_title">Show Notes In Task</string>
<!-- Preference: Beast mode (auto-expand edit page) -->
<string name="EPr_beastMode_title">Beast Mode</string>
<string name="EPr_beastMode_desc_disabled">Adavnced task edit settings will start hidden</string>
<string name="EPr_beastMode_desc_enabled">Adavnced task edit settings will show automatically</string>
<!-- Preference: Task List Show Notes Description (disabled) -->
<string name="EPr_showNotes_desc_disabled">Notes will be displayed in quick action bar</string>
<!-- Preference: Task List Show Notes Description (enabled) -->

@ -38,10 +38,10 @@
<string-array name="EPr_default_importance">
<!-- importance: labels for "Task Defaults" preference item. -->
<item>!!!! (Highest)</item>
<item>!!!</item>
<item>!!! (Highest)</item>
<item>!!</item>
<item>! (Lowest)</item>
<item>!</item>
<item>o (Lowest)</item>
</string-array>
<string-array name="EPr_default_urgency">

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save