diff --git a/astrid/src/com/todoroo/astrid/activity/AstridWrapperActivity.java b/astrid/src/com/todoroo/astrid/activity/AstridWrapperActivity.java index 338e30a28..85ae13d78 100644 --- a/astrid/src/com/todoroo/astrid/activity/AstridWrapperActivity.java +++ b/astrid/src/com/todoroo/astrid/activity/AstridWrapperActivity.java @@ -170,17 +170,6 @@ public class AstridWrapperActivity extends FragmentActivity @Override public void onBackPressed() { - // manage task edit visibility - View taskeditFragmentContainer = findViewById(R.id.taskedit_fragment_container); - if(taskeditFragmentContainer != null && taskeditFragmentContainer.getVisibility() == View.VISIBLE) { - if(fragmentLayout == LAYOUT_DOUBLE) { - findViewById(R.id.taskedit_fragment_container).setVisibility(View.GONE); - findViewById(R.id.filterlist_fragment_container).setVisibility(View.VISIBLE); - } else { - findViewById(R.id.taskedit_fragment_container).setVisibility(View.INVISIBLE); - } - onPostResume(); - } super.onBackPressed(); } diff --git a/astrid/src/com/todoroo/astrid/activity/TaskListWrapperActivity.java b/astrid/src/com/todoroo/astrid/activity/TaskListWrapperActivity.java index 829d6268e..374fc7dfa 100644 --- a/astrid/src/com/todoroo/astrid/activity/TaskListWrapperActivity.java +++ b/astrid/src/com/todoroo/astrid/activity/TaskListWrapperActivity.java @@ -140,6 +140,22 @@ public class TaskListWrapperActivity extends AstridWrapperActivity { lists.setText(item.title); } + @Override + public void onBackPressed() { + // manage task edit visibility + View taskeditFragmentContainer = findViewById(R.id.taskedit_fragment_container); + if(taskeditFragmentContainer != null && taskeditFragmentContainer.getVisibility() == View.VISIBLE) { + if(fragmentLayout == LAYOUT_DOUBLE) { + findViewById(R.id.taskedit_fragment_container).setVisibility(View.GONE); + findViewById(R.id.filterlist_fragment_container).setVisibility(View.VISIBLE); + } else { + findViewById(R.id.taskedit_fragment_container).setVisibility(View.INVISIBLE); + } + onPostResume(); + } + super.onBackPressed(); + } + @Override public void finish() { super.finish(); diff --git a/astrid/src/com/todoroo/astrid/adapter/TaskAdapter.java b/astrid/src/com/todoroo/astrid/adapter/TaskAdapter.java index 32cf65d80..c0c68e54e 100644 --- a/astrid/src/com/todoroo/astrid/adapter/TaskAdapter.java +++ b/astrid/src/com/todoroo/astrid/adapter/TaskAdapter.java @@ -894,7 +894,7 @@ public class TaskAdapter extends CursorAdapter implements Filterable { int[] location = new int[2]; v.getLocationOnScreen(location); - ViewHolder viewHolder = (ViewHolder)((View)v.getParent().getParent()).getTag(); + ViewHolder viewHolder = (ViewHolder)((View)v.getParent()).getTag(); if(Math.abs(location[1] + lastTouchYRawY.getLeft() - lastTouchYRawY.getRight()) > 10) { viewHolder.completeBox.setChecked(!viewHolder.completeBox.isChecked());