Fixed a bug with the filterlist fragment not being present on phones

pull/14/head
Sam Bosley 13 years ago
parent 372e66da8a
commit 1afc91152c

@ -171,7 +171,8 @@ public class AstridWrapperActivity extends FragmentActivity
@Override @Override
public void onBackPressed() { public void onBackPressed() {
// manage task edit visibility // manage task edit visibility
if(findViewById(R.id.taskedit_fragment_container).getVisibility() == View.VISIBLE) { View taskeditFragmentContainer = findViewById(R.id.taskedit_fragment_container);
if(taskeditFragmentContainer != null && taskeditFragmentContainer.getVisibility() == View.VISIBLE) {
if(fragmentLayout == LAYOUT_DOUBLE) { if(fragmentLayout == LAYOUT_DOUBLE) {
findViewById(R.id.taskedit_fragment_container).setVisibility(View.GONE); findViewById(R.id.taskedit_fragment_container).setVisibility(View.GONE);
findViewById(R.id.filterlist_fragment_container).setVisibility(View.VISIBLE); findViewById(R.id.filterlist_fragment_container).setVisibility(View.VISIBLE);
@ -215,7 +216,10 @@ public class AstridWrapperActivity extends FragmentActivity
} }
FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
ft.replace(container, fragment, tag); if (container == 0)
ft.add(fragment, tag);
else
ft.replace(container, fragment, tag);
ft.commit(); ft.commit();
} }
return fragment; return fragment;

@ -79,6 +79,7 @@ public class TaskListWrapperActivity extends AstridWrapperActivity {
actionBar.setDisplayHomeAsUpEnabled(true); actionBar.setDisplayHomeAsUpEnabled(true);
listsNav.setOnClickListener(popupMenuClickListener); listsNav.setOnClickListener(popupMenuClickListener);
createPopover(); createPopover();
setupPopoverWithFilterList((FilterListActivity) setupFragment(FilterListActivity.TAG_FILTERLIST_FRAGMENT, 0, FilterListActivity.class));
} }
} }

Loading…
Cancel
Save