Android: Stop activity recreate when theme is set
Hopefully will fix those crashes on startup.
This commit is contained in:
parent
237c0a01b6
commit
4c3d2cd3fe
|
@ -137,14 +137,15 @@ public class MainActivity extends AppCompatActivity {
|
|||
.beginTransaction()
|
||||
.setReorderingAllowed(true).
|
||||
replace(R.id.content_fragment, listFragment)
|
||||
.commit();
|
||||
.commitAllowingStateLoss();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
loadSettings();
|
||||
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
setContentView(R.layout.activity_main);
|
||||
Toolbar toolbar = findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
|
|
Loading…
Reference in New Issue