1
0
mirror of https://github.com/TeamNewPipe/NewPipe.git synced 2024-11-22 11:02:35 +01:00

Fix Settings on screen rotation

This commit is contained in:
Mauricio Colli 2017-05-14 11:10:00 -03:00
parent cac79d9a0d
commit 641ab25470

View File

@ -53,15 +53,17 @@ public class SettingsActivity extends AppCompatActivity {
actionBar.setDisplayShowTitleEnabled(true);
}
getFragmentManager().beginTransaction()
.replace(R.id.fragment_holder, new SettingsFragment())
.commit();
if (savedInstanceBundle == null) {
getFragmentManager().beginTransaction()
.replace(R.id.fragment_holder, new SettingsFragment())
.commit();
}
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
if(id == android.R.id.home) {
if (id == android.R.id.home) {
finish();
}
return true;