forked from upstream-mirrors/quik
Fixed crash when viewing sub-settings page
This commit is contained in:
@@ -310,7 +310,8 @@ public class MainActivity extends QKActivity implements SlidingMenu.SlidingMenuL
|
||||
if (!mSlidingMenu.isMenuShowing()) {
|
||||
Fragment category = getFragmentManager().findFragmentByTag(SettingsFragment.CATEGORY_TAG);
|
||||
if (category != null) {
|
||||
getFragmentManager().beginTransaction().remove(category).commit();
|
||||
getFragmentManager().beginTransaction()
|
||||
.replace(R.id.content_frame, SettingsFragment.newInstance(R.xml.settings_main)).commit();
|
||||
} else {
|
||||
mSlidingMenu.showMenu();
|
||||
}
|
||||
|
||||
@@ -520,7 +520,7 @@ public class SettingsFragment extends PreferenceFragment implements Preference.O
|
||||
Fragment fragment = SettingsFragment.newInstance(resId);
|
||||
getFragmentManager()
|
||||
.beginTransaction()
|
||||
.add(R.id.content_frame, fragment, CATEGORY_TAG)
|
||||
.replace(R.id.content_frame, fragment, CATEGORY_TAG)
|
||||
.commit();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user