No actionbar for settings
This commit is contained in:
parent
c3cd0dd9f5
commit
d3272f007f
2 changed files with 13 additions and 3 deletions
|
@ -119,6 +119,11 @@
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="OsmandLightTheme.NoActionbar">
|
||||||
|
<item name="windowActionBar">false</item>
|
||||||
|
<item name="windowNoTitle">true</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="OsmandLightTheme.DarkActionbar">
|
<style name="OsmandLightTheme.DarkActionbar">
|
||||||
<item name="android:textColorPrimary">@color/color_white</item>
|
<item name="android:textColorPrimary">@color/color_white</item>
|
||||||
<item name="android:textColorSecondary">@color/inactive_item_orange</item>
|
<item name="android:textColorSecondary">@color/inactive_item_orange</item>
|
||||||
|
@ -156,6 +161,11 @@
|
||||||
<item name="android:backgroundDimEnabled">true</item>
|
<item name="android:backgroundDimEnabled">true</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="OsmandDarkTheme.NoActionbar">
|
||||||
|
<item name="windowActionBar">false</item>
|
||||||
|
<item name="windowNoTitle">true</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="OsmandDarkTheme" parent="Theme.AppCompat">
|
<style name="OsmandDarkTheme" parent="Theme.AppCompat">
|
||||||
<item name="list_divider">@color/list_divider_light</item>
|
<item name="list_divider">@color/list_divider_light</item>
|
||||||
<item name="expandable_category_color">?android:attr/colorBackground</item>
|
<item name="expandable_category_color">?android:attr/colorBackground</item>
|
||||||
|
|
|
@ -27,11 +27,11 @@ public abstract class ActionBarPreferenceActivity extends AppCompatPreferenceAct
|
||||||
protected void onCreate(final Bundle savedInstanceState) {
|
protected void onCreate(final Bundle savedInstanceState) {
|
||||||
//settings needed it's own theme because of check boxes not styled properly
|
//settings needed it's own theme because of check boxes not styled properly
|
||||||
OsmandSettings settings = ((OsmandApplication) getApplication()).getSettings();
|
OsmandSettings settings = ((OsmandApplication) getApplication()).getSettings();
|
||||||
int t = R.style.OsmandLightTheme;
|
int t = R.style.OsmandLightTheme_NoActionbar;
|
||||||
if (settings.OSMAND_THEME.get() == OsmandSettings.OSMAND_DARK_THEME) {
|
if (settings.OSMAND_THEME.get() == OsmandSettings.OSMAND_DARK_THEME) {
|
||||||
t = R.style.OsmandDarkTheme;
|
t = R.style.OsmandDarkTheme_NoActionbar;
|
||||||
} else if (settings.OSMAND_THEME.get() == OsmandSettings.OSMAND_LIGHT_THEME) {
|
} else if (settings.OSMAND_THEME.get() == OsmandSettings.OSMAND_LIGHT_THEME) {
|
||||||
t = R.style.OsmandLightTheme;
|
t = R.style.OsmandLightTheme_NoActionbar;
|
||||||
}
|
}
|
||||||
setTheme(t);
|
setTheme(t);
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
Loading…
Reference in a new issue