1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-11-17 23:34:54 +00:00

Merge pull request #557 from mauriciocolli/fix-settings-rotation

Fix settings on screen rotation
This commit is contained in:
Mauricio Colli 2017-05-14 11:20:29 -03:00 committed by GitHub
commit be421e580d

View File

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