diff --git a/astrid/src/com/todoroo/astrid/activity/DraggableTaskListActivity.java b/astrid/src/com/todoroo/astrid/activity/DraggableTaskListActivity.java index 3e1ff476d..e52a19a6f 100644 --- a/astrid/src/com/todoroo/astrid/activity/DraggableTaskListActivity.java +++ b/astrid/src/com/todoroo/astrid/activity/DraggableTaskListActivity.java @@ -19,6 +19,7 @@ import com.todoroo.andlib.data.Property; import com.todoroo.andlib.data.Property.IntegerProperty; import com.todoroo.andlib.data.TodorooCursor; import com.todoroo.astrid.adapter.TaskAdapter; +import com.todoroo.astrid.adapter.TaskAdapter.OnCompletedTaskListener; import com.todoroo.astrid.core.SortHelper; import com.todoroo.astrid.data.Task; @@ -61,12 +62,6 @@ public class DraggableTaskListActivity extends TaskListActivity { getView().findViewById(R.id.sortContainer).setVisibility(View.GONE); } - @Override - protected void setUpUiComponents() { - super.setUpUiComponents(); - findViewById(R.id.sortContainer).setVisibility(View.GONE); - } - // --- task adapter /** diff --git a/astrid/src/com/todoroo/astrid/activity/TaskEditActivity.java b/astrid/src/com/todoroo/astrid/activity/TaskEditActivity.java index 489b96dc2..4cf9a7053 100755 --- a/astrid/src/com/todoroo/astrid/activity/TaskEditActivity.java +++ b/astrid/src/com/todoroo/astrid/activity/TaskEditActivity.java @@ -344,7 +344,7 @@ public final class TaskEditActivity extends Fragment { //NOTE: we add the gcalControl to the list AFTER the deadline control, because //otherwise the correct date may not be written to the calendar event. Order matters! DeadlineControlSet deadlineControl = new DeadlineControlSet( - TaskEditActivity.this, R.layout.control_set_deadline, + getActivity(), R.layout.control_set_deadline, R.layout.control_set_deadline_display, repeatControls.getDisplayView(), gcalControl.getDisplayView()); controls.add(deadlineControl); controlSetMap.put(getString(R.string.TEA_ctrl_when_pref), deadlineControl); @@ -384,7 +384,7 @@ public final class TaskEditActivity extends Fragment { controlSetMap.put(getString(R.string.TEA_ctrl_reminders_pref), reminderControl); - hideUntilControls = new HideUntilControlSet(TaskEditActivity.this, + hideUntilControls = new HideUntilControlSet(getActivity(), R.layout.control_set_hide, R.layout.control_set_hide_display, R.string.hide_until_prompt); controls.add(hideUntilControls); @@ -704,7 +704,6 @@ public final class TaskEditActivity extends Fragment { Intent data = new Intent(); data.putExtra(TOKEN_TASK_WAS_ASSIGNED, true); data.putExtra(TOKEN_ASSIGNED_TO, peopleControlSet.getAssignedToString()); - setResult(RESULT_OK, data); getActivity().setResult(Activity.RESULT_OK, data); } diff --git a/astrid/src/com/todoroo/astrid/activity/TaskListActivity.java b/astrid/src/com/todoroo/astrid/activity/TaskListActivity.java index 8f9e74ea4..7480d51e4 100644 --- a/astrid/src/com/todoroo/astrid/activity/TaskListActivity.java +++ b/astrid/src/com/todoroo/astrid/activity/TaskListActivity.java @@ -444,7 +444,7 @@ public class TaskListActivity extends ListFragment implements OnScrollListener, public void onClick(View v) { StatisticsService.reportEvent(StatisticsConstants.TLA_MENU_SORT); AlertDialog dialog = SortSelectionActivity.createDialog(getActivity(), - getActivity(), sortFlags, sortSort); + TaskListActivity.this, sortFlags, sortSort); dialog.show(); } });