Disable animations in activity transition
This commit is contained in:
parent
c7ebe9e979
commit
ed31ac41e3
2 changed files with 19 additions and 2 deletions
|
@ -86,6 +86,14 @@
|
||||||
<item name="android:windowBackground">@drawable/first_splash_screen_free_dev</item>
|
<item name="android:windowBackground">@drawable/first_splash_screen_free_dev</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="OsmandLightTheme.NoAnimation" parent="OsmandLightTheme">
|
||||||
|
<item name="android:windowAnimationStyle">@null</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="OsmandDarkTheme.NoAnimation" parent="OsmandDarkTheme">
|
||||||
|
<item name="android:windowAnimationStyle">@null</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<!-- Osmand themes styles -->
|
<!-- Osmand themes styles -->
|
||||||
<style name="OsmandLightTheme" parent="Theme.AppCompat.Light">
|
<style name="OsmandLightTheme" parent="Theme.AppCompat.Light">
|
||||||
<item name="mapBackground">@color/map_background_color_light</item>
|
<item name="mapBackground">@color/map_background_color_light</item>
|
||||||
|
|
|
@ -694,10 +694,19 @@ public class OsmandApplication extends MultiDexApplication {
|
||||||
|
|
||||||
public void applyTheme(Context c) {
|
public void applyTheme(Context c) {
|
||||||
int t = R.style.OsmandDarkTheme;
|
int t = R.style.OsmandDarkTheme;
|
||||||
|
boolean doNotUseAnimations = osmandSettings.DO_NOT_USE_ANIMATIONS.get();
|
||||||
if (osmandSettings.OSMAND_THEME.get() == OsmandSettings.OSMAND_DARK_THEME) {
|
if (osmandSettings.OSMAND_THEME.get() == OsmandSettings.OSMAND_DARK_THEME) {
|
||||||
t = R.style.OsmandDarkTheme;
|
if (doNotUseAnimations) {
|
||||||
|
t = R.style.OsmandDarkTheme_NoAnimation;
|
||||||
|
} else {
|
||||||
|
t = R.style.OsmandDarkTheme;
|
||||||
|
}
|
||||||
} else if (osmandSettings.OSMAND_THEME.get() == OsmandSettings.OSMAND_LIGHT_THEME) {
|
} else if (osmandSettings.OSMAND_THEME.get() == OsmandSettings.OSMAND_LIGHT_THEME) {
|
||||||
t = R.style.OsmandLightTheme;
|
if (doNotUseAnimations) {
|
||||||
|
t = R.style.OsmandLightTheme_NoAnimation;
|
||||||
|
} else {
|
||||||
|
t = R.style.OsmandLightTheme;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
setLanguage(c);
|
setLanguage(c);
|
||||||
c.setTheme(t);
|
c.setTheme(t);
|
||||||
|
|
Loading…
Reference in a new issue