Fixed Phone: Pressing a filter-item sometimes crashes with NPE

pull/14/head
Arne Jans 13 years ago
parent 6511d7e594
commit 63cc38df24

@ -17,12 +17,21 @@ public class FilterListWrapperActivity extends AstridWrapperActivity {
ThemeService.applyTheme(this);
super.onCreate(savedInstanceState);
setContentView(R.layout.filter_list_wrapper_activity);
}
/* (non-Javadoc)
* @see android.support.v4.app.FragmentActivity#onResume()
*/
@Override
protected void onResume() {
super.onResume();
Fragment frag = (Fragment) getSupportFragmentManager()
.findFragmentById(R.id.tasklist_fragment);
if (frag != null)
{
if (frag != null && frag.isInLayout()) {
mMultipleFragments = true;
} else {
mMultipleFragments = false;
}
}

@ -16,12 +16,21 @@ public class TaskEditWrapperActivity extends AstridWrapperActivity {
ThemeService.applyTheme(this);
super.onCreate(savedInstanceState);
setContentView(R.layout.task_edit_wrapper_activity);
}
/* (non-Javadoc)
* @see android.support.v4.app.FragmentActivity#onResume()
*/
@Override
protected void onResume() {
super.onResume();
Fragment frag = (Fragment) getSupportFragmentManager()
.findFragmentById(R.id.taskedit_fragment);
if (frag != null)
{
.findFragmentById(R.id.tasklist_fragment);
if (frag != null) {
mMultipleFragments = true;
} else {
mMultipleFragments = false;
}
}

@ -16,12 +16,21 @@ public class TaskListWrapperActivity extends AstridWrapperActivity {
ThemeService.applyTheme(this);
super.onCreate(savedInstanceState);
setContentView(R.layout.task_list_wrapper_activity);
}
/* (non-Javadoc)
* @see android.support.v4.app.FragmentActivity#onResume()
*/
@Override
protected void onResume() {
super.onResume();
Fragment frag = (Fragment) getSupportFragmentManager()
.findFragmentById(R.id.filterlist_fragment);
if (frag != null && frag.isInLayout())
{
if (frag != null && frag.isInLayout()) {
mMultipleFragments = true;
} else {
mMultipleFragments = false;
}
}

Loading…
Cancel
Save