Merge "Fix a bug where cards overlap when rotating the screen"
This commit is contained in:
@@ -65,7 +65,13 @@ public class SettingsHomepageActivity extends SettingsBaseActivity {
|
||||
private void showFragment(Fragment fragment, int id, String tag) {
|
||||
final FragmentManager fragmentManager = getSupportFragmentManager();
|
||||
final FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
|
||||
final Fragment showFragment = fragmentManager.findFragmentById(id);
|
||||
|
||||
if (showFragment == null) {
|
||||
fragmentTransaction.add(id, fragment, tag);
|
||||
} else {
|
||||
fragmentTransaction.show(showFragment);
|
||||
}
|
||||
fragmentTransaction.commit();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user