No actionbar for settings

This commit is contained in:
GaidamakUA 2015-11-11 19:12:14 +02:00
parent c3cd0dd9f5
commit d3272f007f
2 changed files with 13 additions and 3 deletions

View file

@ -119,6 +119,11 @@
</style>
<style name="OsmandLightTheme.NoActionbar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="OsmandLightTheme.DarkActionbar">
<item name="android:textColorPrimary">@color/color_white</item>
<item name="android:textColorSecondary">@color/inactive_item_orange</item>
@ -156,6 +161,11 @@
<item name="android:backgroundDimEnabled">true</item>
</style>
<style name="OsmandDarkTheme.NoActionbar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="OsmandDarkTheme" parent="Theme.AppCompat">
<item name="list_divider">@color/list_divider_light</item>
<item name="expandable_category_color">?android:attr/colorBackground</item>

View file

@ -27,11 +27,11 @@ public abstract class ActionBarPreferenceActivity extends AppCompatPreferenceAct
protected void onCreate(final Bundle savedInstanceState) {
//settings needed it's own theme because of check boxes not styled properly
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) {
t = R.style.OsmandDarkTheme;
t = R.style.OsmandDarkTheme_NoActionbar;
} else if (settings.OSMAND_THEME.get() == OsmandSettings.OSMAND_LIGHT_THEME) {
t = R.style.OsmandLightTheme;
t = R.style.OsmandLightTheme_NoActionbar;
}
setTheme(t);
super.onCreate(savedInstanceState);