Fixed a bug with task completion, moved onBackPressed override to tlwa

pull/14/head
Sam Bosley 13 years ago
parent 05018ec901
commit 121774dd4a

@ -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();
}

@ -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();

@ -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());

Loading…
Cancel
Save