mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-23 08:30:44 +00:00
Set up theme/locale before super.create()
This seems to solve a bug where the Open action menu dialog does not appear the first time on cold start on older Android (8.0). This is also the order of things in MainActivity and probably good practice.
This commit is contained in:
parent
87976693f8
commit
400ee808e0
@ -114,6 +114,11 @@ public class RouterActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(final Bundle savedInstanceState) {
|
protected void onCreate(final Bundle savedInstanceState) {
|
||||||
|
ThemeHelper.setDayNightMode(this);
|
||||||
|
setTheme(ThemeHelper.isLightThemeSelected(this)
|
||||||
|
? R.style.RouterActivityThemeLight : R.style.RouterActivityThemeDark);
|
||||||
|
Localization.assureCorrectAppLanguage(this);
|
||||||
|
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
Icepick.restoreInstanceState(this, savedInstanceState);
|
Icepick.restoreInstanceState(this, savedInstanceState);
|
||||||
|
|
||||||
@ -125,11 +130,6 @@ public class RouterActivity extends AppCompatActivity {
|
|||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ThemeHelper.setDayNightMode(this);
|
|
||||||
setTheme(ThemeHelper.isLightThemeSelected(this)
|
|
||||||
? R.style.RouterActivityThemeLight : R.style.RouterActivityThemeDark);
|
|
||||||
Localization.assureCorrectAppLanguage(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user