Merge branch 'master' of ssh://github.com/osmandapp/Osmand
Before Width: | Height: | Size: 948 B After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-hdpi/ic_check_box_dark.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
OsmAnd/res/drawable-hdpi/ic_check_box_light.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
OsmAnd/res/drawable-hdpi/ic_check_box_outline_dark.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
OsmAnd/res/drawable-hdpi/ic_check_box_outline_light.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
OsmAnd/res/drawable-hdpi/ic_world_globe_dark.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-hdpi/ic_world_globe_light.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 651 B After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 749 B After Width: | Height: | Size: 1.3 KiB |
BIN
OsmAnd/res/drawable-mdpi/ic_check_box_dark.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
OsmAnd/res/drawable-mdpi/ic_check_box_light.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
OsmAnd/res/drawable-mdpi/ic_check_box_outline_dark.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
OsmAnd/res/drawable-mdpi/ic_check_box_outline_light.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
OsmAnd/res/drawable-mdpi/ic_world_globe_dark.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
OsmAnd/res/drawable-mdpi/ic_world_globe_light.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.7 KiB |
BIN
OsmAnd/res/drawable-xhdpi/ic_check_box_dark.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
OsmAnd/res/drawable-xhdpi/ic_check_box_light.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
OsmAnd/res/drawable-xhdpi/ic_check_box_outline_dark.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
OsmAnd/res/drawable-xhdpi/ic_check_box_outline_light.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
OsmAnd/res/drawable-xhdpi/ic_world_globe_dark.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
OsmAnd/res/drawable-xhdpi/ic_world_globe_light.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
OsmAnd/res/drawable-xxhdpi/ic_action_refresh_dark.png
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
OsmAnd/res/drawable-xxhdpi/ic_action_refresh_light.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
OsmAnd/res/drawable-xxhdpi/ic_check_box_dark.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-xxhdpi/ic_check_box_light.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-xxhdpi/ic_check_box_outline_dark.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
OsmAnd/res/drawable-xxhdpi/ic_check_box_outline_light.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
OsmAnd/res/drawable-xxhdpi/ic_world_globe_dark.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
OsmAnd/res/drawable-xxhdpi/ic_world_globe_light.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
5
OsmAnd/res/drawable/check_dark.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_checked="true" android:drawable="@drawable/ic_check_box_dark" />
|
||||
<item android:drawable="@drawable/ic_check_box_outline_dark" />
|
||||
</selector>
|
5
OsmAnd/res/drawable/check_light.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_checked="true" android:drawable="@drawable/ic_check_box_light" />
|
||||
<item android:drawable="@drawable/ic_check_box_outline_light" />
|
||||
</selector>
|
6
OsmAnd/res/drawable/download_dark.xml
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_selected="true" android:drawable="@color/download_pressed_dark"/>
|
||||
<item android:state_pressed="true" android:drawable="@color/download_pressed_dark"/>
|
||||
<item android:drawable="@color/actionbar_dark_color"/>
|
||||
</selector>
|
6
OsmAnd/res/drawable/download_light.xml
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_selected="true" android:drawable="@color/download_pressed_light"/>
|
||||
<item android:state_pressed="true" android:drawable="@color/download_pressed_light"/>
|
||||
<item android:drawable="@color/tool_bar_color_light"/>
|
||||
</selector>
|
|
@ -94,6 +94,8 @@
|
|||
android:id="@+id/DownloadButton"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/downloadButtonBackground"
|
||||
android:textColor="?attr/pstsTextColor"
|
||||
android:gravity="center"
|
||||
android:text="@string/download_files"
|
||||
android:visibility="gone"/>
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<attr name="expandable_category_color" format="reference"/>
|
||||
<attr name="reset_image" format="reference"/>
|
||||
<attr name="bottomToolBarColor" format="color" />
|
||||
<attr name="downloadButtonBackground" format="reference" />
|
||||
<attr name="card_bg" format="reference" />
|
||||
<attr name="ic_action_check" format="reference" />
|
||||
<attr name="ic_extension" format="reference" />
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="actionbar_dark_color">#39464d</color>
|
||||
<color name="tool_bar_dark_color">#CC080B0D</color>
|
||||
<color name="tool_bar_color_dark">#CC080B0D</color>
|
||||
<color name="actionbar_light_color">#ff8f00</color>
|
||||
<color name="tool_bar_light_color">#b4ff8f00</color>
|
||||
<color name="tool_bar_color_light">#b4ff8f00</color>
|
||||
|
||||
<color name="download_pressed_light">#8cff8f00</color>
|
||||
<color name="download_pressed_dark">#be39464d</color>
|
||||
|
||||
|
||||
<color name="dashboard_descr_colol">#727272</color>
|
||||
<color name="dashboard_background">#eaeaea</color>
|
||||
|
|
|
@ -96,26 +96,38 @@
|
|||
<item name="windowActionBarOverlay">true</item>
|
||||
</style>
|
||||
|
||||
<style name="SettingsLightTheme" parent="Theme.AppCompat.Light">
|
||||
<item name="actionBarStyle">@style/Widget.Styled.ActionBarLight</item>
|
||||
<item name="android:actionBarStyle">@style/Widget.Styled.ActionBarLight</item>
|
||||
<item name="android:listChoiceIndicatorMultiple">@drawable/check_light</item>
|
||||
</style>
|
||||
|
||||
<style name="SettingsDarkTheme" parent="Theme.AppCompat">
|
||||
<item name="actionBarStyle">@style/Widget.Styled.ActionBarDark</item>
|
||||
<item name="android:actionBarStyle">@style/Widget.Styled.ActionBarDark</item>
|
||||
<item name="android:listChoiceIndicatorMultiple">@drawable/check_dark</item>
|
||||
</style>
|
||||
<style name="OsmandLightTheme" parent="Theme.AppCompat.Light">
|
||||
<item name="expandable_category_color">@color/group_background</item>
|
||||
<item name="android:actionDropDownStyle">@style/Widget.LightSpinner</item>
|
||||
<item name="actionDropDownStyle">@style/Widget.LightSpinner</item>
|
||||
<!--<item name="android:actionDropDownStyle">@style/Widget.LightSpinner</item>-->
|
||||
<!--<item name="actionDropDownStyle">@style/Widget.LightSpinner</item>-->
|
||||
<item name="reset_image">@drawable/ic_action_delete_light</item> <!-- @drawable/a_1_navigation_cancel_light -->
|
||||
<item name="windowActionBarOverlay">true</item>
|
||||
<item name="bottomToolBarColor">@color/tool_bar_light_color</item>
|
||||
<item name="bottomToolBarColor">@color/tool_bar_color_light</item>
|
||||
<item name="downloadButtonBackground">@drawable/download_light</item>
|
||||
<item name="pstsTabBackground">@color/actionbar_light_color</item>
|
||||
<item name="pstsUnderlineColor">@color/actionbar_light_color</item>
|
||||
<item name="pstsIndicatorColor">@color/color_white</item>
|
||||
<item name="pstsTextColor">@color/color_white</item>
|
||||
<item name="android:actionModeBackground">@color/actionbar_light_color</item>
|
||||
<item name="actionModeBackground">@color/actionbar_light_color</item>
|
||||
<item name="android:actionBarStyle">@style/Widget.Styled.ActionBarLight</item>
|
||||
<item name="android:actionModeCloseDrawable">@drawable/action_mode_back</item>
|
||||
<item name="actionModeCloseDrawable">@drawable/action_mode_back</item>
|
||||
<item name="android:actionModeStyle">@style/WhiteActionMode</item>
|
||||
<item name="actionModeStyle">@style/WhiteActionMode</item>
|
||||
<item name="android:actionMenuTextColor">@color/color_white</item>
|
||||
<item name="actionMenuTextColor">@color/color_white</item>
|
||||
<item name="android:actionBarStyle">@style/Widget.Styled.ActionBarLight</item>
|
||||
<item name="actionBarStyle">@style/Widget.Styled.ActionBarLight</item>
|
||||
<item name="card_bg">@drawable/bg_card_light</item>
|
||||
<item name="ic_action_check">@drawable/ic_action_check_light</item>
|
||||
|
@ -134,12 +146,10 @@
|
|||
|
||||
<style name="OsmandDarkTheme" parent="Theme.AppCompat">
|
||||
<item name="reset_image">@drawable/ic_action_delete_dark</item> <!-- @drawable/a_1_navigation_cancel_dark -->
|
||||
<item name="android:actionDropDownStyle">@style/Widget.DarkActionSpinner</item>
|
||||
<item name="actionDropDownStyle">@style/Widget.DarkActionSpinner</item>
|
||||
<item name="expandable_category_color">?android:attr/colorBackground</item>
|
||||
<item name="android:spinnerStyle">@style/Widget.DarkSpinner</item>
|
||||
<item name="windowActionBarOverlay">true</item>
|
||||
<item name="bottomToolBarColor">@color/tool_bar_dark_color</item>
|
||||
<item name="bottomToolBarColor">@color/tool_bar_color_dark</item>
|
||||
<item name="downloadButtonBackground">@drawable/download_dark</item>
|
||||
<item name="pstsTabBackground">@color/actionbar_dark_color</item>
|
||||
<item name="pstsUnderlineColor">@color/actionbar_dark_color</item>
|
||||
<item name="pstsIndicatorColor">@color/actionbar_light_color</item>
|
||||
|
@ -166,7 +176,7 @@
|
|||
<style name="OsmandLightDarkActionBarTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<item name="reset_image">@drawable/ic_action_delete_light</item> <!-- @drawable/a_1_navigation_cancel_light -->
|
||||
<item name="expandable_category_color">@color/group_background</item>
|
||||
<item name="bottomToolBarColor">@color/tool_bar_dark_color</item>
|
||||
<item name="bottomToolBarColor">@color/tool_bar_color_dark</item>
|
||||
<item name="pstsTabBackground">@color/actionbar_dark_color</item>
|
||||
<item name="pstsIndicatorColor">@color/actionbar_light_color</item>
|
||||
<item name="actionBarStyle">@style/Widget.Styled.ActionBarDark</item>
|
||||
|
@ -189,21 +199,6 @@
|
|||
<item name="android:textColor">@color/color_white</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.DarkSpinner" parent="@style/Widget.AppCompat.Spinner.DropDown.ActionBar">
|
||||
<item name="android:popupBackground">@color/actionbar_dark_color</item>
|
||||
<item name="android:textColor">@color/color_white</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.DarkActionSpinner" parent="@style/Widget.AppCompat.Spinner.DropDown.ActionBar">
|
||||
<item name="android:popupBackground">@color/actionbar_dark_color</item>
|
||||
<item name="android:textColor">@color/color_white</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.LightSpinner" parent="@style/Widget.AppCompat.Spinner.DropDown.ActionBar">
|
||||
<item name="android:popupBackground">@color/actionbar_light_color</item>
|
||||
<item name="android:textColor">@color/color_white</item>
|
||||
</style>
|
||||
|
||||
<style name="WhiteActionMode" parent="@style/Widget.AppCompat.ActionMode">
|
||||
<item name="android:titleTextStyle">@style/WhiteActionModeTitleTextStyle</item>
|
||||
<item name="titleTextStyle">@style/WhiteActionModeTitleTextStyle</item>
|
||||
|
|
|
@ -810,11 +810,7 @@ public class OsmandApplication extends Application {
|
|||
if (c instanceof ActionBarActivity) {
|
||||
ab = ((ActionBarActivity) c).getSupportActionBar();
|
||||
}
|
||||
// else if (c instanceof SherlockListActivity) {
|
||||
// ab = ((SherlockListActivity) c).getSupportActionBar();
|
||||
// } else if (c instanceof Expandable) {
|
||||
// ab = ((SherlockExpandableListActivity) c).getSupportActionBar();
|
||||
// }
|
||||
|
||||
if (ab != null) {
|
||||
BitmapDrawable bg = (BitmapDrawable) getResources().getDrawable(R.drawable.bg_striped);
|
||||
bg.setTileModeXY(TileMode.REPEAT, TileMode.REPEAT);
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
package net.osmand.plus.activities;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Build.VERSION;
|
||||
import android.os.Build.VERSION_CODES;
|
||||
|
@ -16,6 +14,7 @@ import android.view.View;
|
|||
import android.view.ViewGroup;
|
||||
import android.widget.Spinner;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.OsmandSettings;
|
||||
import net.osmand.plus.R;
|
||||
|
||||
public abstract class ActionBarPreferenceActivity extends PreferenceActivity {
|
||||
|
@ -29,6 +28,15 @@ public abstract class ActionBarPreferenceActivity extends PreferenceActivity {
|
|||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
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.SettingsLightTheme;
|
||||
if (settings.OSMAND_THEME.get() == OsmandSettings.OSMAND_DARK_THEME) {
|
||||
t = R.style.SettingsDarkTheme;
|
||||
} else if (settings.OSMAND_THEME.get() == OsmandSettings.OSMAND_LIGHT_THEME) {
|
||||
t = R.style.SettingsLightTheme;
|
||||
}
|
||||
setTheme(t);
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.preference_activity);
|
||||
toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
|
|
|
@ -13,7 +13,9 @@ import android.graphics.PorterDuff;
|
|||
import android.graphics.drawable.Drawable;
|
||||
import android.preference.*;
|
||||
import android.view.MenuItem;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.TextView;
|
||||
import net.osmand.access.AccessibleToast;
|
||||
import net.osmand.plus.ApplicationMode;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
|
@ -304,10 +306,10 @@ public abstract class SettingsBaseActivity extends ActionBarPreferenceActivity
|
|||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
((OsmandApplication) getApplication()).applyTheme(this);
|
||||
super.onCreate(savedInstanceState);
|
||||
getToolbar().setTitle(R.string.settings_activity);
|
||||
settings = getMyApplication().getSettings();
|
||||
getToolbar().setTitle(R.string.settings_activity);
|
||||
|
||||
|
||||
if (profileSettings) {
|
||||
modes.clear();
|
||||
|
@ -321,8 +323,9 @@ public abstract class SettingsBaseActivity extends ActionBarPreferenceActivity
|
|||
s.add(a.toHumanString(getMyApplication()));
|
||||
}
|
||||
|
||||
ArrayAdapter<String> spinnerAdapter = new ArrayAdapter<String>(this,
|
||||
SpinnerAdapter spinnerAdapter = new SpinnerAdapter(this,
|
||||
android.R.layout.simple_spinner_item, s);
|
||||
|
||||
spinnerAdapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);
|
||||
getSpinner().setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
|
@ -344,6 +347,23 @@ public abstract class SettingsBaseActivity extends ActionBarPreferenceActivity
|
|||
}
|
||||
|
||||
|
||||
class SpinnerAdapter extends ArrayAdapter<String>{
|
||||
|
||||
|
||||
public SpinnerAdapter(Context context, int resource, List<String> objects) {
|
||||
super(context, resource, objects);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getDropDownView(int position, View convertView, ViewGroup parent) {
|
||||
View view = super.getDropDownView(position, convertView, parent);
|
||||
if (!settings.isLightActionBar()){
|
||||
TextView textView = (TextView) view.findViewById(android.R.id.text1);
|
||||
textView.setBackgroundColor(getResources().getColor(R.color.actionbar_dark_color));
|
||||
}
|
||||
return view;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -64,7 +64,6 @@ public class SettingsGeneralActivity extends SettingsBaseActivity {
|
|||
private ListPreference drivingRegionPreference;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
((OsmandApplication) getApplication()).applyTheme(this);
|
||||
|
|