Update night theme

This commit is contained in:
Victor Shcherb 2015-04-20 23:42:11 +02:00
parent c371202f3f
commit 1ffdabdd54
44 changed files with 38 additions and 46 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

View file

@ -1,11 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > <layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<bitmap
android:gravity="center"
android:src="@drawable/map_bt_round_1_shadow" />
</item>
<item> <item>
<inset <inset
android:insetBottom="@dimen/map_button_inset_shadow" android:insetBottom="@dimen/map_button_inset_shadow"
@ -14,6 +8,7 @@
android:insetTop="@dimen/map_button_inset_shadow" > android:insetTop="@dimen/map_button_inset_shadow" >
<shape android:shape="oval" > <shape android:shape="oval" >
<solid android:color="@color/map_widget_dark" /> <solid android:color="@color/map_widget_dark" />
<stroke android:width="@dimen/map_button_stroke_dark" android:color="@color/map_widget_dark_stroke" />
</shape> </shape>
</inset> </inset>
</item> </item>

View file

@ -1,11 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > <layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<bitmap
android:gravity="center"
android:src="@drawable/map_bt_round_1_shadow" />
</item>
<item> <item>
<inset <inset
@ -15,6 +9,7 @@
android:insetTop="@dimen/map_button_inset_shadow" > android:insetTop="@dimen/map_button_inset_shadow" >
<shape android:shape="oval" > <shape android:shape="oval" >
<solid android:color="@color/map_widget_dark_pressed" /> <solid android:color="@color/map_widget_dark_pressed" />
<stroke android:width="@dimen/map_button_stroke_dark" android:color="@color/map_widget_dark_stroke" />
</shape> </shape>
</inset> </inset>
</item> </item>

View file

@ -3,11 +3,11 @@
<item android:state_pressed="true"><shape android:shape="rectangle"> <item android:state_pressed="true"><shape android:shape="rectangle">
<solid android:color="@color/map_widget_dark_pressed" /> <solid android:color="@color/map_widget_dark_pressed" />
<stroke android:width="@dimen/map_button_stroke" android:color="@color/map_widget_stroke" /> <stroke android:width="@dimen/map_button_stroke_dark" android:color="@color/map_widget_dark_stroke" />
</shape></item> </shape></item>
<item><shape android:shape="rectangle"> <item><shape android:shape="rectangle">
<solid android:color="@color/map_widget_dark" /> <solid android:color="@color/map_widget_dark" />
<stroke android:width="@dimen/map_button_stroke" android:color="@color/map_widget_stroke" /> <stroke android:width="@dimen/map_button_stroke_dark" android:color="@color/map_widget_dark_stroke" />
</shape></item> </shape></item>
</selector> </selector>

View file

@ -1,8 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > <layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<bitmap android:src="@drawable/map_bt_round_2_shadow" android:gravity="center" />
</item>
<item> <item>
<inset <inset
android:insetBottom="@dimen/map_button_inset" android:insetBottom="@dimen/map_button_inset"
@ -10,6 +7,7 @@
android:insetRight="@dimen/map_button_inset" android:insetRight="@dimen/map_button_inset"
android:insetTop="@dimen/map_button_inset" > android:insetTop="@dimen/map_button_inset" >
<shape android:shape="oval" > <shape android:shape="oval" >
<stroke android:width="@dimen/map_button_stroke_dark" android:color="@color/map_widget_dark_stroke" />
<solid android:color="@color/map_widget_dark_pressed" /> <solid android:color="@color/map_widget_dark_pressed" />
</shape> </shape>
</inset> </inset>

View file

@ -4,12 +4,12 @@
<item android:state_pressed="true"><shape android:shape="rectangle"> <item android:state_pressed="true"><shape android:shape="rectangle">
<solid android:color="@color/map_widget_dark_pressed" /> <solid android:color="@color/map_widget_dark_pressed" />
<corners android:radius="@dimen/map_button_rect_rad" /> <corners android:radius="@dimen/map_button_rect_rad" />
<stroke android:color="@color/map_widget_stroke" android:width="@dimen/map_button_stroke"/> <stroke android:width="@dimen/map_button_stroke_dark" android:color="@color/map_widget_dark_stroke" />
</shape></item> </shape></item>
<item><shape android:shape="rectangle"> <item><shape android:shape="rectangle">
<solid android:color="@color/map_widget_dark" /> <solid android:color="@color/map_widget_dark" />
<corners android:topLeftRadius="@dimen/map_button_rect_rad" android:bottomLeftRadius="@dimen/map_button_rect_rad" /> <corners android:topLeftRadius="@dimen/map_button_rect_rad" android:bottomLeftRadius="@dimen/map_button_rect_rad" />
<stroke android:color="@color/map_widget_stroke" android:width="@dimen/map_button_stroke"/> <stroke android:width="@dimen/map_button_stroke_dark" android:color="@color/map_widget_dark_stroke" />
</shape></item> </shape></item>
</selector> </selector>

View file

@ -4,7 +4,7 @@
<item android:state_pressed="true"><shape android:shape="rectangle"> <item android:state_pressed="true"><shape android:shape="rectangle">
<solid android:color="@color/map_widget_dark_pressed" /> <solid android:color="@color/map_widget_dark_pressed" />
<corners android:radius="@dimen/map_button_rect_rad" /> <corners android:radius="@dimen/map_button_rect_rad" />
<stroke android:color="@color/map_widget_stroke" android:width="@dimen/map_button_stroke"/> <stroke android:width="@dimen/map_button_stroke_dark" android:color="@color/map_widget_dark_stroke" />
</shape></item> </shape></item>
<item><shape android:shape="rectangle"> <item><shape android:shape="rectangle">
<solid android:color="@color/map_widget_dark" /> <solid android:color="@color/map_widget_dark" />
@ -12,7 +12,7 @@
android:topRightRadius="@dimen/map_button_rect_rad" android:topRightRadius="@dimen/map_button_rect_rad"
android:bottomRightRadius="@dimen/map_button_rect_rad" android:bottomRightRadius="@dimen/map_button_rect_rad"
/> />
<stroke android:color="@color/map_widget_stroke" android:width="@dimen/map_button_stroke"/> <stroke android:width="@dimen/map_button_stroke_dark" android:color="@color/map_widget_dark_stroke" />
</shape></item> </shape></item>
</selector> </selector>

View file

@ -1,11 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > <layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<nine-patch android:src="@drawable/bg_card_shadow" />
</item>
<item> <item>
<shape android:shape="rectangle"> <shape android:shape="rectangle">
<solid android:color="@color/map_widget_dark" /> <solid android:color="@color/map_widget_dark" />
<stroke android:width="@dimen/map_button_stroke_dark" android:color="@color/map_widget_dark_stroke" />
<corners android:radius="@dimen/map_button_rect_rad" /> <corners android:radius="@dimen/map_button_rect_rad" />
</shape> </shape>
</item> </item>

View file

@ -1,11 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > <layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<nine-patch android:src="@drawable/bg_card_shadow" />
</item>
<item> <item>
<shape android:shape="rectangle"> <shape android:shape="rectangle">
<solid android:color="@color/map_widget_dark_pressed" /> <solid android:color="@color/map_widget_dark_pressed" />
<stroke android:width="@dimen/map_button_stroke_dark" android:color="@color/map_widget_dark_stroke" />
<corners android:radius="@dimen/map_button_rect_rad" /> <corners android:radius="@dimen/map_button_rect_rad" />
</shape> </shape>
</item> </item>

View file

@ -36,6 +36,7 @@
<dimen name="map_button_inset">3dp</dimen> <dimen name="map_button_inset">3dp</dimen>
<dimen name="map_button_rect_rad">4dp</dimen> <dimen name="map_button_rect_rad">4dp</dimen>
<dimen name="map_button_stroke">1dp</dimen> <dimen name="map_button_stroke">1dp</dimen>
<dimen name="map_button_stroke_dark">2dp</dimen>
<dimen name="map_widget_icon_margin">6dp</dimen> <dimen name="map_widget_icon_margin">6dp</dimen>
<!-- General --> <!-- General -->

View file

@ -29,8 +29,9 @@
<color name="map_widget_icon_color">#ff8f00</color> <color name="map_widget_icon_color">#ff8f00</color>
<color name="map_widget_stroke">#4C000000</color> <color name="map_widget_stroke">#4C000000</color>
<color name="map_widget_light">#ffffff</color> <color name="map_widget_light">#ffffff</color>
<color name="map_widget_dark">#bb3f3f3f</color> <color name="map_widget_dark">#50000000</color>
<color name="map_widget_dark_pressed">#ddcccccc</color> <color name="map_widget_dark_stroke">#30ffffff</color>
<color name="map_widget_dark_pressed">#50ffffff</color>
<color name="map_widget_light_trans">#80ffffff</color> <color name="map_widget_light_trans">#80ffffff</color>
<color name="map_widget_light_pressed">#e5e5e5</color> <color name="map_widget_light_pressed">#e5e5e5</color>
<color name="map_widget_blue">#536dfe</color> <color name="map_widget_blue">#536dfe</color>

View file

@ -1482,6 +1482,7 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
<string name="free_version_title">Free version</string> <string name="free_version_title">Free version</string>
<string name="poi_context_menu_showdescription">Show POI description</string> <string name="poi_context_menu_showdescription">Show POI description</string>
<string name="index_name_north_america">North America</string> <string name="index_name_north_america">North America</string>
<string name="index_name_netherlands">Netherlands</string>
<string name="index_name_us">North America - United States</string> <string name="index_name_us">North America - United States</string>
<string name="index_name_central_america">Central America</string> <string name="index_name_central_america">Central America</string>
<string name="index_name_south_america">South America</string> <string name="index_name_south_america">South America</string>

View file

@ -542,14 +542,14 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
recordPlaceControl.setIcons(R.drawable.widget_icon_av_inactive_day, recordPlaceControl.setIcons(R.drawable.widget_icon_av_inactive_day,
R.drawable.widget_icon_av_inactive_night); R.drawable.widget_icon_av_inactive_night);
if (AV_DEFAULT_ACTION.get() == AV_DEFAULT_ACTION_VIDEO) { if (AV_DEFAULT_ACTION.get() == AV_DEFAULT_ACTION_VIDEO) {
recordPlaceControl.setIcons(R.drawable.widget_icon_video, recordPlaceControl.setIcons(R.drawable.widget_av_video_day,
R.drawable.widget_icon_video); R.drawable.widget_av_video_night);
} else if (AV_DEFAULT_ACTION.get() == AV_DEFAULT_ACTION_TAKEPICTURE) { } else if (AV_DEFAULT_ACTION.get() == AV_DEFAULT_ACTION_TAKEPICTURE) {
recordPlaceControl.setIcons(R.drawable.widget_icon_video, recordPlaceControl.setIcons(R.drawable.widget_av_photo_day,
R.drawable.widget_icon_video); R.drawable.widget_av_photo_night);
} else if (AV_DEFAULT_ACTION.get() == AV_DEFAULT_ACTION_AUDIO) { } else if (AV_DEFAULT_ACTION.get() == AV_DEFAULT_ACTION_AUDIO) {
recordPlaceControl.setIcons(R.drawable.widget_icon_audio, recordPlaceControl.setIcons(R.drawable.widget_av_audio_day,
R.drawable.widget_icon_audio); R.drawable.widget_av_audio_night);
} }
} }

View file

@ -82,6 +82,9 @@ public class IndexItemCategory implements Comparable<IndexItemCategory> {
} else if (lc.startsWith("gb_") || lc.startsWith("british")) { } else if (lc.startsWith("gb_") || lc.startsWith("british")) {
nameId = R.string.index_name_gb; nameId = R.string.index_name_gb;
order = 19; order = 19;
} else if ( lc.contains("netherlands")) {
nameId = R.string.index_name_netherlands;
order = 20;
} else if (lc.contains("russia")) { } else if (lc.contains("russia")) {
nameId = R.string.index_name_russia; nameId = R.string.index_name_russia;
order = 25; order = 25;

View file

@ -173,7 +173,8 @@ public class MapControlsLayer extends OsmandMapLayer {
private void initTopControls() { private void initTopControls() {
View configureMap = mapActivity.findViewById(R.id.map_layers_button); View configureMap = mapActivity.findViewById(R.id.map_layers_button);
controls.add(createHudButton((ImageView) configureMap, R.drawable.map_layer_dark).setIconColorId(0)); controls.add(createHudButton((ImageView) configureMap, R.drawable.map_layer_dark)
.setIconColorId(R.drawable.map_layer_dark, R.drawable.map_layer_night));
configureMap.setOnClickListener(new View.OnClickListener() { configureMap.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
@ -396,7 +397,8 @@ public class MapControlsLayer extends OsmandMapLayer {
private void initZooms() { private void initZooms() {
final OsmandMapTileView view = mapActivity.getMapView(); final OsmandMapTileView view = mapActivity.getMapView();
View zoomInButton = mapActivity.findViewById(R.id.map_zoom_in_button); View zoomInButton = mapActivity.findViewById(R.id.map_zoom_in_button);
controls.add(createHudButton((ImageView) zoomInButton, R.drawable.map_zoom_in).setIconColorId(0).setRoundTransparent()); controls.add(createHudButton((ImageView) zoomInButton, R.drawable.map_zoom_in).
setIconColorId(R.drawable.map_zoom_in, R.drawable.map_zoom_in_night).setRoundTransparent());
zoomInButton.setOnClickListener(new View.OnClickListener() { zoomInButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
@ -412,7 +414,8 @@ public class MapControlsLayer extends OsmandMapLayer {
final View.OnLongClickListener listener = MapControlsLayer.getOnClickMagnifierListener(view); final View.OnLongClickListener listener = MapControlsLayer.getOnClickMagnifierListener(view);
zoomInButton.setOnLongClickListener(listener); zoomInButton.setOnLongClickListener(listener);
View zoomOutButton = mapActivity.findViewById(R.id.map_zoom_out_button); View zoomOutButton = mapActivity.findViewById(R.id.map_zoom_out_button);
controls.add(createHudButton((ImageView) zoomOutButton, R.drawable.map_zoom_out).setIconColorId(0).setRoundTransparent()); controls.add(createHudButton((ImageView) zoomOutButton, R.drawable.map_zoom_out).
setIconColorId(R.drawable.map_zoom_out, R.drawable.map_zoom_out_night).setRoundTransparent());
zoomOutButton.setOnClickListener(new View.OnClickListener() { zoomOutButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
@ -524,14 +527,14 @@ public class MapControlsLayer extends OsmandMapLayer {
routePlanningMode = true; routePlanningMode = true;
} }
boolean routeFollowingMode = !routePlanningMode && rh.isFollowingMode(); boolean routeFollowingMode = !routePlanningMode && rh.isFollowingMode();
boolean showRouteCalculationControls = routePlanningMode; boolean showRouteCalculationControls = routePlanningMode ||
((System.currentTimeMillis() - touchEvent < TIMEOUT_TO_SHOW_BUTTONS) && routeFollowingMode);
// boolean showDefaultButtons = !routePlanningMode boolean showButtons = routePlanningMode || !routeFollowingMode;
// && (!routeFollowingMode || settings.SHOW_ZOOM_BUTTONS_NAVIGATION.get());
boolean showButtons = routePlanningMode || !routeFollowingMode || (System.currentTimeMillis() - touchEvent < TIMEOUT_TO_SHOW_BUTTONS);
updateMyLocation(rh); updateMyLocation(rh);
routePlanningBtn.setIconResId(routeFollowingMode ? R.drawable.ic_action_gabout_dark : R.drawable.map_directions ); // routePlanningBtn.setIconResId(routeFollowingMode ? R.drawable.ic_action_gabout_dark : R.drawable.map_directions );
routePlanningBtn.updateVisibility(showButtons && !routePlanningMode); // routePlanningBtn.updateVisibility(showButtons && !routePlanningMode);
routePlanningBtn.setIconResId(R.drawable.map_directions );
routePlanningBtn.updateVisibility(!routeFollowingMode && !routePlanningMode);
menuControl.updateVisibility(showButtons); menuControl.updateVisibility(showButtons);

View file

@ -16,7 +16,6 @@ import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity; import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.views.MapInfoLayer; import net.osmand.plus.views.MapInfoLayer;
import net.osmand.plus.views.OsmandMapLayer.DrawSettings; import net.osmand.plus.views.OsmandMapLayer.DrawSettings;
import net.osmand.plus.views.OsmandMapTileView;
import android.content.Context; import android.content.Context;
import android.widget.ArrayAdapter; import android.widget.ArrayAdapter;
import android.widget.LinearLayout; import android.widget.LinearLayout;