Fix Settings on screen rotation
This commit is contained in:
parent
cac79d9a0d
commit
641ab25470
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue