Merge branch 'master' into prof_ui_fixes

This commit is contained in:
madwasp79 2019-07-03 14:32:28 +03:00
commit edd91c4a78
157 changed files with 1102 additions and 997 deletions

View file

@ -11,7 +11,7 @@ public class TransportStop extends MapObject {
private static final int DELETED_STOP = -1;
private int[] referencesToRoutes = null;
private Amenity amenity;
private TransportStopAggregated transportStopAggregated;
public int distance;
public int x31;
public int y31;
@ -37,11 +37,53 @@ public class TransportStop extends MapObject {
}
public Amenity getAmenity() {
return amenity;
if (transportStopAggregated != null) {
return transportStopAggregated.getAmenity();
}
return null;
}
public void setAmenity(Amenity amenity) {
this.amenity = amenity;
if (transportStopAggregated == null) {
transportStopAggregated = new TransportStopAggregated();
}
transportStopAggregated.setAmenity(amenity);
}
public List<TransportStop> getLocalTransportStops() {
if (transportStopAggregated != null) {
return transportStopAggregated.getLocalTransportStops();
}
return Collections.emptyList();
}
public void addLocalTransportStop(TransportStop stop) {
if (transportStopAggregated == null) {
transportStopAggregated = new TransportStopAggregated();
}
transportStopAggregated.addLocalTransportStop(stop);
}
public List<TransportStop> getNearbyTransportStops() {
if (transportStopAggregated != null) {
return transportStopAggregated.getNearbyTransportStops();
}
return Collections.emptyList();
}
public void addNearbyTransportStop(TransportStop stop) {
if (transportStopAggregated == null) {
transportStopAggregated = new TransportStopAggregated();
}
transportStopAggregated.addNearbyTransportStop(stop);
}
public TransportStopAggregated getTransportStopAggregated() {
return transportStopAggregated;
}
public void setTransportStopAggregated(TransportStopAggregated stopAggregated) {
transportStopAggregated = stopAggregated;
}
@Override

View file

@ -0,0 +1,65 @@
package net.osmand.data;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class TransportStopAggregated {
private Amenity amenity;
private List<TransportStop> localTransportStops;
private List<TransportStop> nearbyTransportStops;
public TransportStopAggregated() {
}
public Amenity getAmenity() {
return amenity;
}
public void setAmenity(Amenity amenity) {
this.amenity = amenity;
}
public List<TransportStop> getLocalTransportStops() {
if (localTransportStops == null) {
return Collections.emptyList();
}
return this.localTransportStops;
}
public void addLocalTransportStop(TransportStop stop) {
if (localTransportStops == null) {
localTransportStops = new ArrayList<>();
}
localTransportStops.add(stop);
}
public void addLocalTransportStops(List<TransportStop> stops) {
if (localTransportStops == null) {
localTransportStops = new ArrayList<>();
}
localTransportStops.addAll(stops);
}
public List<TransportStop> getNearbyTransportStops() {
if (nearbyTransportStops == null) {
return Collections.emptyList();
}
return this.nearbyTransportStops;
}
public void addNearbyTransportStop(TransportStop stop) {
if (nearbyTransportStops == null) {
nearbyTransportStops = new ArrayList<>();
}
nearbyTransportStops.add(stop);
}
public void addNearbyTransportStops(List<TransportStop> stops) {
if (nearbyTransportStops == null) {
nearbyTransportStops = new ArrayList<>();
}
nearbyTransportStops.addAll(stops);
}
}

View file

@ -1,4 +1,4 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/active_buttons_and_links_text_disabled_dark" android:state_enabled="false" />
<item android:color="@color/active_buttons_and_links_dark" />
<item android:color="@color/active_color_primary_dark" />
</selector>

View file

@ -1,4 +1,4 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/active_buttons_and_links_text_disabled_light" android:state_enabled="false" />
<item android:color="@color/active_buttons_and_links_light" />
<item android:color="@color/active_color_primary_light" />
</selector>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/dashboard_blue" android:state_checked="true"/>
<item android:color="@color/active_color_primary_light" android:state_checked="true"/>
<item android:color="@color/icon_color" android:state_checked="false"/>
</selector>

View file

@ -1,5 +1,5 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/active_buttons_and_links_text_dark" android:state_pressed="true" />
<item android:color="@color/active_buttons_and_links_text_disabled_dark" android:state_enabled="false" />
<item android:color="@color/active_buttons_and_links_dark" />
<item android:color="@color/active_color_primary_dark" />
</selector>

View file

@ -1,5 +1,5 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/active_buttons_and_links_text_light" android:state_pressed="true" />
<item android:color="@color/active_buttons_and_links_text_disabled_light" android:state_enabled="false" />
<item android:color="@color/active_buttons_and_links_light" />
<item android:color="@color/active_color_primary_light" />
</selector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 402 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 402 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 402 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 B

View file

@ -6,7 +6,7 @@
<corners android:radius="@dimen/dlg_button_rect_rad" />
</shape></item>
<item><shape android:shape="rectangle">
<solid android:color="@color/active_buttons_and_links_dark" />
<solid android:color="@color/active_color_primary_dark" />
<corners android:radius="@dimen/dlg_button_rect_rad" />
</shape></item>

View file

@ -6,7 +6,7 @@
<corners android:radius="@dimen/dlg_button_rect_rad" />
</shape></item>
<item><shape android:shape="rectangle">
<solid android:color="@color/active_buttons_and_links_light" />
<solid android:color="@color/active_color_primary_light" />
<corners android:radius="@dimen/dlg_button_rect_rad" />
</shape></item>

View file

@ -3,7 +3,7 @@
<item android:state_pressed="true">
<shape android:shape="rectangle">
<stroke android:width="1dp" android:color="@color/active_buttons_and_links_dark" />
<stroke android:width="1dp" android:color="@color/active_color_primary_dark" />
<corners android:radius="@dimen/dlg_button_rect_rad" />
</shape>
</item>
@ -15,7 +15,7 @@
</item>
<item>
<shape android:shape="rectangle">
<stroke android:width="1dp" android:color="@color/inactive_pages_dark" />
<stroke android:width="1dp" android:color="@color/divider_color_dark" />
<solid android:color="@color/stroked_buttons_and_links_dark" />
<corners android:radius="@dimen/dlg_button_rect_rad" />
</shape>

View file

@ -2,7 +2,7 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<stroke android:width="1dp" android:color="@color/active_buttons_and_links_light" />
<stroke android:width="1dp" android:color="@color/active_color_primary_light" />
<corners android:radius="@dimen/dlg_button_rect_rad" />
</shape>
</item>
@ -14,7 +14,7 @@
</item>
<item>
<shape android:shape="rectangle">
<stroke android:width="1dp" android:color="@color/profile_button_gray" />
<stroke android:width="1dp" android:color="@color/divider_color_light" />
<solid android:color="@color/stroked_buttons_and_links_light" />
<corners android:radius="@dimen/dlg_button_rect_rad" />
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 808 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 808 B

View file

@ -5,7 +5,7 @@
</item>
<item>
<shape>
<solid android:color="@color/bg_color_dark" />
<solid android:color="@color/list_background_color_dark" />
</shape>
</item>
</layer-list>

View file

@ -5,7 +5,7 @@
</item>
<item>
<shape>
<solid android:color="@color/bg_color_light" />
<solid android:color="@color/list_background_color_light" />
</shape>
</item>
</layer-list>

View file

@ -3,7 +3,7 @@
<item>
<shape android:shape="rectangle">
<corners android:radius="4dp" />
<solid android:color="@color/active_buttons_and_links_dark" />
<solid android:color="@color/active_color_primary_dark" />
</shape>
</item>
</selector>

View file

@ -3,7 +3,7 @@
<item>
<shape android:shape="rectangle">
<corners android:radius="4dp" />
<solid android:color="@color/active_buttons_and_links_light" />
<solid android:color="@color/active_color_primary_light" />
</shape>
</item>
</selector>

View file

@ -4,7 +4,7 @@
<shape android:shape="rectangle">
<corners android:radius="4dp" />
<solid android:color="@color/active_buttons_and_links_trans_dark" />
<stroke android:width="1dp" android:color="@color/active_buttons_and_links_dark" />
<stroke android:width="1dp" android:color="@color/active_color_primary_dark" />
</shape>
</item>
<item android:state_enabled="false">
@ -17,7 +17,7 @@
<shape android:shape="rectangle">
<solid android:color="@null" />
<corners android:radius="4dp" />
<solid android:color="@color/active_buttons_and_links_dark" />
<solid android:color="@color/active_color_primary_dark" />
</shape>
</item>
</selector>

View file

@ -4,7 +4,7 @@
<shape android:shape="rectangle">
<corners android:radius="4dp" />
<solid android:color="@color/active_buttons_and_links_trans_light" />
<stroke android:width="1dp" android:color="@color/active_buttons_and_links_light" />
<stroke android:width="1dp" android:color="@color/active_color_primary_light" />
</shape>
</item>
<item android:state_enabled="false">
@ -17,7 +17,7 @@
<shape android:shape="rectangle">
<solid android:color="@null" />
<corners android:radius="4dp" />
<solid android:color="@color/active_buttons_and_links_light" />
<solid android:color="@color/active_color_primary_light" />
</shape>
</item>
</selector>

View file

@ -3,7 +3,7 @@
<item>
<shape android:shape="rectangle">
<corners android:radius="4dp" />
<stroke android:width="1dp" android:color="@color/active_buttons_and_links_dark" />
<stroke android:width="1dp" android:color="@color/active_color_primary_dark" />
</shape>
</item>
</selector>

View file

@ -3,7 +3,7 @@
<item>
<shape android:shape="rectangle">
<corners android:radius="4dp" />
<stroke android:width="1dp" android:color="@color/active_buttons_and_links_light" />
<stroke android:width="1dp" android:color="@color/active_color_primary_light" />
</shape>
</item>
</selector>

View file

@ -3,7 +3,7 @@
<item android:state_pressed="true">
<shape android:shape="rectangle">
<corners android:radius="4dp" />
<stroke android:width="1dp" android:color="@color/active_buttons_and_links_dark" />
<stroke android:width="1dp" android:color="@color/active_color_primary_dark" />
</shape>
</item>
<item android:state_enabled="false">

View file

@ -3,7 +3,7 @@
<item android:state_pressed="true">
<shape android:shape="rectangle">
<corners android:radius="4dp" />
<stroke android:width="1dp" android:color="@color/active_buttons_and_links_light" />
<stroke android:width="1dp" android:color="@color/active_color_primary_light" />
</shape>
</item>
<item android:state_enabled="false">

View file

@ -3,7 +3,7 @@
<item android:state_pressed="true">
<shape android:shape="rectangle">
<corners android:radius="4dp" />
<stroke android:width="1dp" android:color="@color/active_buttons_and_links_dark" />
<stroke android:width="1dp" android:color="@color/active_color_primary_dark" />
</shape>
</item>
</selector>

View file

@ -3,7 +3,7 @@
<item android:state_pressed="true">
<shape android:shape="rectangle">
<corners android:radius="4dp" />
<stroke android:width="1dp" android:color="@color/active_buttons_and_links_light" />
<stroke android:width="1dp" android:color="@color/active_color_primary_light" />
</shape>
</item>
</selector>

View file

@ -4,7 +4,7 @@
<shape android:shape="rectangle">
<corners android:radius="4dp" />
<solid android:color="@color/active_buttons_and_links_trans_dark" />
<stroke android:width="1dp" android:color="@color/active_buttons_and_links_dark" />
<stroke android:width="1dp" android:color="@color/active_color_primary_dark" />
</shape>
</item>
</selector>

View file

@ -4,7 +4,7 @@
<shape android:shape="rectangle">
<corners android:radius="4dp" />
<solid android:color="@color/active_buttons_and_links_trans_light" />
<stroke android:width="1dp" android:color="@color/active_buttons_and_links_light" />
<stroke android:width="1dp" android:color="@color/active_color_primary_light" />
</shape>
</item>
</selector>

View file

@ -4,7 +4,7 @@
<shape android:shape="rectangle">
<corners android:radius="4dp" />
<solid android:color="@color/active_buttons_and_links_trans_dark" />
<stroke android:width="1dp" android:color="@color/active_buttons_and_links_dark" />
<stroke android:width="1dp" android:color="@color/active_color_primary_dark" />
</shape>
</item>
<item android:state_enabled="false">

View file

@ -4,7 +4,7 @@
<shape android:shape="rectangle">
<corners android:radius="4dp" />
<solid android:color="@color/active_buttons_and_links_trans_light" />
<stroke android:width="1dp" android:color="@color/active_buttons_and_links_light" />
<stroke android:width="1dp" android:color="@color/active_color_primary_light" />
</shape>
</item>
<item android:state_enabled="false">

View file

@ -4,7 +4,7 @@
<shape android:shape="rectangle">
<corners android:radius="4dp" />
<solid android:color="@color/active_buttons_and_links_trans_light" />
<stroke android:width="1dp" android:color="@color/active_buttons_and_links_light" />
<stroke android:width="1dp" android:color="@color/active_color_primary_light" />
</shape>
</item>
</selector>

View file

@ -10,7 +10,7 @@
<corners android:radius="@dimen/map_button_rect_rad" />
</shape></item>
<item><shape android:shape="rectangle">
<solid android:color="@color/active_buttons_and_links_light" />
<solid android:color="@color/active_color_primary_light" />
<corners android:radius="@dimen/map_button_rect_rad" />
</shape></item>

View file

@ -15,7 +15,7 @@
</item>
<item>
<shape android:shape="rectangle">
<solid android:color="@color/active_buttons_and_links_dark"/>
<solid android:color="@color/active_color_primary_dark"/>
<corners android:radius="@dimen/map_button_rect_rad"/>
</shape>
</item>

View file

@ -3,7 +3,7 @@
<item android:state_pressed="true">
<shape android:shape="rectangle">
<corners android:radius="@dimen/route_info_button_bg_line_radius" />
<stroke android:width="1dp" android:color="@color/active_buttons_and_links_dark" />
<stroke android:width="1dp" android:color="@color/active_color_primary_dark" />
</shape>
</item>
<item android:state_enabled="false">

View file

@ -3,7 +3,7 @@
<item android:state_pressed="true">
<shape android:shape="rectangle">
<corners android:radius="@dimen/route_info_button_bg_line_radius" />
<stroke android:width="1dp" android:color="@color/active_buttons_and_links_light" />
<stroke android:width="1dp" android:color="@color/active_color_primary_light" />
</shape>
</item>
<item android:state_enabled="false">

View file

@ -4,7 +4,7 @@
<shape android:shape="rectangle">
<corners android:radius="@dimen/route_info_button_bg_line_radius" />
<solid android:color="@color/active_buttons_and_links_trans_dark" />
<stroke android:width="1dp" android:color="@color/active_buttons_and_links_dark" />
<stroke android:width="1dp" android:color="@color/active_color_primary_dark" />
</shape>
</item>
<item android:state_enabled="false">

View file

@ -4,7 +4,7 @@
<shape android:shape="rectangle">
<corners android:radius="@dimen/route_info_button_bg_line_radius" />
<solid android:color="@color/active_buttons_and_links_trans_light" />
<stroke android:width="1dp" android:color="@color/active_buttons_and_links_light" />
<stroke android:width="1dp" android:color="@color/active_color_primary_light" />
</shape>
</item>
<item android:state_enabled="false">

View file

@ -10,7 +10,7 @@
<corners android:radius="@dimen/dlg_button_rect_rad" />
</shape></item>
<item><shape android:shape="rectangle">
<solid android:color="@color/active_buttons_and_links_dark" />
<solid android:color="@color/active_color_primary_dark" />
<corners android:radius="@dimen/dlg_button_rect_rad" />
</shape></item>

View file

@ -9,7 +9,7 @@
<corners android:radius="@dimen/dlg_button_rect_rad" />
</shape></item>
<item><shape android:shape="rectangle">
<solid android:color="@color/active_buttons_and_links_light" />
<solid android:color="@color/active_color_primary_light" />
<corners android:radius="@dimen/dlg_button_rect_rad" />
</shape></item>

View file

@ -10,7 +10,7 @@
<corners android:radius="@dimen/dlg_button_rect_rad" />
</shape></item>
<item><shape android:shape="rectangle">
<stroke android:color="@color/inactive_pages_dark" android:width="1dp" />
<stroke android:color="@color/divider_color_dark" android:width="1dp" />
<solid android:color="@color/stroked_buttons_and_links_dark" />
<corners android:radius="@dimen/dlg_button_rect_rad" />
</shape></item>

View file

@ -10,7 +10,7 @@
<corners android:radius="@dimen/dlg_button_rect_rad" />
</shape></item>
<item><shape android:shape="rectangle">
<stroke android:color="@color/profile_button_gray" android:width="1dp" />
<stroke android:color="@color/divider_color_light" android:width="1dp" />
<solid android:color="@color/stroked_buttons_and_links_light" />
<corners android:radius="@dimen/dlg_button_rect_rad" />
</shape></item>

View file

@ -2,7 +2,7 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="oval">
<solid android:color="@color/active_buttons_and_links_dark"/>
<solid android:color="@color/active_color_primary_dark"/>
</shape>
</item>
</layer-list>

View file

@ -2,7 +2,7 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="oval">
<solid android:color="@color/active_buttons_and_links_light"/>
<solid android:color="@color/active_color_primary_light"/>
</shape>
</item>
</layer-list>

View file

@ -2,7 +2,7 @@
android:color="@color/per42black">
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="@color/active_buttons_and_links_dark" />
<solid android:color="@color/active_color_primary_dark" />
<corners android:radius="4dp" />
</shape>
</item>

View file

@ -2,7 +2,7 @@
android:color="@color/per42black">
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="@color/active_buttons_and_links_light" />
<solid android:color="@color/active_color_primary_light" />
<corners android:radius="4dp" />
</shape>
</item>

View file

@ -2,7 +2,7 @@
android:color="@color/active_buttons_and_links_trans_dark">
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="@color/active_buttons_and_links_dark" />
<solid android:color="@color/active_color_primary_dark" />
<corners android:radius="4dp" />
</shape>
</item>

View file

@ -2,7 +2,7 @@
android:color="@color/active_buttons_and_links_trans_light">
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="@color/active_buttons_and_links_light" />
<solid android:color="@color/active_color_primary_light" />
<corners android:radius="4dp" />
</shape>
</item>

View file

@ -2,7 +2,7 @@
android:color="@color/active_buttons_and_links_trans_dark">
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="@color/active_buttons_and_links_dark" />
<solid android:color="@color/active_color_primary_dark" />
<corners android:radius="@dimen/route_info_button_bg_line_radius" />
</shape>
</item>

View file

@ -2,7 +2,7 @@
android:color="@color/active_buttons_and_links_trans_light">
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="@color/active_buttons_and_links_light" />
<solid android:color="@color/active_color_primary_light" />
<corners android:radius="@dimen/route_info_button_bg_line_radius" />
</shape>
</item>

View file

@ -2,7 +2,7 @@
android:color="@color/active_buttons_and_links_pressed_dark">
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="@color/active_buttons_and_links_dark" />
<solid android:color="@color/active_color_primary_dark" />
<corners android:radius="4dp" />
</shape>
</item>

View file

@ -2,7 +2,7 @@
android:color="@color/active_buttons_and_links_pressed_light">
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="@color/active_buttons_and_links_light" />
<solid android:color="@color/active_color_primary_light" />
<corners android:radius="4dp" />
</shape>
</item>

View file

@ -2,7 +2,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<solid android:color="@color/dashboard_blue" />
<solid android:color="@color/active_color_primary_light" />
<corners android:radius="3dp" />

View file

@ -77,8 +77,9 @@
android:id="@+id/findParkingButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:minHeight="@dimen/dialog_button_ex_height"
android:paddingTop="12dp"
android:paddingBottom="12dp"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:drawableLeft="@drawable/ic_action_parking_dark"
@ -97,8 +98,9 @@
android:id="@+id/recalcDestButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:minHeight="@dimen/dialog_button_ex_height"
android:paddingTop="12dp"
android:paddingBottom="12dp"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:drawableLeft="@drawable/ic_action_gdirections_dark"
@ -117,8 +119,9 @@
android:id="@+id/removeDestButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:minHeight="@dimen/dialog_button_ex_height"
android:paddingTop="12dp"
android:paddingBottom="12dp"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:drawableLeft="@drawable/ic_action_done"

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<Switch
<android.support.v7.widget.SwitchCompat
android:id="@+id/toggle_item"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View file

@ -39,7 +39,7 @@
android:layout_marginTop="-12dp"
android:visibility="gone"
tools:src="@drawable/ic_action_coordinates_longitude"
tools:tint="@color/dashboard_blue"/>
tools:tint="@color/active_color_primary_light"/>
<TextView
android:id="@+id/lat_side_of_the_world_tv"
@ -50,7 +50,7 @@
android:textSize="@dimen/default_list_text_size"
android:textStyle="bold"
tools:text="N"
tools:textColor="@color/dashboard_blue"/>
tools:textColor="@color/active_color_primary_light"/>
<ImageView
android:id="@+id/north_side_iv"
@ -59,7 +59,7 @@
android:layout_gravity="center_horizontal"
android:layout_marginBottom="-12dp"
tools:src="@drawable/ic_action_coordinates_longitude"
tools:tint="@color/dashboard_blue"/>
tools:tint="@color/active_color_primary_light"/>
</LinearLayout>
<LinearLayout
@ -187,7 +187,7 @@
android:layout_marginStart="-12dp"
android:visibility="gone"
tools:src="@drawable/ic_action_coordinates_latitude"
tools:tint="@color/dashboard_blue"/>
tools:tint="@color/active_color_primary_light"/>
<TextView
android:id="@+id/lon_side_of_the_world_tv"
@ -198,7 +198,7 @@
android:textSize="@dimen/default_list_text_size"
android:textStyle="bold"
tools:text="W"
tools:textColor="@color/dashboard_blue"/>
tools:textColor="@color/active_color_primary_light"/>
<ImageView
android:id="@+id/west_side_iv"
@ -208,7 +208,7 @@
android:layout_marginEnd="-12dp"
android:layout_marginRight="-12dp"
tools:src="@drawable/ic_action_coordinates_latitude"
tools:tint="@color/dashboard_blue"/>
tools:tint="@color/active_color_primary_light"/>
</LinearLayout>
<LinearLayout
@ -324,7 +324,7 @@
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="@dimen/content_padding"
android:background="@color/dialog_divider_dark"/>
android:background="@color/divider_color_dark"/>
<LinearLayout
android:id="@+id/point_name_et_container"

View file

@ -14,7 +14,7 @@
android:id="@+id/text"
style="@style/DashboardSubHeader"
android:layout_marginLeft="16dp"
android:textColor="@color/dashboard_black"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/default_list_text_size"
osmand:typeface="@string/font_roboto_regular"
tools:text="@string/lorem_ipsum"/>
@ -25,7 +25,7 @@
android:layout_height="48dp"
android:layout_gravity="center_vertical"
android:id="@+id/numberOfRowsTextView"
android:textColor="@color/dashboard_blue"
android:textColor="@color/active_color_primary_light"
android:textSize="@dimen/default_list_text_size"
osmand:typeface="@string/font_roboto_regular"
android:gravity="center"

View file

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="@+id/share_fragment_layout"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="true"
android:background="@android:color/transparent">
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="true"
android:background="@android:color/transparent">
<LinearLayout
android:id="@+id/main_view"
@ -77,8 +77,9 @@
android:id="@+id/findParkingButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:minHeight="@dimen/dialog_button_ex_height"
android:paddingTop="12dp"
android:paddingBottom="12dp"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:drawableLeft="@drawable/ic_action_parking_dark"
@ -97,8 +98,9 @@
android:id="@+id/recalcDestButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:minHeight="@dimen/dialog_button_ex_height"
android:paddingTop="12dp"
android:paddingBottom="12dp"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:drawableLeft="@drawable/ic_action_gdirections_dark"
@ -117,8 +119,9 @@
android:id="@+id/removeDestButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:minHeight="@dimen/dialog_button_ex_height"
android:paddingTop="12dp"
android:paddingBottom="12dp"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:drawableLeft="@drawable/ic_action_done"

View file

@ -66,7 +66,7 @@
android:paddingRight="16dp"
android:text="@string/shared_string_options"
android:textAllCaps="true"
android:textColor="@color/dashboard_blue"
android:textColor="@color/active_color_primary_light"
android:textSize="@dimen/default_list_text_size"
osmand:typeface="@string/font_roboto_medium"/>

View file

@ -21,7 +21,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_action_plus"
app:backgroundTint="@color/dashboard_blue"
app:backgroundTint="@color/active_color_primary_light"
app:fabSize="normal"
app:useCompatPadding="true"/>

View file

@ -66,7 +66,7 @@
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:text="Base Profile"/>
android:text="@string/profile_type_base_string"/>
<TextView
android:id="@+id/mode_title"
@ -360,7 +360,7 @@
android:layout_marginEnd="@dimen/list_content_padding"
android:layout_marginLeft="@dimen/list_content_padding"
android:layout_marginRight="@dimen/list_content_padding"
android:text="Setup Profile"
android:text="@string/edit_profile_setup_title"
android:textColor="?attr/main_font_color_basic"
android:textSize="@dimen/default_list_text_size"/>
@ -372,7 +372,7 @@
android:layout_marginEnd="@dimen/list_content_padding"
android:layout_marginLeft="@dimen/list_content_padding"
android:layout_marginRight="@dimen/list_content_padding"
android:text="Profile keeps its own settings"
android:text="@string/edit_profile_setup_subtitle"
android:textColor="@color/description_font_and_bottom_sheet_icons"/>
<LinearLayout
@ -404,14 +404,14 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Configure map"
android:text="@string/edit_profile_configure_map"
android:textColor="?attr/main_font_color_basic"
android:textSize="@dimen/default_list_text_size"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Select default map options for profile"
android:text="@string/edit_profile_setup_map_subtitle"
android:textColor="@color/description_font_and_bottom_sheet_icons"/>
</LinearLayout>
</LinearLayout>
@ -452,14 +452,14 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Configure screen"
android:text="@string/edit_profile_configure_screen_title"
android:textColor="?attr/main_font_color_basic"
android:textSize="@dimen/default_list_text_size"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Select default screen options for profile"
android:text="@string/edit_profile_screen_options_subtitle"
android:textColor="@color/description_font_and_bottom_sheet_icons"/>
</LinearLayout>
@ -502,14 +502,14 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Navigation settings"
android:text="@string/edit_profile_nav_settings_title"
android:textColor="?attr/main_font_color_basic"
android:textSize="@dimen/default_list_text_size"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Select default navigation settings for profile"
android:text="@string/edit_profile_nav_settings_subtitle"
android:textColor="@color/description_font_and_bottom_sheet_icons"/>
</LinearLayout>

View file

@ -29,7 +29,7 @@
android:gravity="center_horizontal"
android:lines="2"
android:maxLines="2"
android:textColor="@color/searchbar_text_hint_light"
android:textColor="?android:textColorSecondary"
tools:text="Remove POI"/>
</LinearLayout>

View file

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:osmand="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<LinearLayout
android:id="@+id/button_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:minHeight="@dimen/context_menu_controller_height"
tools:ignore="UselessParent">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/button_text"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@null"
android:gravity="center_vertical"
android:paddingLeft="@dimen/context_menu_button_padding_x"
android:paddingRight="@dimen/context_menu_button_padding_x"
android:textAllCaps="true"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium"
tools:text="Button" />
</LinearLayout>
</LinearLayout>

View file

@ -242,73 +242,26 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:orientation="horizontal"
android:paddingBottom="@dimen/context_menu_padding_margin_small"
android:paddingLeft="@dimen/content_padding_half"
android:paddingRight="@dimen/content_padding_half"
android:visibility="gone"
tools:visibility="visible">
<LinearLayout
android:id="@+id/title_button_view"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/context_menu_padding_margin_small"
android:layout_marginRight="@dimen/context_menu_padding_margin_small"
android:layout_weight="1"
android:minHeight="@dimen/context_menu_controller_height"
android:orientation="horizontal"
tools:background="?attr/ctx_menu_controller_bg">
<include
android:id="@+id/title_button_view"
layout="@layout/map_context_menu_button" />
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/title_button"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@null"
android:gravity="center_vertical"
android:paddingLeft="@dimen/context_menu_button_padding_x"
android:paddingRight="@dimen/context_menu_button_padding_x"
android:text="@string/recording_context_menu_play"
android:textAllCaps="true"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium"
tools:textColor="?attr/ctx_menu_controller_text_color"/>
<View
android:id="@+id/title_buttons_divider"
android:layout_width="@dimen/content_padding_half"
android:layout_height="match_parent" />
<TextView
android:id="@+id/title_button_right_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size"
tools:text="— 00:26"/>
</LinearLayout>
<LinearLayout
android:id="@+id/title_button_right_view"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/context_menu_padding_margin_small"
android:layout_marginRight="@dimen/context_menu_padding_margin_small"
android:layout_weight="1"
android:minHeight="@dimen/context_menu_controller_height"
android:orientation="horizontal"
tools:background="?attr/ctx_menu_controller_bg">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/title_button_right"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@null"
android:gravity="center_vertical"
android:paddingLeft="@dimen/context_menu_button_padding_x"
android:paddingRight="@dimen/context_menu_button_padding_x"
android:text="@string/shared_string_delete"
android:textAllCaps="true"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium"
tools:textColor="?attr/ctx_menu_controller_text_color"/>
</LinearLayout>
<include
android:id="@+id/title_button_right_view"
layout="@layout/map_context_menu_button" />
</LinearLayout>
@ -317,62 +270,26 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:orientation="horizontal"
android:paddingBottom="@dimen/context_menu_padding_margin_small"
android:paddingLeft="@dimen/content_padding_half"
android:paddingRight="@dimen/content_padding_half"
android:visibility="gone"
tools:visibility="visible">
<LinearLayout
<include
android:id="@+id/download_button_left_view"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/context_menu_padding_margin_small"
android:layout_marginRight="@dimen/context_menu_padding_margin_small"
android:layout_weight="1"
android:minHeight="@dimen/context_menu_controller_height"
tools:background="?attr/ctx_menu_controller_bg">
layout="@layout/map_context_menu_button" />
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/download_button_left"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@null"
android:gravity="center_vertical"
android:paddingLeft="@dimen/context_menu_button_padding_x"
android:paddingRight="@dimen/context_menu_button_padding_x"
android:text="@string/shared_string_download"
android:textAllCaps="true"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium"
tools:textColor="?attr/ctx_menu_controller_text_color"/>
<View
android:id="@+id/download_buttons_divider"
android:layout_width="@dimen/content_padding_half"
android:layout_height="match_parent" />
</LinearLayout>
<LinearLayout
<include
android:id="@+id/download_button_right_view"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/context_menu_padding_margin_small"
android:layout_marginRight="@dimen/context_menu_padding_margin_small"
android:layout_weight="1"
android:minHeight="@dimen/context_menu_controller_height"
tools:background="?attr/ctx_menu_controller_bg">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/download_button_right"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@null"
android:gravity="center_vertical"
android:paddingLeft="@dimen/context_menu_button_padding_x"
android:paddingRight="@dimen/context_menu_button_padding_x"
android:text="@string/shared_string_others"
android:textAllCaps="true"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium"
tools:textColor="?attr/ctx_menu_controller_text_color"/>
</LinearLayout>
layout="@layout/map_context_menu_button" />
</LinearLayout>
@ -381,36 +298,17 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:orientation="horizontal"
android:paddingBottom="@dimen/context_menu_padding_margin_small"
android:paddingLeft="@dimen/content_padding_half"
android:paddingRight="@dimen/content_padding_half"
android:visibility="gone"
tools:visibility="visible">
<LinearLayout
<include
android:id="@+id/title_button_bottom_view"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/context_menu_padding_margin_small"
android:layout_marginRight="@dimen/context_menu_padding_margin_small"
android:layout_weight="1"
android:minHeight="@dimen/context_menu_controller_height"
tools:background="?attr/ctx_menu_controller_bg">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/title_button_bottom"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@null"
android:gravity="center_vertical"
android:paddingLeft="@dimen/context_menu_button_padding_x"
android:paddingRight="@dimen/context_menu_button_padding_x"
android:text="@string/shared_string_delete"
android:textAllCaps="true"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium"
tools:textColor="?attr/ctx_menu_controller_text_color"/>
</LinearLayout>
layout="@layout/map_context_menu_button" />
</LinearLayout>

View file

@ -24,7 +24,7 @@
tools:text="Show passed"
android:textSize="@dimen/default_sub_text_size"
osmand:typeface="@string/font_roboto_medium"
android:textColor="@color/dashboard_blue"/>
android:textColor="@color/active_color_primary_light"/>
</FrameLayout>

View file

@ -15,7 +15,7 @@
android:layout_alignParentRight="true"
android:contentDescription="@string/quick_action_new_action"
android:src="@drawable/ic_action_plus"
app:backgroundTint="@color/dashboard_blue"
app:backgroundTint="@color/active_color_primary_light"
app:fabSize="normal"
app:useCompatPadding="true"/>

View file

@ -37,7 +37,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:textColor="@color/dialog_text_description_color"
android:textColor="?attr/dialog_text_description_color"
android:textSize="@dimen/default_sub_text_size"
tools:text="@string/osm_live_subscription"/>

View file

@ -43,7 +43,7 @@
android:layout_marginRight="@dimen/card_padding"
android:layout_marginBottom="@dimen/list_header_padding"
android:text="@string/osm_live_payment_header"
android:textColor="@color/dialog_text_description_color"
android:textColor="?attr/dialog_text_description_color"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_regular" />

View file

@ -36,6 +36,6 @@
android:text="@string/shared_string_dismiss"
android:layout_gravity="right"
android:background="?attr/selectableItemBackground"
android:textColor="@color/dashboard_blue"
android:textColor="@color/active_color_primary_light"
android:textAllCaps="true"/>
</LinearLayout>

View file

@ -126,7 +126,7 @@
android:gravity="center"
android:layout_gravity="bottom"
android:foreground="?attr/selectableItemBackground"
android:background="@color/dashboard_blue"/>
android:background="@color/active_color_primary_light"/>
</FrameLayout>

View file

@ -71,6 +71,6 @@
android:layout_margin="16dp"
android:src="@drawable/ic_action_plus"
android:contentDescription="@string/quick_action_new_action"
app:backgroundTint="@color/dashboard_blue"/>
app:backgroundTint="@color/active_color_primary_light"/>
</RelativeLayout>

View file

@ -55,7 +55,7 @@
android:gravity="left"
android:text="@string/quick_action_add_category"
android:textAllCaps="true"
android:textColor="@color/dashboard_blue"
android:textColor="@color/active_color_primary_light"
android:textSize="@dimen/default_list_text_size" />
</LinearLayout>

View file

@ -100,7 +100,7 @@
android:gravity="left"
android:text="@string/quick_action_map_style_action"
android:textAllCaps="true"
android:textColor="@color/dashboard_blue"
android:textColor="@color/active_color_primary_light"
android:textSize="@dimen/default_list_text_size" />
</LinearLayout>

View file

@ -2969,7 +2969,7 @@ Area honi dagokio: %1$s x %2$s</string>
<string name="previous_route">Aurreko ibilbidea</string>
<string name="shared_string_degrees">Graduak</string>
<string name="avoid_pt_types_descr">Hautatu nabigazioan ekidin beharreko garraio publikoak:</string>
<string name="quick_action_day_night_mode">% modua</string>
<string name="quick_action_day_night_mode">%s modua</string>
<string name="avoid_pt_types">Ekidin garraio motak…</string>
<string name="shared_string_walk">Ibili</string>
<string name="save_poi_value_exceed_length">\"%s\" etiketaren gehieneko luzera 255 karaktere da.

View file

@ -3000,7 +3000,7 @@
<string name="save_poi_value_exceed_length_title">Lengden på \"%s\"-verdien</string>
<string name="avoid_pt_types_descr">Velg offentlige transporttyper å unngå for navigasjon:</string>
<string name="avoid_pt_types">Unngå transporttyper…</string>
<string name="quick_action_day_night_mode">&amp;s-modus</string>
<string name="quick_action_day_night_mode">%s-modus</string>
<string name="shared_string_degrees">Grader</string>
<string name="shared_string_milliradians">Milliradianer</string>
<string name="angular_measeurement">Vinkel-måleenheter</string>

View file

@ -2782,7 +2782,7 @@ voor Gebied: %1$s x %2$s</string>
<string name="shared_string_milliradians">Milliradialen</string>
<string name="angular_measeurement_descr">Wijzig azimuth meet formaat.</string>
<string name="avoid_pt_types_descr">Selecteer de te vermijden openbaar vervoer opties:</string>
<string name="quick_action_day_night_mode">% modus</string>
<string name="quick_action_day_night_mode">%s modus</string>
<string name="avoid_pt_types">Vermijd transport types…</string>
<string name="shared_string_walk">Loop</string>
<string name="save_poi_value_exceed_length">The maximale tag lengte van \"%s\" is 255 karakters.

View file

@ -1,48 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="text_color_primary_light">#212121</color>
<color name="text_color_primary_dark">#cccccc</color>
<color name="text_color_secondary_light">#727272</color>
<color name="text_color_secondary_dark">#727272</color>
<color name="text_color_tertiary_light">#bfbfbf</color>
<color name="text_color_tertiary_dark">#404040</color>
<color name="active_color_primary_light">#237bff</color>
<color name="active_color_primary_dark">#d28521</color>
<color name="divider_color_light">#e6e6e6</color>
<color name="divider_color_dark">#2c3033</color>
<color name="activity_background_color_light">#f0f0f0</color>
<color name="activity_background_color_dark">#17181a</color>
<color name="activity_background_transparent_color_light">#eaf0f0f0</color>
<color name="activity_background_transparent_color_dark">#ea17181a</color>
<color name="list_background_color_light">#ffffff</color>
<color name="list_background_color_dark">#222526</color>
<color name="app_bar_color_light">#ff8800</color>
<color name="app_bar_color_dark">#101112</color>
<color name="status_bar_color_light">#e68200</color>
<color name="status_bar_color_dark">#101112</color>
<color name="active_buttons_and_links_pressed_light">#0f67eb</color>
<color name="active_buttons_and_links_pressed_dark">#b87114</color>
<color name="inactive_buttons_and_links_light">#f0f0f0</color>
<color name="inactive_buttons_and_links_dark">#222526</color>
<color name="stroked_buttons_and_links_light">#ffffff</color>
<color name="stroked_buttons_and_links_dark">#17181a</color>
<color name="active_buttons_and_links_text_light">#ffffff</color>
<color name="active_buttons_and_links_text_dark">#cccccc</color>
<color name="active_buttons_and_links_text_disabled_light">#727272</color>
<color name="active_buttons_and_links_text_disabled_dark">#727272</color>
<color name="subscription_active_bg_color_light">#fff9b2</color>
<color name="subscription_active_bg_color_dark">#43453b</color>
<color name="subscription_active_div_color_light">#f3edae</color>
<color name="subscription_active_div_color_dark">#32332c</color>
<color name="feature_purchased_bg">#78cc5c</color>
<color name="dialog_bg_color_light">#f0f0f0</color>
<color name="dialog_bg_color_night">#17191a</color>
<color name="dialog_transparent_bg_color_light">#eaf0f0f0</color>
<color name="dialog_transparent_bg_color_night">#ea17191a</color>
<color name="dialog_title_color_light">#212121</color>
<color name="dialog_title_color_dark">#cccccc</color>
<color name="dialog_description_color_light">#212121</color>
<color name="dialog_description_color_dark">#727272</color>
<color name="dialog_divider_light">#e6e6e6</color>
<color name="dialog_divider_dark">#2d3133</color>
<color name="dialog_text_description_color">#727272</color>
<color name="dialog_text_description_color_night">#808080</color>
<color name="card_description_text_color_light">#b3b3b3</color>
<color name="card_description_text_color_dark">#4d4d4d</color>
<color name="ctx_menu_nearby_routes_text_color_dark">#bfbfbf</color>
<color name="map_toolbar_switch_track_color">#c5d2e6</color>
<color name="mapillary_color">#3db878</color>
<color name="mapillary_color_pressed">#3a9f73</color>
<color name="mapillary_action_bar">#14c45d</color>
<color name="buy_button_color">#50ae55</color>
<color name="buy_button_pressed_color">#b5e5b9</color>
<color name="gpx_track_width_prop">#853fc5</color>
<color name="xmas_blue">#3f51b5</color>
<color name="disabled_btn_text_color">#a0a0a0</color>
<color name="discount_bar_bg">#357ef2</color>
<color name="searchbar_text_dark">#fff</color>
<color name="searchbar_text_light">#212121</color>
<color name="searchbar_text_hint_dark">#7a8c99</color>
<color name="searchbar_text_hint_light">#727272</color>
<color name="searchbar_tab_inactive_dark">#5b6872</color>
<color name="searchbar_tab_inactive_light">#727272</color>
@ -62,8 +72,6 @@
<color name="popup_separator_color">#BBBBBB</color>
<color name="popup_text_color">#FFFFFF</color>
<color name="primary_text_light">#de000000</color>
<color name="secondary_text_light">#8a000000</color>
<color name="primary_text_dark">#ffffffff</color>
<color name="secondary_text_dark">#b3ffffff</color>
@ -133,7 +141,6 @@
<color name="icon_color">#727272</color>
<color name="icon_color_light">#ccc</color>
<color name="icon_color_dark">#ff4f4f4f</color>
<color name="on_map_icon_color">#505050</color>
@ -150,8 +157,6 @@
<color name="dashboard_background">#eaeaea</color>
<color name="dashboard_divider_light">#F0F0F0</color>
<color name="dashboard_divider_dark">#3d474c</color>
<color name="dashboard_black">#212121</color>
<color name="dashboard_blue">#536DFE</color>
<color name="dashboard_subheader_text_dark">#b4c3cc</color>
<color name="dashboard_subheader_text_light">#727272</color>
<color name="dashboard_general_button_text_dark">#ff8f00</color>
@ -353,8 +358,6 @@
<color name="ctx_menu_bg_light">#ffffff</color>
<color name="ctx_menu_bg_dark">#17191a</color>
<color name="ctx_menu_title_color_light">#212121</color>
<color name="ctx_menu_title_color_dark">#cccccc</color>
<color name="ctx_menu_subtitle_color">#727272</color>
<color name="ctx_menu_direction_color_light">#536dfe</color>
<color name="ctx_menu_direction_color_dark">#e69122</color>
@ -382,8 +385,6 @@
<color name="ctx_menu_bottom_view_bg_dark">#17191a</color>
<color name="ctx_menu_bottom_view_icon_light">#b3b3b3</color>
<color name="ctx_menu_bottom_view_icon_dark">#454a4d</color>
<color name="ctx_menu_bottom_view_text_color_light">#212121</color>
<color name="ctx_menu_bottom_view_text_color_dark">#cccccc</color>
<color name="ctx_menu_bottom_view_secondary_text_color_light">#a6a6a6</color>
<color name="ctx_menu_bottom_view_secondary_text_color_dark">#595959</color>
<color name="ctx_menu_amenity_opened_text_color">#5baf3f</color>
@ -446,12 +447,8 @@
<color name="wikivoyage_bottom_bar_divider_dark">#2d3133</color>
<color name="wikivoyage_secondary_btn_bg_light">#f0f0f0</color>
<color name="wikivoyage_secondary_btn_bg_dark">#2d3133</color>
<color name="wikivoyage_primary_btn_text_light">#ffffff</color>
<color name="wikivoyage_primary_btn_text_dark">#cccccc</color>
<color name="wikivoyage_welcome_bg_light">#ffffff</color>
<color name="wikivoyage_welcome_bg_dark">#000000</color>
<color name="wikivoyage_primary_text_light">#212121</color>
<color name="wikivoyage_primary_text_dark">#cccccc</color>
<color name="wikivoyage_secondary_text">#727272</color>
<color name="wikivoyage_start_editing_card_image_background">#339966</color>
<color name="wikivoyage_open_beta_card_image_background">#008bf8</color>
@ -473,19 +470,9 @@
<color name="card_and_list_background_light">#ffffff</color>
<color name="divider_dark">#1b1d1f</color>
<color name="divider_light">#f0f0f0</color>
<color name="main_font_dark">#cccccc</color>
<color name="main_font_light">#212121</color>
<color name="description_font_and_bottom_sheet_icons">#727272</color>
<color name="additional_description_dark">#4d4d4d</color>
<color name="additional_description_light">#b3b3b3</color>
<color name="active_buttons_and_links_light">#237bff</color>
<color name="active_buttons_and_links_dark">#d28521</color>
<color name="active_buttons_and_links_pressed_light">#0F67EB</color>
<color name="active_buttons_and_links_pressed_dark">#B87114</color>
<color name="inactive_buttons_and_links_light">#F0F0F0</color>
<color name="inactive_buttons_and_links_dark">#222526</color>
<color name="stroked_buttons_and_links_light">#ffffff</color>
<color name="stroked_buttons_and_links_dark">#17181A</color>
<color name="inactive_pages_light">#cccccc</color>
<color name="inactive_pages_dark">#505050</color>
<color name="active_buttons_and_links_trans_light">#66237bff</color>
@ -494,11 +481,6 @@
<color name="profile_button_gray">#EFEFEF</color>
<color name="profile_button_gray_pressed">#ababab</color>
<color name="active_buttons_and_links_text_disabled_light">#727272</color>
<color name="active_buttons_and_links_text_disabled_dark">#727272</color>
<color name="active_buttons_and_links_text_light">#ffffff</color>
<color name="active_buttons_and_links_text_dark">#cccccc</color>
<color name="profile_icon_color_blue_light_default">#237BFF</color>
<color name="profile_icon_color_purple_light">#732EEB</color>
<color name="profile_icon_color_green_light">#0EBE92</color>

View file

@ -11,20 +11,31 @@
Thx - Hardy
-->
<string name="app_mode_offroad">Offroad</string>
<string name="edit_profile_setup_title">Setup Profile</string>
<string name="edit_profile_setup_subtitle">Profile keeps its own settings</string>
<string name="edit_profile_configure_map">Configure map</string>
<string name="edit_profile_setup_map_subtitle">Select default map options for profile</string>
<string name="edit_profile_configure_screen_title">Configure screen</string>
<string name="edit_profile_screen_options_subtitle">Select default screen options for profile</string>
<string name="edit_profile_nav_settings_title">Navigation settings</string>
<string name="edit_profile_nav_settings_subtitle">Select default navigation settings for profile</string>
<string name="routing_attr_max_num_changes_description">Specify max number of changes</string>
<string name="routing_attr_max_num_changes_name">Number of changes</string>
<string name="app_mode_ufo">UFO</string>
<string name="release_3_4">
• Application profiles: create your own profile for your needs, with a custom icon and color\n\n
• Add settings for default and min/max speed for profiles\n\n
• Add a widget with current coordinates\n\n
• Add options to show the compass on the map with a radius ruler\n\n
• Application profiles: create a custom profile for your own needs, with a custom icon and color\n\n
Now customize any profile\'s default and min/max speeds\n\n
• Added a widget for the current coordinates\n\n
• Added options to show the compass and a radius ruler on the map\n\n
• Fix background track logging\n\n
• Improved background map downloads\n\n
• Fixed Wikipedia language selection\n\n
• Fixed compass button behavior during navigation\n\n
• Other bug fixes\n\n
</string>
<string name="precision_hdop_and_vdop">Precision horizontal: %1$s, vertical: %2$s</string>
<string name="precision_hdop">Precision horizontal: %s</string>
<string name="precision_hdop_and_vdop">Precision horizontally: %1$s, vertically: %2$s</string>
<string name="precision_hdop">Precision horizontally: %s</string>
<string name="app_mode_personal_transporter">Personal transporter</string>
<string name="app_mode_monowheel">Monowheel</string>
<string name="app_mode_scooter">Scooter</string>
@ -33,76 +44,76 @@
<string name="default_speed_setting_title">Default speed</string>
<string name="default_speed_setting_descr">Change default speed settings</string>
<string name="minmax_speed_dialog_title">Set min/max speed</string>
<string name="default_speed_dialog_msg">Used for calculations of expected arrival time during routing</string>
<string name="new_profile">New Profile</string>
<string name="default_speed_dialog_msg">Used to calculate the expected arrival time during routing</string>
<string name="new_profile">New profile</string>
<string name="shared_string_crash">Crash</string>
<string name="last_launch_crashed">The last launch of OsmAnd failed. Help us improve OsmAnd. Please send us an error message.</string>
<string name="press_again_to_change_the_map_orientation">Press again to change the map orientation</string>
<string name="last_launch_crashed">The last launch of OsmAnd failed. Please help us to improve OsmAnd by sharing the error message.</string>
<string name="press_again_to_change_the_map_orientation">Tap again to change the map orientation</string>
<string name="process_downloading_service">OsmAnd downloading service</string>
<string name="shared_string_color_magenta">Magenta</string>
<string name="shared_string_icon">Icon</string>
<string name="rate_dialog_descr">Please give us 30 seconds, share feedback and rate our work on Google Play.</string>
<string name="rate_dialog_descr">Please give us 30 seconds by sharing your feedback and rating our work on Google Play.</string>
<string name="button_rate">Rate</string>
<string name="shared_string_privacy_policy">Privacy Policy</string>
<string name="help_us_make_osmand_better">Help us make OsmAnd better!</string>
<string name="make_osmand_better_descr">Allow OsmAnd to collect and process anonymous application usage data. We do not collect or store data about your location, or about the locations that you view on the map.\n\nYou can always change your selection in Settings > Privacy and Security.</string>
<string name="make_osmand_better_descr">Allow OsmAnd to collect and process anonymous application usage data. We do not collect or store data about your position, or about any locations you view on the map.\n\nYou can change your selection at any time in Settings > Privacy and Security.</string>
<string name="choose_data_to_share">Choose what type of data you want to share:</string>
<string name="downloaded_maps">Downloaded Maps</string>
<string name="visited_screens">Visited screens</string>
<string name="collected_data">Collected Data</string>
<string name="downloaded_maps">Maps downloaded</string>
<string name="visited_screens">Screens visited</string>
<string name="collected_data">Data collected</string>
<string name="collected_data_descr">List of data you want to share with OsmAnd.</string>
<string name="downloaded_maps_collect_descr">We collect this data to understand the maps of which regions and countries are the most popular.</string>
<string name="visited_screens_collect_descr">We collect this data to understand the most popular features of OsmAnd.</string>
<string name="privacy_and_security_change_descr">By clicking \"Allow\" you agree with our %1$s</string>
<string name="downloaded_maps_collect_descr">We collect this data to understand which maps of which regions and countries are the most popular.</string>
<string name="visited_screens_collect_descr">We collect this data to understand which OsmAnd features are the most popular.</string>
<string name="privacy_and_security_change_descr">By tapping \"Allow\" you agree with our %1$s</string>
<string name="settings_privacy_and_security">Privacy and Security</string>
<string name="settings_privacy_and_security_desc">Choose your data for sharing with us</string>
<string name="settings_privacy_and_security_desc">Select which data you are sharing with us</string>
<string name="shared_string_no_thank_you">No, thank you</string>
<string name="shared_string_allow">Allow</string>
<string name="profile_name_hint">Profile Name</string>
<string name="nav_type_hint">Navigation Type</string>
<string name="profile_name_hint">Profile name</string>
<string name="nav_type_hint">Navigation type</string>
<string name="app_mode_taxi">Taxi</string>
<string name="app_mode_shuttle_bus">Shuttle bus</string>
<string name="app_mode_subway">Subway</string>
<string name="app_mode_horse">Horse</string>
<string name="app_mode_helicopter">Helicopter</string>
<string name="osmand_routing_promo">You can add own modified version of routing.xml to ..osmand/routing</string>
<string name="osmand_routing_promo">You can add your own modified version of the file routing.xml in ..osmand/routing</string>
<string name="app_mode_skiing">Skiing</string>
<string name="base_profile_descr_ski">Skiing</string>
<string name="show_compass_ruler">Show compass ruler</string>
<string name="hide_compass_ruler">Hide compass ruler</string>
<string name="select_icon_profile_dialog_title">Select icon</string>
<string name="settings_routing_mode_string">Mode: %s</string>
<string name="settings_derived_routing_mode_string">User Mode, derived from: %s</string>
<string name="settings_derived_routing_mode_string">User mode, derived from: %s</string>
<string name="routing_profile_ski">Ski</string>
<string name="profile_type_descr_string">Type: %s</string>
<string name="profile_type_base_string">Base Profile</string>
<string name="profile_alert_need_routing_type_title">Select navigation type</string>
<string name="profile_alert_need_routing_type_msg">You need to select Navigation type to create New Application Profile</string>
<string name="profile_alert_need_profile_name_title">Enter Profile Name</string>
<string name="profile_alert_need_routing_type_msg">Please select a navigation type for the new application profile</string>
<string name="profile_alert_need_profile_name_title">Enter profile name</string>
<string name="profile_alert_need_profile_name_msg">Profile name shouldn\'t be empty!</string>
<string name="profile_alert_duplicate_name_title">Duplicate Name</string>
<string name="profile_alert_duplicate_name_msg">There is already profile with such name</string>
<string name="profile_alert_cant_delete_base">You cannot delete OsmAnd base profiles</string>
<string name="profile_alert_need_save_title">Save Changes</string>
<string name="profile_alert_need_save_msg">You need to save changes to Profile before proceed</string>
<string name="profile_alert_delete_title">Delete Profile</string>
<string name="profile_alert_delete_msg">Are you sure you want to delete %s profile</string>
<string name="select_base_profile_dialog_title">Select base profile</string>
<string name="select_base_profile_dialog_message">Custom Application Profile should be based on one of the default App Profiles. Selected Profile defines basic settings: setup of Widgets, units of speed and distance. In string below Profile\'s name, you could learn which Navigation Profiles are suitable for each Application Profile.</string>
<string name="profile_alert_duplicate_name_title">Duplicate name</string>
<string name="profile_alert_duplicate_name_msg">There is already profile with that name</string>
<string name="profile_alert_cant_delete_base">You cannot delete OsmAnd\'s base profiles</string>
<string name="profile_alert_need_save_title">Save changes</string>
<string name="profile_alert_need_save_msg">You need to save changes to the profile before proceeding</string>
<string name="profile_alert_delete_title">Delete profile</string>
<string name="profile_alert_delete_msg">Are you sure you want to delete the %s profile</string>
<string name="select_base_profile_dialog_title">Select a base profile</string>
<string name="select_base_profile_dialog_message">Base your custom profile on one of the default app profiles, this defines the basic setup like default visibility of widgets and units of speed and distance. These are the default app profiles, together with examples of custom profiles they may be extended to:</string>
<string name="select_nav_profile_dialog_title">Select navigation type</string>
<string name="base_profile_descr_car">Car, Truck, Motorcycle</string>
<string name="base_profile_descr_bicycle">MTB, Moped, Horse</string>
<string name="base_profile_descr_pedestrian">Walking, Hiking, Running</string>
<string name="base_profile_descr_car">Car, truck, motorcycle</string>
<string name="base_profile_descr_bicycle">MTB, moped, horse</string>
<string name="base_profile_descr_pedestrian">Walking, hiking, running</string>
<string name="base_profile_descr_public_transport">All PT types</string>
<string name="base_profile_descr_boat">Ship, Rowing, Sailing</string>
<string name="base_profile_descr_aircraft">Airplane, Gliding</string>
<string name="base_profile_descr_boat">Ship, rowing, sailing</string>
<string name="base_profile_descr_aircraft">Airplane, gliding</string>
<string name="routing_profile_geocoding">Geocoding</string>
<string name="routing_profile_straightline">Straight Line</string>
<string name="routing_profile_broutrer">BRouter (Offline)</string>
<string name="routing_profile_straightline">Straight line</string>
<string name="routing_profile_broutrer">BRouter (offline)</string>
<string name="osmand_default_routing">OsmAnd routing</string>
<string name="custom_routing">Custom routing profile</string>
<string name="special_routing_type">Special routing</string>
<string name="third_party_routing_type">3rd-party routing</string>
<string name="third_party_routing_type">Third-party routing</string>
<string name="application_profiles_descr">Select the profiles to be visible in the app.</string>
<string name="application_profiles">Application profiles</string>
<string name="searching_gps">Searching GPS</string>
@ -113,7 +124,7 @@
<string name="files_present">%1$d files (%2$s) are present at previous location \'%3$s\'.</string>
<string name="move_maps">Move maps</string>
<string name="dont_move_maps">Don\'t move</string>
<string name="public_transport_ped_route_title">The route by foot is approximately %1$s and it could be faster than by public transport</string>
<string name="public_transport_ped_route_title">The route by foot is approximately %1$s and may be faster than via public transport</string>
<string name="public_transport_no_route_title">Unfortunately, OsmAnd could not find a route suitable for your settings.</string>
<string name="public_transport_try_ped">Try the pedestrian navigation.</string>
<string name="public_transport_try_change_settings">Try changing the settings.</string>
@ -3239,4 +3250,5 @@
<string name="routing_attr_freeride_policy_name">Off-piste</string>
<string name="routing_attr_freeride_policy_description">Freerides and offpiste are unofficial routes and passages. Typically ungroomed, unmainted by the officials and not checked in the evening. Enter at own risk.</string>
</resources>

View file

@ -112,8 +112,8 @@
<item name="routeParameterTitleColor">@color/color_myloc_distance</item>
<item name="ctx_menu_info_divider">@color/ctx_menu_info_divider_light</item>
<item name="ctx_menu_card_btn">@color/ctx_menu_card_btn_light</item>
<item name="searchbar_text">@color/searchbar_text_light</item>
<item name="searchbar_text_hint">@color/searchbar_text_hint_light</item>
<item name="searchbar_text">@color/text_color_primary_light</item>
<item name="searchbar_text_hint">@color/text_color_secondary_light</item>
<item name="list_divider">@color/divider_light</item>
<item name="expandable_category_color">?android:attr/colorBackground</item>
<item name="bottomToolBarColor">@color/tool_bar_color_light</item>
@ -137,7 +137,7 @@
<item name="bottom_menu_view_bg">@drawable/bg_bottom_menu_light</item>
<item name="left_menu_view_bg">@drawable/bg_left_menu_light</item>
<item name="bg_point_editor_view">@drawable/bg_point_editor_view_light</item>
<item name="dashboard_divider">@color/dashboard_divider_light</item>
<item name="dashboard_divider">@color/divider_color_light</item>
<item name="divider_color">@color/divider_color</item>
<item name="dashboard_button">@drawable/dashboard_button_light</item>
<item name="ctx_menu_info_view_bg">@color/ctx_menu_info_view_bg_light</item>
@ -165,14 +165,18 @@
@color/dashboard_general_button_text_light
</item>
<item name="android:listChoiceIndicatorMultiple">@drawable/check_light</item>
<item name="android:textColorPrimary">@color/color_black</item>
<item name="android:textColorPrimary">@color/text_color_primary_light</item>
<item name="android:textColorSecondary">@color/text_color_secondary_light</item>
<item name="android:textColorTertiary">@color/text_color_tertiary_light</item>
<item name="spinnerItemTextColor">@color/color_black</item>
<item name="spinnerListBackground">@color/spinner_list_background_light</item>
<item name="colorButtonNormal">@color/color_white</item>
<item name="colorPrimary">@color/osmand_orange</item>
<item name="colorPrimaryDark">@color/osmand_orange_dark</item>
<item name="colorAccent">@color/dashboard_blue</item>
<item name="colorAccent">@color/active_color_primary_light</item>
<item name="android:actionModeBackground">@color/actionbar_light_color</item>
<item name="android:actionBarStyle">@style/Widget.Styled.ActionBarLight</item>
@ -189,7 +193,6 @@
<item name="search_tabbar_layout_theme">@style/OsmandLightTheme.SearchTabbar</item>
<item name="toolbar_theme">@style/OsmandLightTheme.Toolbar</item>
<item name="new_app_theme">@style/OsmandLightTheme.NewAppTheme</item>
<item name="android:textColorSecondary">@color/icon_color</item>
<item name="contextMenuButtonColor">@color/map_widget_blue</item>
<item name="color_dialog_buttons">@color/color_dialog_buttons_light</item>
@ -203,12 +206,12 @@
<item name="subscription_active_bg_color">@color/subscription_active_bg_color_light</item>
<item name="subscription_active_div_color">@color/subscription_active_div_color_light</item>
<item name="dialog_bg_color">@color/dialog_bg_color_light</item>
<item name="dialog_transparent_bg_color">@color/dialog_transparent_bg_color_light</item>
<item name="dialog_title_color">@color/dialog_title_color_light</item>
<item name="dialog_description_color">@color/dialog_description_color_light</item>
<item name="dialog_text_description_color">@color/dialog_text_description_color</item>
<item name="card_description_text_color">@color/card_description_text_color_light</item>
<item name="dialog_bg_color">@color/activity_background_color_light</item>
<item name="dialog_transparent_bg_color">@color/activity_background_transparent_color_light</item>
<item name="dialog_title_color">@color/text_color_primary_light</item>
<item name="dialog_description_color">@color/text_color_primary_light</item>
<item name="dialog_text_description_color">@color/text_color_secondary_light</item>
<item name="card_description_text_color">@color/text_color_tertiary_light</item>
<item name="wikivoyage_bg_color">@color/wikivoyage_bg_light</item>
<item name="wikivoyage_card_bg_color">@color/wikivoyage_card_bg_light</item>
@ -219,9 +222,9 @@
<item name="wikivoyage_bottom_bar_bg_color">@color/wikivoyage_bottom_bar_bg_light</item>
<item name="wikivoyage_bottom_bar_divider_color">@color/wikivoyage_bottom_bar_divider_light</item>
<item name="wikivoyage_secondary_btn_bg_color">@color/wikivoyage_secondary_btn_bg_light</item>
<item name="wikivoyage_primary_btn_text_color">@color/wikivoyage_primary_btn_text_light</item>
<item name="wikivoyage_primary_btn_text_color">@color/active_buttons_and_links_text_light</item>
<item name="wikivoyage_welcome_bg_color">@color/wikivoyage_welcome_bg_light</item>
<item name="wikivoyage_primary_text_color">@color/wikivoyage_primary_text_light</item>
<item name="wikivoyage_primary_text_color">@color/text_color_primary_light</item>
<item name="wikivoyage_travel_card_bg">@drawable/travel_card_bg_light</item>
<item name="wikivoyage_travel_card_stroke_bg">@drawable/travel_card_stroke_bg_light</item>
@ -241,8 +244,8 @@
<item name="flow_toolbar_bg">@drawable/flow_toolbar_bg_light</item>
<item name="divider_color_basic">@color/divider_light</item>
<item name="main_font_color_basic">@color/main_font_light</item>
<item name="active_color_basic">@color/active_buttons_and_links_light</item>
<item name="main_font_color_basic">@color/text_color_primary_light</item>
<item name="active_color_basic">@color/active_color_primary_light</item>
<item name="card_and_list_background_basic">@color/card_and_list_background_light</item>
<item name="activity_background_basic">@color/activity_background_light</item>
<item name="pages_bg">@drawable/pages_bg_light</item>
@ -275,7 +278,7 @@
</style>
<style name="OsmandLightTheme.NoActionbar.Preferences">
<item name="android:textColorSecondary">@color/color_black</item>
<item name="android:textColorSecondary">@color/text_color_secondary_light</item>
</style>
<style name="OsmandLightTheme.DarkActionbar">
@ -289,8 +292,8 @@
<style name="OsmandLightTheme.SearchTabbar">
<item name="android:textColorPrimary">@color/osmand_orange</item>
<item name="colorAccent">@color/osmand_orange</item>
<item name="android:textColorSecondary">@color/searchbar_tab_inactive_light</item>
<item name="android:textColorHint">@color/searchbar_tab_inactive_light</item>
<item name="android:textColorSecondary">@color/text_color_secondary_light</item>
<item name="android:textColorHint">@color/text_color_secondary_light</item>
</style>
<style name="OsmandLightTheme.Toolbar">
@ -317,8 +320,8 @@
<style name="OsmandDarkTheme.SearchTabbar">
<item name="android:textColorPrimary">@color/osmand_orange</item>
<item name="colorAccent">@color/osmand_orange</item>
<item name="android:textColorSecondary">@color/searchbar_tab_inactive_dark</item>
<item name="android:textColorHint">@color/searchbar_tab_inactive_dark</item>
<item name="android:textColorSecondary">@color/text_color_secondary_dark</item>
<item name="android:textColorHint">@color/text_color_secondary_dark</item>
</style>
<style name="OsmandLightTheme.BottomSheet">
@ -343,7 +346,7 @@
</style>
<style name="OsmandDarkTheme.NoActionbar.Preferences">
<item name="android:textColorSecondary">@color/color_white</item>
<item name="android:textColorSecondary">@color/text_color_secondary_dark</item>
</style>
<style name="OsmandDarkTheme.NoAnimation">
@ -366,8 +369,8 @@
<item name="routeParameterTitleColor">@color/osmand_orange</item>
<item name="ctx_menu_info_divider">@color/ctx_menu_info_divider_dark</item>
<item name="ctx_menu_card_btn">@color/ctx_menu_card_btn_dark</item>
<item name="searchbar_text">@color/searchbar_text_dark</item>
<item name="searchbar_text_hint">@color/searchbar_text_hint_dark</item>
<item name="searchbar_text">@color/text_color_primary_dark</item>
<item name="searchbar_text_hint">@color/text_color_secondary_dark</item>
<item name="list_divider">@color/divider_dark</item>
<item name="expandable_category_color">?android:attr/colorBackground</item>
<item name="bottomToolBarColor">@color/tool_bar_color_dark</item>
@ -390,7 +393,7 @@
<item name="bottom_menu_view_bg">@drawable/bg_bottom_menu_dark</item>
<item name="left_menu_view_bg">@drawable/bg_left_menu_dark</item>
<item name="bg_point_editor_view">@drawable/bg_point_editor_view_dark</item>
<item name="dashboard_divider">@color/dashboard_divider_dark</item>
<item name="dashboard_divider">@color/divider_color_dark</item>
<item name="divider_color">@color/dashboard_divider_dark</item>
<item name="dashboard_button">@drawable/dashboard_button_dark</item>
<item name="ctx_menu_info_view_bg">@color/ctx_menu_info_view_bg_dark</item>
@ -411,7 +414,11 @@
<item name="dashboard_subheader_text_color">@color/dashboard_subheader_text_dark</item>
<item name="dashboard_general_button_text_color">@color/dashboard_general_button_text_dark</item>
<item name="android:listChoiceIndicatorMultiple">@drawable/check_dark</item>
<item name="android:textColorPrimary">@color/color_white</item>
<item name="android:textColorPrimary">@color/text_color_primary_dark</item>
<item name="android:textColorSecondary">@color/text_color_secondary_dark</item>
<item name="android:textColorTertiary">@color/text_color_tertiary_dark</item>
<item name="spinnerItemTextColor">@color/color_white</item>
<item name="spinnerListBackground">@color/spinner_list_background_dark</item>
<item name="colorButtonNormal">@color/actionbar_dark_color</item>
@ -427,7 +434,6 @@
<item name="search_tabbar_layout_theme">@style/OsmandDarkTheme.SearchTabbar</item>
<item name="toolbar_theme">@style/OsmandDarkTheme</item>
<item name="new_app_theme">@style/OsmandDarkTheme</item>
<item name="android:textColorSecondary">@color/dash_search_icon_dark</item>
<item name="contextMenuButtonColor">@color/osmand_orange</item>
<item name="color_dialog_buttons">@color/color_dialog_buttons_dark</item>
@ -442,12 +448,12 @@
<item name="subscription_active_div_color">@color/subscription_active_div_color_dark</item>
<item name="circle_dialog_bg">@drawable/circle_dialog_bg_night</item>
<item name="dialog_bg_color">@color/dialog_bg_color_night</item>
<item name="dialog_transparent_bg_color">@color/dialog_transparent_bg_color_night</item>
<item name="dialog_title_color">@color/dialog_title_color_dark</item>
<item name="dialog_description_color">@color/dialog_description_color_dark</item>
<item name="dialog_text_description_color">@color/dialog_text_description_color_night</item>
<item name="card_description_text_color">@color/card_description_text_color_dark</item>
<item name="dialog_bg_color">@color/activity_background_color_dark</item>
<item name="dialog_transparent_bg_color">@color/activity_background_transparent_color_dark</item>
<item name="dialog_title_color">@color/text_color_primary_dark</item>
<item name="dialog_description_color">@color/text_color_secondary_dark</item>
<item name="dialog_text_description_color">@color/text_color_secondary_dark</item>
<item name="card_description_text_color">@color/text_color_tertiary_dark</item>
<item name="wikivoyage_bg_color">@color/wikivoyage_bg_dark</item>
<item name="wikivoyage_card_bg_color">@color/wikivoyage_card_bg_dark</item>
@ -458,9 +464,9 @@
<item name="wikivoyage_bottom_bar_bg_color">@color/wikivoyage_bottom_bar_bg_dark</item>
<item name="wikivoyage_bottom_bar_divider_color">@color/wikivoyage_bottom_bar_divider_dark</item>
<item name="wikivoyage_secondary_btn_bg_color">@color/wikivoyage_secondary_btn_bg_dark</item>
<item name="wikivoyage_primary_btn_text_color">@color/wikivoyage_primary_btn_text_dark</item>
<item name="wikivoyage_primary_btn_text_color">@color/active_buttons_and_links_text_dark</item>
<item name="wikivoyage_welcome_bg_color">@color/wikivoyage_welcome_bg_dark</item>
<item name="wikivoyage_primary_text_color">@color/wikivoyage_primary_text_dark</item>
<item name="wikivoyage_primary_text_color">@color/text_color_primary_dark</item>
<item name="wikivoyage_travel_card_bg">@drawable/travel_card_bg_dark</item>
<item name="wikivoyage_travel_card_stroke_bg">@drawable/travel_card_stroke_bg_dark</item>
@ -480,8 +486,8 @@
<item name="flow_toolbar_bg">@drawable/flow_toolbar_bg_dark</item>
<item name="divider_color_basic">@color/divider_dark</item>
<item name="main_font_color_basic">@color/main_font_dark</item>
<item name="active_color_basic">@color/active_buttons_and_links_dark</item>
<item name="main_font_color_basic">@color/text_color_primary_dark</item>
<item name="active_color_basic">@color/active_color_primary_dark</item>
<item name="card_and_list_background_basic">@color/card_and_list_background_dark</item>
<item name="activity_background_basic">@color/activity_background_dark</item>
<item name="pages_bg">@drawable/pages_bg_dark</item>

View file

@ -351,20 +351,20 @@ public class AndroidUtils {
public static void setTextPrimaryColor(Context ctx, TextView textView, boolean night) {
textView.setTextColor(night ?
ctx.getResources().getColor(R.color.primary_text_dark)
: ctx.getResources().getColor(R.color.primary_text_light));
ctx.getResources().getColor(R.color.text_color_primary_dark)
: ctx.getResources().getColor(R.color.text_color_primary_light));
}
public static void setTextSecondaryColor(Context ctx, TextView textView, boolean night) {
textView.setTextColor(night ?
ctx.getResources().getColor(R.color.secondary_text_dark)
: ctx.getResources().getColor(R.color.secondary_text_light));
ctx.getResources().getColor(R.color.text_color_secondary_dark)
: ctx.getResources().getColor(R.color.text_color_secondary_light));
}
public static void setHintTextSecondaryColor(Context ctx, TextView textView, boolean night) {
textView.setHintTextColor(night ?
ctx.getResources().getColor(R.color.secondary_text_dark)
: ctx.getResources().getColor(R.color.secondary_text_light));
ctx.getResources().getColor(R.color.text_color_secondary_dark)
: ctx.getResources().getColor(R.color.text_color_secondary_light));
}

View file

@ -61,7 +61,7 @@ public class AContextMenuButton implements Parcelable {
return rightIconName;
}
public boolean isNeedColorizeIcon() {
public boolean isTintIcon() {
return needColorizeIcon;
}

View file

@ -11,6 +11,7 @@ import com.jwetherell.openmap.common.UTMPoint;
import java.util.LinkedHashMap;
import java.util.Map;
import net.osmand.LocationConvert;
import net.osmand.plus.OsmAndFormatter;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandSettings;
import net.osmand.plus.R;
@ -52,6 +53,8 @@ public class PointDescription {
public static final String POINT_TYPE_MAPILLARY_IMAGE = "mapillary_image";
public static final String POINT_TYPE_POI_TYPE = "poi_type";
public static final String POINT_TYPE_CUSTOM_POI_FILTER = "custom_poi_filter";
public static final int LOCATION_URL = 200;
public static final int LOCATION_LIST_HEADER = 201;
public static final PointDescription LOCATION_POINT = new PointDescription(POINT_TYPE_LOCATION, "");
@ -175,41 +178,57 @@ public class PointDescription {
}
}
public static Map<String, String> getLocationData(MapActivity ctx, double lat, double lon, boolean sh) {
public static Map<Integer, String> getLocationData(MapActivity ctx, double lat, double lon, boolean sh) {
OsmandSettings settings = ((OsmandApplication) ctx.getApplicationContext()).getSettings();
Map<String, String> results = new LinkedHashMap<>();
int f = settings.COORDINATES_FORMAT.get();
UTMPoint pnt = new UTMPoint(new LatLonPoint(lat, lon));
results.put(PointDescription.formatToHumanString(ctx, UTM_FORMAT), pnt.zone_number + "" + pnt.zone_letter + " " + ((long) pnt.easting) + " "+ ((long) pnt.northing));
Map<Integer, String> results = new LinkedHashMap<>();
String latLonString ;
String latLonDeg;
String latLonMin;
String latLonSec;
String utm = OsmAndFormatter.formatLocationCoordinates(lat, lon, OsmAndFormatter.FORMAT_UTM);
String olc = OsmAndFormatter.formatLocationCoordinates(lat, lon, OsmAndFormatter.FORMAT_OLC);
try {
results.put(PointDescription.formatToHumanString(ctx, OLC_FORMAT), getLocationOlcName(lat, lon));
latLonString = OsmAndFormatter.formatLocationCoordinates(lat, lon, OsmAndFormatter.FORMAT_DEGREES_SHORT);
latLonDeg = OsmAndFormatter.formatLocationCoordinates(lat, lon, OsmAndFormatter.FORMAT_DEGREES);
latLonMin = OsmAndFormatter.formatLocationCoordinates(lat, lon, OsmAndFormatter.FORMAT_MINUTES);
latLonSec = OsmAndFormatter.formatLocationCoordinates(lat, lon, OsmAndFormatter.FORMAT_SECONDS);
} catch (RuntimeException e) {
results.put(PointDescription.formatToHumanString(ctx, OLC_FORMAT), "0, 0");
latLonString = "0, 0";
latLonDeg = "0°, 0°";
latLonMin = "0° 0, 0° 0";
latLonSec = "0° 0 0″, 0° 0 0″";
}
if (f == PointDescription.UTM_FORMAT || f == PointDescription.OLC_FORMAT) {
f = PointDescription.FORMAT_DEGREES;
}
try {
results.put(PointDescription.formatToHumanString(ctx, f),
ctx.getString(sh ? R.string.short_location_on_map : R.string.location_on_map, LocationConvert.convert(lat, f),
LocationConvert.convert(lon, f)));
} catch (RuntimeException e) {
e.printStackTrace();
results.put(PointDescription.formatToHumanString(ctx, f),
ctx.getString(sh ? R.string.short_location_on_map : R.string.location_on_map, 0, 0));
}
results.put(OsmAndFormatter.FORMAT_DEGREES_SHORT, latLonString);
results.put(OsmAndFormatter.FORMAT_DEGREES, latLonDeg);
results.put(OsmAndFormatter.FORMAT_MINUTES, latLonMin);
results.put(OsmAndFormatter.FORMAT_SECONDS, latLonSec);
results.put(OsmAndFormatter.FORMAT_UTM, utm);
results.put(OsmAndFormatter.FORMAT_OLC, olc);
int zoom = 17;
if (ctx.getMapView() != null) {
zoom = ctx.getMapView().getZoom();
}
final String httpUrl = "https://osmand.net/go?lat=" + (lat)
+ "&lon=" + (lon) + "&z=" + zoom;
results.put("URL", httpUrl);
final String httpUrl = "https://osmand.net/go?lat=" + (lat) + "&lon=" + (lon) + "&z=" + zoom;
results.put(LOCATION_URL, httpUrl);
int f = settings.COORDINATES_FORMAT.get();
if (f == PointDescription.UTM_FORMAT) {
results.put(LOCATION_LIST_HEADER, utm);
} else if (f == PointDescription.OLC_FORMAT) {
results.put(LOCATION_LIST_HEADER, olc);
} else if (f == PointDescription.FORMAT_DEGREES) {
results.put(LOCATION_LIST_HEADER, latLonDeg);
} else if (f == PointDescription.FORMAT_MINUTES) {
results.put(LOCATION_LIST_HEADER, latLonMin);
} else if (f == PointDescription.FORMAT_SECONDS) {
results.put(LOCATION_LIST_HEADER, latLonSec);
}
return results;
}

View file

@ -1,8 +1,13 @@
package net.osmand.plus;
import static net.osmand.data.PointDescription.getLocationOlcName;
import android.content.Context;
import android.text.format.DateUtils;
import com.jwetherell.openmap.common.LatLonPoint;
import com.jwetherell.openmap.common.UTMPoint;
import java.text.DecimalFormatSymbols;
import net.osmand.data.Amenity;
import net.osmand.data.City.CityType;
import net.osmand.osm.AbstractPoiType;
@ -12,6 +17,7 @@ import net.osmand.osm.PoiType;
import net.osmand.plus.OsmandSettings.AngularConstants;
import net.osmand.plus.OsmandSettings.MetricsConstants;
import net.osmand.plus.OsmandSettings.SpeedConstants;
import net.osmand.plus.mapmarkers.CoordinateInputFormats.Format;
import net.osmand.util.Algorithms;
import java.text.DateFormatSymbols;
@ -34,6 +40,21 @@ public class OsmAndFormatter {
private static final SimpleDateFormat SIMPLE_TIME_OF_DAY_FORMAT = new SimpleDateFormat("HH:mm", Locale.getDefault());
private static final String[] localDaysStr = getLettersStringArray(DateFormatSymbols.getInstance().getShortWeekdays(), 3);
public static final int FORMAT_DEGREES_SHORT = 100;
public static final int FORMAT_DEGREES = 101;
public static final int FORMAT_MINUTES = 102;
public static final int FORMAT_SECONDS = 103;
public static final int FORMAT_UTM = 104;
public static final int FORMAT_OLC = 105;
private static final char DELIMITER_DEGREES = '°';
private static final char DELIMITER_MINUTES = '';
private static final char DELIMITER_SECONDS = '″';
private static final char NORTH = 'N';
private static final char SOUTH = 'S';
private static final char WEST = 'W';
private static final char EAST = 'E';
{
fixed2.setMinimumFractionDigits(2);
fixed1.setMinimumFractionDigits(1);
@ -407,4 +428,83 @@ public class OsmAndFormatter {
cal1.get(Calendar.YEAR) == cal2.get(Calendar.YEAR) &&
cal1.get(Calendar.DAY_OF_YEAR) == cal2.get(Calendar.DAY_OF_YEAR));
}
public static String formatLocationCoordinates(double lat, double lon, int outputFormat) {
StringBuilder result = new StringBuilder();
if (outputFormat == FORMAT_DEGREES_SHORT) {
result.append(formatCoordinate(lat, outputFormat)).append(" ").append(formatCoordinate(lon, outputFormat));
} else if (outputFormat == FORMAT_DEGREES || outputFormat == FORMAT_MINUTES || outputFormat == FORMAT_SECONDS) {
result
.append(formatCoordinate(lat, outputFormat)).append(" ")
.append(lat > 0 ? NORTH : SOUTH).append(", ")
.append(formatCoordinate(lon, outputFormat)).append(" ")
.append(lon > 0 ? EAST : WEST);
} else if (outputFormat == FORMAT_UTM) {
UTMPoint pnt = new UTMPoint(new LatLonPoint(lat, lon));
result
.append(pnt.zone_number)
.append(pnt.zone_letter).append(" ")
.append((long) pnt.easting).append(" ")
.append((long) pnt.northing);
} else if (outputFormat == FORMAT_OLC) {
String r;
try {
r = getLocationOlcName(lat, lon);
} catch (RuntimeException e) {
r = "0, 0";
}
result.append(r);
}
return result.toString();
}
private static String formatCoordinate(double coordinate, int outputType) {
if (coordinate < -180.0 || coordinate > 180.0 || Double.isNaN(coordinate)) {
return "Error. Wrong coordinates data!";
}
if ((outputType != FORMAT_DEGREES) && (outputType != FORMAT_MINUTES) && (outputType
!= FORMAT_SECONDS) && (outputType != FORMAT_DEGREES_SHORT)) {
return "Unknown Output Format!";
}
DecimalFormat degDf = new DecimalFormat("##0.00000",new DecimalFormatSymbols(Locale.US));
DecimalFormat minDf = new DecimalFormat("00.0000",new DecimalFormatSymbols(Locale.US));
DecimalFormat secDf = new DecimalFormat("00.000",new DecimalFormatSymbols(Locale.US));
StringBuilder sb = new StringBuilder();
if (coordinate < 0) {
if (outputType == FORMAT_DEGREES_SHORT) {
sb.append('-');
}
coordinate = -coordinate;
}
if (outputType == FORMAT_DEGREES_SHORT) {
sb.append(degDf.format(coordinate));
} else if (outputType == FORMAT_DEGREES) {
sb.append(degDf.format(coordinate)).append(DELIMITER_DEGREES);
} else if (outputType == FORMAT_MINUTES) {
sb.append(minDf.format(formatCoordinate(coordinate, sb, DELIMITER_DEGREES)))
.append(DELIMITER_MINUTES);
} else {
sb.append(secDf.format(formatCoordinate(
formatCoordinate(coordinate, sb, DELIMITER_DEGREES), sb, DELIMITER_MINUTES)))
.append(DELIMITER_SECONDS);
}
return sb.toString();
}
private static double formatCoordinate(double coordinate, StringBuilder sb, char delimiter) {
int deg = (int) Math.floor(coordinate);
if (deg < 10) {
sb.append('0');
}
sb.append(deg);
sb.append(delimiter);
coordinate -= deg;
coordinate *= 60.0;
return coordinate;
}
}

View file

@ -1,20 +1,28 @@
package net.osmand.plus;
import gnu.trove.map.hash.TLongObjectHashMap;
import net.osmand.AndroidUtils;
import net.osmand.Location;
import net.osmand.data.LatLon;
import net.osmand.plus.base.MenuBottomSheetDialogFragment;
import net.osmand.plus.views.DirectionDrawable;
import net.osmand.plus.widgets.TextViewEx;
import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.LayerDrawable;
import android.hardware.Sensor;
import android.hardware.SensorManager;
import android.os.Build;
import android.support.annotation.ColorInt;
import android.support.annotation.ColorRes;
import android.support.annotation.DrawableRes;
import android.support.annotation.StringRes;
import android.support.v4.content.ContextCompat;
import android.support.v4.graphics.drawable.DrawableCompat;
import android.view.View;
import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.TextView;
@ -27,7 +35,12 @@ public class UiUtilities {
private static final int ORIENTATION_90 = 3;
private static final int ORIENTATION_270 = 1;
private static final int ORIENTATION_180 = 2;
public enum DialogButtonType {
PRIMARY,
SECONDARY,
STROKED
}
public UiUtilities(OsmandApplication app) {
this.app = app;
@ -88,14 +101,14 @@ public class UiUtilities {
}
public Drawable getIcon(@DrawableRes int id, boolean light) {
return getDrawable(id, light ? R.color.icon_color : 0);
return getDrawable(id, light ? R.color.icon_color : R.color.icon_color_light);
}
@ColorRes
public static int getDefaultColorRes(Context context) {
final OsmandApplication app = (OsmandApplication) context.getApplicationContext();
boolean light = app.getSettings().isLightContent();
return light ? R.color.icon_color : R.color.color_white;
return light ? R.color.icon_color : R.color.icon_color_light;
}
@ColorInt
@ -230,4 +243,39 @@ public class UiUtilities {
return screenOrientation;
}
public static void setupDialogButton(boolean nightMode, View buttonView, DialogButtonType buttonType, @StringRes int buttonTextId) {
setupDialogButton(nightMode, buttonView, buttonType, buttonView.getContext().getString(buttonTextId));
}
public static void setupDialogButton(boolean nightMode, View buttonView, DialogButtonType buttonType, CharSequence buttonText) {
Context ctx = buttonView.getContext();
TextViewEx buttonTextView = (TextViewEx) buttonView.findViewById(R.id.button_text);
boolean v21 = Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP;
View buttonContainer = buttonView.findViewById(R.id.button_container);
switch (buttonType) {
case PRIMARY:
if (v21) {
AndroidUtils.setBackground(ctx, buttonContainer, nightMode, R.drawable.ripple_solid_light, R.drawable.ripple_solid_dark);
}
AndroidUtils.setBackground(ctx, buttonView, nightMode, R.drawable.dlg_btn_primary_light, R.drawable.dlg_btn_primary_dark);
buttonTextView.setTextColor(ContextCompat.getColorStateList(ctx, nightMode ? R.color.dlg_btn_primary_text_dark : R.color.dlg_btn_primary_text_light));
break;
case SECONDARY:
if (v21) {
AndroidUtils.setBackground(ctx, buttonContainer, nightMode, R.drawable.ripple_solid_light, R.drawable.ripple_solid_dark);
}
AndroidUtils.setBackground(ctx, buttonView, nightMode, R.drawable.dlg_btn_secondary_light, R.drawable.dlg_btn_secondary_dark);
buttonTextView.setTextColor(ContextCompat.getColorStateList(ctx, nightMode ? R.color.dlg_btn_secondary_text_dark : R.color.dlg_btn_secondary_text_light));
break;
case STROKED:
if (v21) {
AndroidUtils.setBackground(ctx, buttonContainer, nightMode, R.drawable.ripple_light, R.drawable.ripple_dark);
}
AndroidUtils.setBackground(ctx, buttonView, nightMode, R.drawable.dlg_btn_stroked_light, R.drawable.dlg_btn_stroked_dark);
buttonTextView.setTextColor(ContextCompat.getColorStateList(ctx, nightMode ? R.color.dlg_btn_secondary_text_dark : R.color.dlg_btn_secondary_text_light));
break;
}
buttonTextView.setText(buttonText);
buttonTextView.setEnabled(buttonView.isEnabled());
}
}

View file

@ -833,8 +833,8 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment implemen
boolean light = app.getSettings().isLightContent();
final FavoriteGroup model = getGroup(groupPosition);
boolean visible = model.visible;
int enabledColor = light ? R.color.primary_text_light : R.color.primary_text_dark;
int disabledColor = light ? R.color.secondary_text_light : R.color.secondary_text_dark;
int enabledColor = light ? R.color.text_color_primary_light : R.color.text_color_primary_dark;
int disabledColor = light ? R.color.text_color_secondary_light : R.color.text_color_secondary_dark;
row.findViewById(R.id.group_divider).setVisibility(groupPosition == 0 ? View.GONE : View.VISIBLE);
int color = model.color == 0 || model.color == Color.BLACK ? getResources().getColor(R.color.color_favorite) : model.color;
setCategoryIcon(app, app.getUIUtilities().getPaintedIcon(
@ -915,8 +915,8 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment implemen
}
OsmandApplication app = getMyApplication();
boolean light = app.getSettings().isLightContent();
int enabledColor = light ? R.color.primary_text_light : R.color.primary_text_dark;
int disabledColor = light ? R.color.secondary_text_light : R.color.secondary_text_dark;
int enabledColor = light ? R.color.text_color_primary_light : R.color.text_color_primary_dark;
int disabledColor = light ? R.color.text_color_secondary_light : R.color.text_color_secondary_dark;
int disabledIconColor = light ? R.color.icon_color : R.color.icon_color_light;
TextView name = (TextView) row.findViewById(R.id.favourite_label);

View file

@ -70,7 +70,7 @@ public class AudioVideoNoteMenuController extends MenuController {
}
};
rightTitleButtonController.caption = mapActivity.getString(R.string.shared_string_delete);
rightTitleButtonController.updateStateListDrawableIcon(R.drawable.ic_action_delete_dark, true);
rightTitleButtonController.leftIconId = R.drawable.ic_action_delete_dark;
}
updateData();
@ -163,7 +163,7 @@ public class AudioVideoNoteMenuController extends MenuController {
if (!mRecording.isPhoto()) {
if (mPlugin.isPlaying(mRecording)) {
leftTitleButtonController.caption = mapActivity.getString(R.string.shared_string_control_stop);
leftTitleButtonController.updateStateListDrawableIcon(R.drawable.ic_action_rec_stop, true);
leftTitleButtonController.leftIconId = R.drawable.ic_action_rec_stop;
int pos = mPlugin.getPlayingPosition();
String durationStr;
if (pos == -1) {
@ -176,14 +176,14 @@ public class AudioVideoNoteMenuController extends MenuController {
rightTitleButtonController.visible = false;
} else {
leftTitleButtonController.caption = mapActivity.getString(R.string.recording_context_menu_play);
leftTitleButtonController.updateStateListDrawableIcon(R.drawable.ic_play_dark, true);
leftTitleButtonController.leftIconId = R.drawable.ic_play_dark;
String durationStr = mRecording.getPlainDuration(accessibilityEnabled);
leftTitleButtonController.needRightText = true;
leftTitleButtonController.rightTextCaption = "" + durationStr;
}
} else {
leftTitleButtonController.caption = mapActivity.getString(R.string.recording_context_menu_show);
leftTitleButtonController.updateStateListDrawableIcon(R.drawable.ic_action_view, true);
leftTitleButtonController.leftIconId = R.drawable.ic_action_view;
}
}

View file

@ -25,9 +25,10 @@ import android.widget.LinearLayout;
import net.osmand.AndroidUtils;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.UiUtilities;
import net.osmand.plus.UiUtilities.DialogButtonType;
import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem;
import net.osmand.plus.helpers.AndroidUiHelper;
import net.osmand.plus.widgets.TextViewEx;
import java.util.ArrayList;
import java.util.List;
@ -48,12 +49,6 @@ public abstract class MenuBottomSheetDialogFragment extends BottomSheetDialogFra
private LinearLayout itemsContainer;
public enum DialogButtonType {
PRIMARY,
SECONDARY,
STROKED
}
@StringRes
protected int dismissButtonStringRes = R.string.shared_string_cancel;
@ -88,7 +83,7 @@ public abstract class MenuBottomSheetDialogFragment extends BottomSheetDialogFra
inflateMenuItems();
dismissButton = mainView.findViewById(R.id.dismiss_button);
setupDialogButton(dismissButton, getDismissByttonType(), getDismissButtonTextId());
UiUtilities.setupDialogButton(nightMode, dismissButton, getDismissByttonType(), getDismissButtonTextId());
dismissButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@ -103,7 +98,7 @@ public abstract class MenuBottomSheetDialogFragment extends BottomSheetDialogFra
if (rightBottomButtonTextId != DEFAULT_VALUE) {
mainView.findViewById(R.id.buttons_divider).setVisibility(View.VISIBLE);
rightButton = mainView.findViewById(R.id.right_bottom_button);
setupDialogButton(rightButton, getRightBottomByttonType(), rightBottomButtonTextId);
UiUtilities.setupDialogButton(nightMode, rightButton, getRightBottomByttonType(), rightBottomButtonTextId);
rightButton.setVisibility(View.VISIBLE);
rightButton.setOnClickListener(new View.OnClickListener() {
@Override
@ -147,38 +142,6 @@ public abstract class MenuBottomSheetDialogFragment extends BottomSheetDialogFra
}
}
private void setupDialogButton(View buttonView, DialogButtonType buttonType, @StringRes int buttonTextId) {
Context ctx = buttonView.getContext();
TextViewEx buttonTextView = (TextViewEx) buttonView.findViewById(R.id.button_text);
boolean v21 = Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP;
View buttonContainer = buttonView.findViewById(R.id.button_container);
switch (buttonType) {
case PRIMARY:
if (v21) {
AndroidUtils.setBackground(ctx, buttonContainer, nightMode, R.drawable.ripple_solid_light, R.drawable.ripple_solid_dark);
}
AndroidUtils.setBackground(ctx, buttonView, nightMode, R.drawable.dlg_btn_primary_light, R.drawable.dlg_btn_primary_dark);
buttonTextView.setTextColor(ContextCompat.getColorStateList(ctx, nightMode ? R.color.dlg_btn_primary_text_dark : R.color.dlg_btn_primary_text_light));
break;
case SECONDARY:
if (v21) {
AndroidUtils.setBackground(ctx, buttonContainer, nightMode, R.drawable.ripple_solid_light, R.drawable.ripple_solid_dark);
}
AndroidUtils.setBackground(ctx, buttonView, nightMode, R.drawable.dlg_btn_secondary_light, R.drawable.dlg_btn_secondary_dark);
buttonTextView.setTextColor(ContextCompat.getColorStateList(ctx, nightMode ? R.color.dlg_btn_secondary_text_dark : R.color.dlg_btn_secondary_text_light));
break;
case STROKED:
if (v21) {
AndroidUtils.setBackground(ctx, buttonContainer, nightMode, R.drawable.ripple_light, R.drawable.ripple_dark);
}
AndroidUtils.setBackground(ctx, buttonView, nightMode, R.drawable.dlg_btn_stroked_light, R.drawable.dlg_btn_stroked_dark);
buttonTextView.setTextColor(ContextCompat.getColorStateList(ctx, nightMode ? R.color.dlg_btn_secondary_text_dark : R.color.dlg_btn_secondary_text_light));
break;
}
buttonTextView.setText(buttonTextId);
buttonTextView.setEnabled(buttonView.isEnabled());
}
public abstract void createMenuItems(Bundle savedInstanceState);
protected void inflateMenuItems() {
@ -190,7 +153,7 @@ public abstract class MenuBottomSheetDialogFragment extends BottomSheetDialogFra
@Override
protected Drawable getContentIcon(@DrawableRes int id) {
return getIcon(id, nightMode ? R.color.ctx_menu_info_text_dark : R.color.on_map_icon_color);
return getIcon(id, nightMode ? R.color.icon_color_light : R.color.icon_color);
}
protected Drawable getActiveIcon(@DrawableRes int id) {

View file

@ -5,10 +5,13 @@ import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.res.Resources;
import android.content.res.Resources.Theme;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.FragmentActivity;
import android.support.v7.app.AlertDialog;
import android.support.v7.view.ContextThemeWrapper;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.View;
@ -19,6 +22,7 @@ import android.widget.ListView;
import android.widget.TextView;
import net.osmand.PlatformUtil;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandPlugin;
import net.osmand.plus.OsmandSettings;
import net.osmand.plus.OsmandSettings.CommonPreference;
@ -37,6 +41,7 @@ public class DashboardSettingsDialogFragment extends DialogFragment
private static final String CHECKED_ITEMS = "checked_items";
private static final String NUMBER_OF_ROWS_ARRAY = "number_of_rows_array";
private MapActivity mapActivity;
private ContextThemeWrapper context;
private ArrayList<DashFragmentData> mFragmentsData;
private DashFragmentAdapter mAdapter;
private int textColorPrimary;
@ -60,10 +65,14 @@ public class DashboardSettingsDialogFragment extends DialogFragment
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
TypedValue typedValue = new TypedValue();
Resources.Theme theme = getActivity().getTheme();
FragmentActivity activity = requireActivity();
OsmandApplication app = (OsmandApplication) activity.getApplication();
boolean nightMode = app.getDaynightHelper().isNightModeForMapControls();
context = new ContextThemeWrapper(activity, !nightMode ? R.style.OsmandLightTheme : R.style.OsmandDarkTheme);
Theme theme = context.getTheme();
theme.resolveAttribute(android.R.attr.textColorPrimary, typedValue, true);
textColorPrimary = typedValue.data;
theme.resolveAttribute(R.attr.dialog_inactive_text_color, typedValue, true);
theme.resolveAttribute(android.R.attr.textColorSecondary, typedValue, true);
textColorSecondary = typedValue.data;
final OsmandSettings settings = mapActivity.getMyApplication().getSettings();
@ -72,13 +81,13 @@ public class DashboardSettingsDialogFragment extends DialogFragment
final View accessFromMap = createCheckboxItem(settings.SHOW_DASHBOARD_ON_MAP_SCREEN,
R.string.access_from_map, R.string.access_from_map_description);
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
AlertDialog.Builder builder = new AlertDialog.Builder(context);
if (savedInstanceState != null && savedInstanceState.containsKey(CHECKED_ITEMS)) {
mAdapter = new DashFragmentAdapter(getActivity(), mFragmentsData,
mAdapter = new DashFragmentAdapter(context, mFragmentsData,
savedInstanceState.getBooleanArray(CHECKED_ITEMS),
savedInstanceState.getIntArray(NUMBER_OF_ROWS_ARRAY));
} else {
mAdapter = new DashFragmentAdapter(getActivity(), mFragmentsData, settings);
mAdapter = new DashFragmentAdapter(context, mFragmentsData, settings);
}
builder.setTitle(R.string.dahboard_options_dialog_title)
.setAdapter(mAdapter, null)
@ -115,7 +124,7 @@ public class DashboardSettingsDialogFragment extends DialogFragment
}
private View createCheckboxItem(final CommonPreference<Boolean> pref, int text, int description) {
final View view = LayoutInflater.from(getActivity()).inflate(
final View view = LayoutInflater.from(context).inflate(
R.layout.show_dashboard_on_start_dialog_item, null, false);
final TextView textView = (TextView) view.findViewById(R.id.text);
final TextView subtextView = (TextView) view.findViewById(R.id.subtext);
@ -123,8 +132,7 @@ public class DashboardSettingsDialogFragment extends DialogFragment
subtextView.setText(description);
final CompoundButton compoundButton = (CompoundButton) view.findViewById(R.id.toggle_item);
compoundButton.setChecked(pref.get());
textView.setTextColor(pref.get() ? textColorPrimary
: textColorSecondary);
textView.setTextColor(pref.get() ? textColorPrimary : textColorSecondary);
compoundButton.setOnCheckedChangeListener(
new CompoundButton.OnCheckedChangeListener() {
@Override
@ -180,7 +188,7 @@ public class DashboardSettingsDialogFragment extends DialogFragment
public View getView(final int position, View convertView, ViewGroup parent) {
final DashViewHolder viewHolder;
if (convertView == null) {
convertView = LayoutInflater.from(getContext()).inflate(R.layout.dashboard_settings_dialog_item,
convertView = LayoutInflater.from(context).inflate(R.layout.dashboard_settings_dialog_item,
parent, false);
viewHolder = new DashViewHolder(this, convertView, getContext());
} else {
@ -240,7 +248,7 @@ public class DashboardSettingsDialogFragment extends DialogFragment
final CompoundButton compoundButton;
final TextView numberOfRowsTextView;
private int position;
private int colorBlue;
private int colorActive;
private DashFragmentAdapter dashFragmentAdapter;
public DashViewHolder(DashFragmentAdapter dashFragmentAdapter, View view, Context ctx) {
@ -248,15 +256,19 @@ public class DashboardSettingsDialogFragment extends DialogFragment
this.numberOfRowsTextView = (TextView) view.findViewById(R.id.numberOfRowsTextView);
this.textView = (TextView) view.findViewById(R.id.text);
this.compoundButton = (CompoundButton) view.findViewById(R.id.toggle_item);
colorBlue = ctx.getResources().getColor(R.color.dashboard_blue);
TypedValue typedValue = new TypedValue();
Theme theme = ctx.getTheme();
theme.resolveAttribute(R.attr.active_color_basic, typedValue, true);
colorActive = typedValue.data;
}
public void bindDashView(DashFragmentData fragmentData, int position) {
if (fragmentData.hasRows()) {
numberOfRowsTextView.setVisibility(View.VISIBLE);
numberOfRowsTextView.setText(String.valueOf(dashFragmentAdapter.getNumberOfRows(position)));
numberOfRowsTextView.setTextColor(dashFragmentAdapter.isChecked(position) ? colorBlue :
textColorSecondary);
numberOfRowsTextView.setTextColor(
dashFragmentAdapter.isChecked(position) ? colorActive : textColorSecondary);
} else {
numberOfRowsTextView.setVisibility(View.GONE);
}

View file

@ -40,7 +40,7 @@ public class AddWaypointBottomSheetDialogFragment extends MenuBottomSheetDialogF
BaseBottomSheetItem replaceDestItem = new BottomSheetItemWithDescription.Builder()
.setDescription(getCurrentPointName(targetPointsHelper.getPointToNavigate(), false))
.setDescriptionColorId(R.color.searchbar_text_hint_light)
.setDescriptionColorId(nightMode ? R.color.text_color_secondary_dark : R.color.text_color_secondary_light)
.setIcon(getIcon(R.drawable.list_destination, 0))
.setTitle(getString(R.string.replace_destination_point))
.setLayoutId(R.layout.bottom_sheet_item_with_descr_56dp)
@ -56,7 +56,7 @@ public class AddWaypointBottomSheetDialogFragment extends MenuBottomSheetDialogF
BaseBottomSheetItem replaceStartItem = new BottomSheetItemWithDescription.Builder()
.setDescription(getCurrentPointName(targetPointsHelper.getPointToStart(), true))
.setDescriptionColorId(R.color.searchbar_text_hint_light)
.setDescriptionColorId(nightMode ? R.color.text_color_secondary_dark : R.color.text_color_secondary_light)
.setIcon(getIcon(R.drawable.list_startpoint, 0))
.setTitle(getString(R.string.make_as_start_point))
.setLayoutId(R.layout.bottom_sheet_item_with_descr_56dp)
@ -74,7 +74,7 @@ public class AddWaypointBottomSheetDialogFragment extends MenuBottomSheetDialogF
BaseBottomSheetItem subsequentDestItem = new BottomSheetItemWithDescription.Builder()
.setDescription(getString(R.string.subsequent_dest_description))
.setDescriptionColorId(R.color.searchbar_text_hint_light)
.setDescriptionColorId(nightMode ? R.color.text_color_secondary_dark : R.color.text_color_secondary_light)
.setIcon(getSubsequentDestIcon())
.setTitle(getString(R.string.keep_and_add_destination_point))
.setLayoutId(R.layout.bottom_sheet_item_with_descr_56dp)
@ -91,7 +91,7 @@ public class AddWaypointBottomSheetDialogFragment extends MenuBottomSheetDialogF
BaseBottomSheetItem firstIntermItem = new BottomSheetItemWithDescription.Builder()
.setDescription(getString(R.string.first_intermediate_dest_description))
.setDescriptionColorId(R.color.searchbar_text_hint_light)
.setDescriptionColorId(nightMode ? R.color.text_color_secondary_dark : R.color.text_color_secondary_light)
.setIcon(getFirstIntermDestIcon())
.setTitle(getString(R.string.add_as_first_destination_point))
.setLayoutId(R.layout.bottom_sheet_item_with_descr_56dp)
@ -107,7 +107,7 @@ public class AddWaypointBottomSheetDialogFragment extends MenuBottomSheetDialogF
BaseBottomSheetItem lastIntermItem = new BottomSheetItemWithDescription.Builder()
.setDescription(getString(R.string.last_intermediate_dest_description))
.setDescriptionColorId(R.color.searchbar_text_hint_light)
.setDescriptionColorId(nightMode ? R.color.text_color_secondary_dark : R.color.text_color_secondary_light)
.setIcon(getLastIntermDistIcon())
.setTitle(getString(R.string.add_as_last_destination_point))
.setLayoutId(R.layout.bottom_sheet_item_with_descr_56dp)
@ -160,7 +160,7 @@ public class AddWaypointBottomSheetDialogFragment extends MenuBottomSheetDialogF
}
private Drawable getBackgroundIcon(@DrawableRes int resId) {
return getIcon(resId, R.color.searchbar_text_hint_light);
return getIcon(resId, nightMode ? R.color.text_color_secondary_dark : R.color.text_color_secondary_light);
}
private LayerDrawable getLayerDrawable(@DrawableRes int bgIdRes, @DrawableRes int icIdRes) {

View file

@ -1325,7 +1325,7 @@ public class ConfigureMapMenu {
String text = getItem(position);
label.setText(text);
label.setTextColor(!lightTheme ?
ContextCompat.getColorStateList(getContext(), android.R.color.primary_text_dark) : ContextCompat.getColorStateList(getContext(), android.R.color.primary_text_light));
ContextCompat.getColorStateList(getContext(), R.color.text_color_primary_dark) : ContextCompat.getColorStateList(getContext(), R.color.text_color_primary_light));
return label;
}
@ -1336,7 +1336,7 @@ public class ConfigureMapMenu {
String text = getItem(position);
label.setText(text);
label.setTextColor(!lightTheme ?
ContextCompat.getColorStateList(getContext(), android.R.color.primary_text_dark) : ContextCompat.getColorStateList(getContext(), android.R.color.primary_text_light));
ContextCompat.getColorStateList(getContext(), R.color.text_color_primary_dark) : ContextCompat.getColorStateList(getContext(), R.color.text_color_primary_light));
return label;
}

View file

@ -225,7 +225,7 @@ public class SelectMapStyleBottomSheetDialogFragment extends MenuBottomSheetDial
private int getStyleTitleColor(boolean selected) {
int colorId = selected
? getActiveColorId()
: nightMode ? R.color.primary_text_dark : R.color.primary_text_light;
: nightMode ? R.color.text_color_primary_dark : R.color.text_color_primary_light;
return getResolvedColor(colorId);
}

Some files were not shown because too many files have changed in this diff Show more