Fix map button vector icon
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB |
45
OsmAnd/res/drawable/ic_actions_menu.xml
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:pathData="M7,19C7,20.1046 6.1046,21 5,21C3.8954,21 3,20.1046 3,19C3,17.8954 3.8954,17 5,17C6.1046,17 7,17.8954 7,19Z"
|
||||||
|
android:strokeAlpha="0.5"
|
||||||
|
android:fillColor="#ffffff"
|
||||||
|
android:fillAlpha="0.5"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M14,19C14,20.1046 13.1046,21 12,21C10.8954,21 10,20.1046 10,19C10,17.8954 10.8954,17 12,17C13.1046,17 14,17.8954 14,19Z"
|
||||||
|
android:strokeAlpha="0.5"
|
||||||
|
android:fillColor="#ffffff"
|
||||||
|
android:fillAlpha="0.5"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M19,21C20.1046,21 21,20.1046 21,19C21,17.8954 20.1046,17 19,17C17.8954,17 17,17.8954 17,19C17,20.1046 17.8954,21 19,21Z"
|
||||||
|
android:strokeAlpha="0.5"
|
||||||
|
android:fillColor="#ffffff"
|
||||||
|
android:fillAlpha="0.5"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M7,12C7,13.1046 6.1046,14 5,14C3.8954,14 3,13.1046 3,12C3,10.8954 3.8954,10 5,10C6.1046,10 7,10.8954 7,12Z"
|
||||||
|
android:strokeAlpha="0.7"
|
||||||
|
android:fillColor="#ffffff"
|
||||||
|
android:fillAlpha="0.7"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M14,12C14,13.1046 13.1046,14 12,14C10.8954,14 10,13.1046 10,12C10,10.8954 10.8954,10 12,10C13.1046,10 14,10.8954 14,12Z"
|
||||||
|
android:strokeAlpha="0.7"
|
||||||
|
android:fillColor="#ffffff"
|
||||||
|
android:fillAlpha="0.7"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M19,14C20.1046,14 21,13.1046 21,12C21,10.8954 20.1046,10 19,10C17.8954,10 17,10.8954 17,12C17,13.1046 17.8954,14 19,14Z"
|
||||||
|
android:strokeAlpha="0.7"
|
||||||
|
android:fillColor="#ffffff"
|
||||||
|
android:fillAlpha="0.7"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M7,5C7,6.1046 6.1046,7 5,7C3.8954,7 3,6.1046 3,5C3,3.8954 3.8954,3 5,3C6.1046,3 7,3.8954 7,5Z"
|
||||||
|
android:fillColor="#ffffff"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M14,5C14,6.1046 13.1046,7 12,7C10.8954,7 10,6.1046 10,5C10,3.8954 10.8954,3 12,3C13.1046,3 14,3.8954 14,5Z"
|
||||||
|
android:fillColor="#ffffff"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M19,7C20.1046,7 21,6.1046 21,5C21,3.8954 20.1046,3 19,3C17.8954,3 17,3.8954 17,5C17,6.1046 17.8954,7 19,7Z"
|
||||||
|
android:fillColor="#ffffff"/>
|
||||||
|
</vector>
|
13
OsmAnd/res/drawable/ic_compass.xml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:pathData="M12,23L6,12H8.2782L12,18.8233L15.7218,12H18L12,23Z"
|
||||||
|
android:fillColor="#505050"
|
||||||
|
android:fillType="evenOdd"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M18,12L12,1L6,12H18Z"
|
||||||
|
android:fillColor="#E53935"/>
|
||||||
|
</vector>
|
12
OsmAnd/res/drawable/ic_compass_bearing.xml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:pathData="M4.1161,21.9676L12,19.7647L19.8839,21.9676C19.9609,21.9891 20.0406,22 20.1206,22H20.1832C20.6343,22 21,21.6343 21,21.1832C21,21.0626 20.9733,20.9434 20.9218,20.8344L12.7135,3.4521C12.5832,3.1761 12.3053,3 12,3C11.6947,3 11.4168,3.1761 11.2865,3.4521L3.0782,20.8344C3.0267,20.9434 3,21.0626 3,21.1832C3,21.6343 3.3657,22 3.8168,22H3.8795C3.9594,22 4.0391,21.9891 4.1161,21.9676Z"
|
||||||
|
android:fillColor="#536DFE"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M10,17V11H11L13,15V11H14V17H13L11,13V17H10Z"
|
||||||
|
android:fillColor="#ffffff"/>
|
||||||
|
</vector>
|
12
OsmAnd/res/drawable/ic_compass_bearing_white.xml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:pathData="M4.1161,21.9676L12,19.7647L19.8839,21.9676C19.9609,21.9891 20.0406,22 20.1206,22H20.1832C20.6343,22 21,21.6343 21,21.1832C21,21.0626 20.9733,20.9434 20.9218,20.8344L12.7135,3.4521C12.5832,3.1761 12.3053,3 12,3C11.6947,3 11.4168,3.1761 11.2865,3.4521L3.0782,20.8344C3.0267,20.9434 3,21.0626 3,21.1832C3,21.6343 3.3657,22 3.8168,22H3.8795C3.9594,22 4.0391,21.9891 4.1161,21.9676Z"
|
||||||
|
android:fillColor="#536DFE"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M10,17V11H11L13,15V11H14V17H13L11,13V17H10Z"
|
||||||
|
android:fillColor="#ffffff"/>
|
||||||
|
</vector>
|
12
OsmAnd/res/drawable/ic_compass_niu.xml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:pathData="M16,10L12,3L8,10H16Z"
|
||||||
|
android:fillColor="#E53935"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M8,21V12H10L14,18V12H16V21H14L10,15V21H8Z"
|
||||||
|
android:fillColor="#505050"/>
|
||||||
|
</vector>
|
12
OsmAnd/res/drawable/ic_compass_niu_white.xml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:pathData="M16,10L12,3L8,10H16Z"
|
||||||
|
android:fillColor="#E53935"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M8,21V12H10L14,18V12H16V21H14L10,15V21H8Z"
|
||||||
|
android:fillColor="#CCCCCC"/>
|
||||||
|
</vector>
|
13
OsmAnd/res/drawable/ic_compass_white.xml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:pathData="M12,23L6,12H8.2782L12,18.8233L15.7218,12H18L12,23Z"
|
||||||
|
android:fillColor="#CCCCCC"
|
||||||
|
android:fillType="evenOdd"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M18,12L12,1L6,12H18Z"
|
||||||
|
android:fillColor="#E53935"/>
|
||||||
|
</vector>
|
|
@ -5,6 +5,6 @@
|
||||||
android:viewportHeight="24">
|
android:viewportHeight="24">
|
||||||
<path
|
<path
|
||||||
android:pathData="M5,3C3.8954,3 3,3.8954 3,5V19C3,20.1046 3.8954,21 5,21H19C20.1046,21 21,20.1046 21,19V5C21,3.8954 20.1046,3 19,3H5ZM19,5H5V19H19V5ZM7,7H11V11H7V7ZM17,7H13V11H17V7ZM7,13H11V17H7V13ZM17,13H13V17H17V13Z"
|
android:pathData="M5,3C3.8954,3 3,3.8954 3,5V19C3,20.1046 3.8954,21 5,21H19C20.1046,21 21,20.1046 21,19V5C21,3.8954 20.1046,3 19,3H5ZM19,5H5V19H19V5ZM7,7H11V11H7V7ZM17,7H13V11H17V7ZM7,13H11V17H7V13ZM17,13H13V17H17V13Z"
|
||||||
android:fillColor="#727272"
|
android:fillColor="#ffffff"
|
||||||
android:fillType="evenOdd"/>
|
android:fillType="evenOdd"/>
|
||||||
</vector>
|
</vector>
|
|
@ -5,5 +5,5 @@
|
||||||
android:viewportHeight="24">
|
android:viewportHeight="24">
|
||||||
<path
|
<path
|
||||||
android:pathData="M13,2H11V11H2V13H11V22H13V13H22V11H13V2Z"
|
android:pathData="M13,2H11V11H2V13H11V22H13V13H22V11H13V2Z"
|
||||||
android:fillColor="#727272"/>
|
android:fillColor="#ffffff"/>
|
||||||
</vector>
|
</vector>
|
|
@ -5,5 +5,5 @@
|
||||||
android:viewportHeight="24">
|
android:viewportHeight="24">
|
||||||
<path
|
<path
|
||||||
android:pathData="M22,11l-0,2l-20,0l-0,-2z"
|
android:pathData="M22,11l-0,2l-20,0l-0,-2z"
|
||||||
android:fillColor="#727272"/>
|
android:fillColor="#ffffff"/>
|
||||||
</vector>
|
</vector>
|
|
@ -7,6 +7,7 @@
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="@dimen/dashboard_map_toolbar"
|
android:layout_height="@dimen/dashboard_map_toolbar"
|
||||||
android:background="@color/app_bar_color_light"
|
android:background="@color/app_bar_color_light"
|
||||||
|
android:padding="0dp"
|
||||||
app:contentInsetLeft="0dp"
|
app:contentInsetLeft="0dp"
|
||||||
app:contentInsetStart="0dp"
|
app:contentInsetStart="0dp"
|
||||||
app:contentInsetRight="0dp"
|
app:contentInsetRight="0dp"
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginEnd="@dimen/list_content_padding"
|
android:layout_marginEnd="@dimen/list_content_padding"
|
||||||
android:layout_marginRight="@dimen/list_content_padding"
|
android:layout_marginRight="@dimen/list_content_padding"
|
||||||
osmand:srcCompat="@drawable/map_favorite" />
|
osmand:srcCompat="@drawable/ic_action_favorite" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:minHeight="@dimen/dashboard_map_toolbar"
|
android:minHeight="@dimen/dashboard_map_toolbar"
|
||||||
|
android:padding="0dp"
|
||||||
app:contentInsetLeft="54dp"
|
app:contentInsetLeft="54dp"
|
||||||
app:contentInsetStart="54dp"
|
app:contentInsetStart="54dp"
|
||||||
app:contentInsetRight="0dp"
|
app:contentInsetRight="0dp"
|
||||||
|
|
|
@ -154,7 +154,7 @@
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginEnd="@dimen/bottom_sheet_icon_margin"
|
android:layout_marginEnd="@dimen/bottom_sheet_icon_margin"
|
||||||
android:layout_marginRight="@dimen/bottom_sheet_icon_margin"
|
android:layout_marginRight="@dimen/bottom_sheet_icon_margin"
|
||||||
tools:src="@drawable/map_directions"/>
|
tools:src="@drawable/ic_action_gdirections_dark"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?attr/actionModeBackground"
|
android:background="?attr/actionModeBackground"
|
||||||
|
android:padding="0dp"
|
||||||
app:contentInsetLeft="0dp"
|
app:contentInsetLeft="0dp"
|
||||||
app:contentInsetStart="0dp"
|
app:contentInsetStart="0dp"
|
||||||
app:contentInsetRight="0dp"
|
app:contentInsetRight="0dp"
|
||||||
|
|
|
@ -120,7 +120,7 @@
|
||||||
android:contentDescription="@string/shared_string_more"
|
android:contentDescription="@string/shared_string_more"
|
||||||
android:focusable="false"
|
android:focusable="false"
|
||||||
android:scaleType="center"
|
android:scaleType="center"
|
||||||
osmand:srcCompat="@drawable/map_overflow_menu_white"
|
osmand:srcCompat="@drawable/ic_actions_menu"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:layout_marginEnd="2dp" />
|
android:layout_marginEnd="2dp" />
|
||||||
|
|
||||||
|
|
|
@ -11,11 +11,12 @@
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
<androidx.appcompat.widget.Toolbar
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/dashboard_map_toolbar"
|
android:layout_height="wrap_content"
|
||||||
android:background="?attr/pstsTabBackground"
|
android:background="?attr/pstsTabBackground"
|
||||||
android:minHeight="@dimen/dashboard_map_toolbar"
|
android:minHeight="@dimen/toolbar_height"
|
||||||
android:theme="?attr/toolbar_theme"
|
android:theme="?attr/toolbar_theme"
|
||||||
|
android:padding="0dp"
|
||||||
app:contentInsetLeft="72dp"
|
app:contentInsetLeft="72dp"
|
||||||
app:contentInsetStart="72dp"
|
app:contentInsetStart="72dp"
|
||||||
app:contentInsetRight="0dp"
|
app:contentInsetRight="0dp"
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
android:layout_width="@dimen/standard_icon_size"
|
android:layout_width="@dimen/standard_icon_size"
|
||||||
android:layout_height="@dimen/standard_icon_size"
|
android:layout_height="@dimen/standard_icon_size"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
tools:src="@drawable/ic_dashboard_dark"
|
tools:src="@drawable/ic_dashboard"
|
||||||
android:background="?attr/dashboard_button" />
|
android:background="?attr/dashboard_button" />
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
android:layout_width="@dimen/standard_icon_size"
|
android:layout_width="@dimen/standard_icon_size"
|
||||||
android:layout_height="@dimen/standard_icon_size"
|
android:layout_height="@dimen/standard_icon_size"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
tools:src="@drawable/ic_dashboard_dark" />
|
tools:src="@drawable/ic_dashboard" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:id="@+id/selection"
|
android:id="@+id/selection"
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
android:layout_height="@dimen/dashboard_map_toolbar"
|
android:layout_height="@dimen/dashboard_map_toolbar"
|
||||||
android:background="?attr/bg_color"
|
android:background="?attr/bg_color"
|
||||||
android:minHeight="@dimen/dashboard_map_toolbar"
|
android:minHeight="@dimen/dashboard_map_toolbar"
|
||||||
|
android:padding="0dp"
|
||||||
android:theme="?attr/toolbar_theme"
|
android:theme="?attr/toolbar_theme"
|
||||||
app:contentInsetLeft="54dp"
|
app:contentInsetLeft="54dp"
|
||||||
app:contentInsetStart="54dp"
|
app:contentInsetStart="54dp"
|
||||||
|
@ -38,6 +39,7 @@
|
||||||
android:layout_height="@dimen/dashboard_map_toolbar"
|
android:layout_height="@dimen/dashboard_map_toolbar"
|
||||||
android:background="@color/osmand_orange"
|
android:background="@color/osmand_orange"
|
||||||
android:minHeight="@dimen/dashboard_map_toolbar"
|
android:minHeight="@dimen/dashboard_map_toolbar"
|
||||||
|
android:padding="0dp"
|
||||||
android:theme="?attr/toolbar_theme"
|
android:theme="?attr/toolbar_theme"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:contentInsetLeft="54dp"
|
app:contentInsetLeft="54dp"
|
||||||
|
|
|
@ -108,7 +108,7 @@
|
||||||
android:contentDescription="@string/shared_string_more"
|
android:contentDescription="@string/shared_string_more"
|
||||||
android:focusable="false"
|
android:focusable="false"
|
||||||
android:scaleType="center"
|
android:scaleType="center"
|
||||||
osmand:srcCompat="@drawable/map_overflow_menu_white"
|
osmand:srcCompat="@drawable/ic_actions_menu"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:visibility="visible"/>
|
tools:visibility="visible"/>
|
||||||
|
|
||||||
|
|
|
@ -128,6 +128,8 @@
|
||||||
<color name="map_widget_light_pressed">#e5e5e5</color>
|
<color name="map_widget_light_pressed">#e5e5e5</color>
|
||||||
<color name="map_widget_blue">#536dfe</color>
|
<color name="map_widget_blue">#536dfe</color>
|
||||||
<color name="map_widget_blue_pressed">#485dd9</color>
|
<color name="map_widget_blue_pressed">#485dd9</color>
|
||||||
|
<color name="map_button_icon_color_light">#727272</color>
|
||||||
|
<color name="map_button_icon_color_dark">#cccccc</color>
|
||||||
|
|
||||||
<color name="map_progress_bar_bg_light">#f0f0f0</color>
|
<color name="map_progress_bar_bg_light">#f0f0f0</color>
|
||||||
<color name="map_progress_bar_bg_dark">#1b1d1f</color>
|
<color name="map_progress_bar_bg_dark">#1b1d1f</color>
|
||||||
|
|
|
@ -375,18 +375,20 @@ public class AndroidUtils {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void updateImageButton(Context ctx, ImageButton button, int iconLightId, int iconDarkId, int bgLightId, int bgDarkId, boolean night) {
|
public static void updateImageButton(OsmandApplication ctx, ImageButton button,
|
||||||
|
@DrawableRes int iconLightId, @DrawableRes int iconDarkId,
|
||||||
|
@DrawableRes int bgLightId, @DrawableRes int bgDarkId, boolean night) {
|
||||||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) {
|
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) {
|
||||||
button.setBackground(AppCompatResources.getDrawable(ctx, night ? bgDarkId : bgLightId));
|
button.setBackground(AppCompatResources.getDrawable(ctx, night ? bgDarkId : bgLightId));
|
||||||
} else {
|
} else {
|
||||||
button.setBackgroundDrawable(AppCompatResources.getDrawable(ctx, night ? bgDarkId : bgLightId));
|
button.setBackgroundDrawable(AppCompatResources.getDrawable(ctx, night ? bgDarkId : bgLightId));
|
||||||
}
|
}
|
||||||
int btnSizePx = button.getLayoutParams().height;
|
int btnSizePx = button.getLayoutParams().height;
|
||||||
int iconSizePx = (int) button.getContext().getResources().getDimension(R.dimen.map_widget_icon);
|
int iconSizePx = button.getContext().getResources().getDimensionPixelSize(R.dimen.map_widget_icon);
|
||||||
int iconPadding = (btnSizePx - iconSizePx) / 2;
|
int iconPadding = (btnSizePx - iconSizePx) / 2;
|
||||||
button.setPadding(iconPadding, iconPadding, iconPadding, iconPadding);
|
button.setPadding(iconPadding, iconPadding, iconPadding, iconPadding);
|
||||||
button.setScaleType(ImageView.ScaleType.FIT_CENTER);
|
button.setScaleType(ImageView.ScaleType.FIT_CENTER);
|
||||||
button.setImageDrawable(AppCompatResources.getDrawable(ctx, night ? iconDarkId : iconLightId));
|
button.setImageDrawable(ctx.getUIUtilities().getMapIcon(night ? iconDarkId : iconLightId, !night));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setDashButtonBackground(Context ctx, View view, boolean night) {
|
public static void setDashButtonBackground(Context ctx, View view, boolean night) {
|
||||||
|
|
|
@ -144,7 +144,7 @@ public class UiUtilities {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Drawable getMapIcon(@DrawableRes int id, boolean light) {
|
public Drawable getMapIcon(@DrawableRes int id, boolean light) {
|
||||||
return getDrawable(id, light ? R.color.icon_color_default_light : 0);
|
return getDrawable(id, light ? R.color.map_button_icon_color_light : R.color.map_button_icon_color_dark);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Drawable getSelectableDrawable(Context ctx) {
|
public static Drawable getSelectableDrawable(Context ctx) {
|
||||||
|
|
|
@ -368,7 +368,7 @@ public class MapActivityActions implements DialogProvider {
|
||||||
adapter.addItem(itemBuilder
|
adapter.addItem(itemBuilder
|
||||||
.setTitleId(R.string.shared_string_actions, mapActivity)
|
.setTitleId(R.string.shared_string_actions, mapActivity)
|
||||||
.setId(MAP_CONTEXT_MENU_MORE_ID)
|
.setId(MAP_CONTEXT_MENU_MORE_ID)
|
||||||
.setIcon(R.drawable.map_overflow_menu_white)
|
.setIcon(R.drawable.ic_actions_menu)
|
||||||
.setOrder(40)
|
.setOrder(40)
|
||||||
.createItem());
|
.createItem());
|
||||||
|
|
||||||
|
@ -776,7 +776,7 @@ public class MapActivityActions implements DialogProvider {
|
||||||
|
|
||||||
optionsMenuHelper.addItem(new ItemBuilder().setTitleId(R.string.home, mapActivity)
|
optionsMenuHelper.addItem(new ItemBuilder().setTitleId(R.string.home, mapActivity)
|
||||||
.setId(DRAWER_DASHBOARD_ID)
|
.setId(DRAWER_DASHBOARD_ID)
|
||||||
.setIcon(R.drawable.map_dashboard)
|
.setIcon(R.drawable.ic_dashboard)
|
||||||
.setListener(new ItemClickListener() {
|
.setListener(new ItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
|
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
|
||||||
|
|
|
@ -415,7 +415,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, IRouteInfo
|
||||||
|
|
||||||
|
|
||||||
DashboardActionButton myLocationButton = new DashboardActionButton();
|
DashboardActionButton myLocationButton = new DashboardActionButton();
|
||||||
myLocationButton.icon = AppCompatResources.getDrawable(mapActivity, R.drawable.map_my_location);
|
myLocationButton.icon = AppCompatResources.getDrawable(mapActivity, R.drawable.ic_my_location);
|
||||||
myLocationButton.text = mapActivity.getString(R.string.map_widget_back_to_loc);
|
myLocationButton.text = mapActivity.getString(R.string.map_widget_back_to_loc);
|
||||||
myLocationButton.onClickListener = new View.OnClickListener() {
|
myLocationButton.onClickListener = new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -430,7 +430,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, IRouteInfo
|
||||||
};
|
};
|
||||||
|
|
||||||
DashboardActionButton navigateButton = new DashboardActionButton();
|
DashboardActionButton navigateButton = new DashboardActionButton();
|
||||||
navigateButton.icon = AppCompatResources.getDrawable(mapActivity, R.drawable.map_start_navigation);
|
navigateButton.icon = AppCompatResources.getDrawable(mapActivity, R.drawable.ic_action_start_navigation);
|
||||||
navigateButton.text = mapActivity.getString(R.string.follow);
|
navigateButton.text = mapActivity.getString(R.string.follow);
|
||||||
navigateButton.onClickListener = new View.OnClickListener() {
|
navigateButton.onClickListener = new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -441,7 +441,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, IRouteInfo
|
||||||
};
|
};
|
||||||
|
|
||||||
DashboardActionButton routeButton = new DashboardActionButton();
|
DashboardActionButton routeButton = new DashboardActionButton();
|
||||||
routeButton.icon = AppCompatResources.getDrawable(mapActivity, R.drawable.map_directions);
|
routeButton.icon = AppCompatResources.getDrawable(mapActivity, R.drawable.ic_action_gdirections_dark);
|
||||||
routeButton.text = mapActivity.getString(R.string.layer_route);
|
routeButton.text = mapActivity.getString(R.string.layer_route);
|
||||||
routeButton.onClickListener = new View.OnClickListener() {
|
routeButton.onClickListener = new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -914,7 +914,7 @@ public class MapContextMenu extends MenuTitleController implements StateChangedL
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getFabIconId() {
|
public int getFabIconId() {
|
||||||
int res = R.drawable.map_directions;
|
int res = R.drawable.ic_action_gdirections_dark;
|
||||||
MapActivity mapActivity = getMapActivity();
|
MapActivity mapActivity = getMapActivity();
|
||||||
if (mapActivity != null) {
|
if (mapActivity != null) {
|
||||||
RoutingHelper routingHelper = mapActivity.getMyApplication().getRoutingHelper();
|
RoutingHelper routingHelper = mapActivity.getMyApplication().getRoutingHelper();
|
||||||
|
|
|
@ -513,9 +513,9 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
|
||||||
zoomInButtonView = (ImageButton) view.findViewById(R.id.context_menu_zoom_in_button);
|
zoomInButtonView = (ImageButton) view.findViewById(R.id.context_menu_zoom_in_button);
|
||||||
zoomOutButtonView = (ImageButton) view.findViewById(R.id.context_menu_zoom_out_button);
|
zoomOutButtonView = (ImageButton) view.findViewById(R.id.context_menu_zoom_out_button);
|
||||||
if (menu.zoomButtonsVisible()) {
|
if (menu.zoomButtonsVisible()) {
|
||||||
AndroidUtils.updateImageButton(mapActivity, zoomInButtonView, R.drawable.map_zoom_in, R.drawable.map_zoom_in_night,
|
AndroidUtils.updateImageButton(app, zoomInButtonView, R.drawable.ic_zoom_in, R.drawable.ic_zoom_in,
|
||||||
R.drawable.btn_circle_trans, R.drawable.btn_circle_night, nightMode);
|
R.drawable.btn_circle_trans, R.drawable.btn_circle_night, nightMode);
|
||||||
AndroidUtils.updateImageButton(mapActivity, zoomOutButtonView, R.drawable.map_zoom_out, R.drawable.map_zoom_out_night,
|
AndroidUtils.updateImageButton(app, zoomOutButtonView, R.drawable.ic_zoom_out, R.drawable.ic_zoom_out,
|
||||||
R.drawable.btn_circle_trans, R.drawable.btn_circle_night, nightMode);
|
R.drawable.btn_circle_trans, R.drawable.btn_circle_night, nightMode);
|
||||||
zoomInButtonView.setOnClickListener(new View.OnClickListener() {
|
zoomInButtonView.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -622,7 +622,7 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
TextView directionsButton = (TextView) view.findViewById(R.id.context_menu_directions_button);
|
TextView directionsButton = (TextView) view.findViewById(R.id.context_menu_directions_button);
|
||||||
int iconResId = R.drawable.map_directions;
|
int iconResId = R.drawable.ic_action_gdirections_dark;
|
||||||
if (menu.navigateInPedestrianMode()) {
|
if (menu.navigateInPedestrianMode()) {
|
||||||
iconResId = R.drawable.ic_action_pedestrian_dark;
|
iconResId = R.drawable.ic_action_pedestrian_dark;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,6 @@ package net.osmand.plus.mapcontextmenu.editors;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.graphics.Color;
|
|
||||||
import android.graphics.PorterDuff;
|
import android.graphics.PorterDuff;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
@ -99,7 +98,7 @@ public class SelectCategoryDialogFragment extends DialogFragment {
|
||||||
}
|
}
|
||||||
View itemView = UiUtilities.getInflater(activity, nightMode).inflate(R.layout.favorite_category_dialog_item, null);
|
View itemView = UiUtilities.getInflater(activity, nightMode).inflate(R.layout.favorite_category_dialog_item, null);
|
||||||
Button button = (Button)itemView.findViewById(R.id.button);
|
Button button = (Button)itemView.findViewById(R.id.button);
|
||||||
button.setCompoundDrawablesWithIntrinsicBounds(getIcon(activity, R.drawable.map_zoom_in), null, null, null);
|
button.setCompoundDrawablesWithIntrinsicBounds(getIcon(activity, R.drawable.ic_zoom_in), null, null, null);
|
||||||
button.setCompoundDrawablePadding(AndroidUtils.dpToPx(activity,15f));
|
button.setCompoundDrawablePadding(AndroidUtils.dpToPx(activity,15f));
|
||||||
button.setText(activity.getResources().getText(R.string.favorite_category_add_new));
|
button.setText(activity.getResources().getText(R.string.favorite_category_add_new));
|
||||||
button.setOnClickListener(new View.OnClickListener() {
|
button.setOnClickListener(new View.OnClickListener() {
|
||||||
|
|
|
@ -784,7 +784,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment implement
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
menuAdapter.addItem(itemBuilder.setTitleId(R.string.add_new_folder, app)
|
menuAdapter.addItem(itemBuilder.setTitleId(R.string.add_new_folder, app)
|
||||||
.setIcon(R.drawable.map_zoom_in).setTag(-1).createItem());
|
.setIcon(R.drawable.ic_zoom_in).setTag(-1).createItem());
|
||||||
final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||||
final ArrayAdapter<ContextMenuItem> listAdapter =
|
final ArrayAdapter<ContextMenuItem> listAdapter =
|
||||||
menuAdapter.createListAdapter(getActivity(), app.getSettings().isLightContent());
|
menuAdapter.createListAdapter(getActivity(), app.getSettings().isLightContent());
|
||||||
|
|
|
@ -352,9 +352,9 @@ public class ChooseRouteFragment extends BaseOsmAndFragment implements ContextMe
|
||||||
ImageButton zoomOutButtonView = (ImageButton) view.findViewById(R.id.map_zoom_out_button);
|
ImageButton zoomOutButtonView = (ImageButton) view.findViewById(R.id.map_zoom_out_button);
|
||||||
ImageButton myLocButtonView = (ImageButton) view.findViewById(R.id.map_my_location_button);
|
ImageButton myLocButtonView = (ImageButton) view.findViewById(R.id.map_my_location_button);
|
||||||
this.myLocButtonView = myLocButtonView;
|
this.myLocButtonView = myLocButtonView;
|
||||||
AndroidUtils.updateImageButton(app, zoomInButtonView, R.drawable.map_zoom_in, R.drawable.map_zoom_in_night,
|
AndroidUtils.updateImageButton(app, zoomInButtonView, R.drawable.ic_zoom_in, R.drawable.ic_zoom_in,
|
||||||
R.drawable.btn_circle_trans, R.drawable.btn_circle_night, nightMode);
|
R.drawable.btn_circle_trans, R.drawable.btn_circle_night, nightMode);
|
||||||
AndroidUtils.updateImageButton(app, zoomOutButtonView, R.drawable.map_zoom_out, R.drawable.map_zoom_out_night,
|
AndroidUtils.updateImageButton(app, zoomOutButtonView, R.drawable.ic_zoom_out, R.drawable.ic_zoom_out,
|
||||||
R.drawable.btn_circle_trans, R.drawable.btn_circle_night, nightMode);
|
R.drawable.btn_circle_trans, R.drawable.btn_circle_night, nightMode);
|
||||||
zoomInButtonView.setOnClickListener(new OnClickListener() {
|
zoomInButtonView.setOnClickListener(new OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -402,14 +402,14 @@ public class ChooseRouteFragment extends BaseOsmAndFragment implements ContextMe
|
||||||
ImageButton myLocButtonView = this.myLocButtonView;
|
ImageButton myLocButtonView = this.myLocButtonView;
|
||||||
if (myLocButtonView != null) {
|
if (myLocButtonView != null) {
|
||||||
if (!enabled) {
|
if (!enabled) {
|
||||||
myLocButtonView.setImageDrawable(getIcon(R.drawable.map_my_location, R.color.icon_color_default_light));
|
myLocButtonView.setImageDrawable(getIcon(R.drawable.ic_my_location, R.color.icon_color_default_light));
|
||||||
AndroidUtils.setBackground(app, myLocButtonView, nightMode, R.drawable.btn_circle, R.drawable.btn_circle_night);
|
AndroidUtils.setBackground(app, myLocButtonView, nightMode, R.drawable.btn_circle, R.drawable.btn_circle_night);
|
||||||
myLocButtonView.setContentDescription(mapActivity.getString(R.string.unknown_location));
|
myLocButtonView.setContentDescription(mapActivity.getString(R.string.unknown_location));
|
||||||
} else if (tracked) {
|
} else if (tracked) {
|
||||||
myLocButtonView.setImageDrawable(getIcon(R.drawable.map_my_location, R.color.color_myloc_distance));
|
myLocButtonView.setImageDrawable(getIcon(R.drawable.ic_my_location, R.color.color_myloc_distance));
|
||||||
AndroidUtils.setBackground(app, myLocButtonView, nightMode, R.drawable.btn_circle, R.drawable.btn_circle_night);
|
AndroidUtils.setBackground(app, myLocButtonView, nightMode, R.drawable.btn_circle, R.drawable.btn_circle_night);
|
||||||
} else {
|
} else {
|
||||||
myLocButtonView.setImageResource(R.drawable.map_my_location);
|
myLocButtonView.setImageResource(R.drawable.ic_my_location);
|
||||||
AndroidUtils.setBackground(app, myLocButtonView, nightMode, R.drawable.btn_circle_blue, R.drawable.btn_circle_blue);
|
AndroidUtils.setBackground(app, myLocButtonView, nightMode, R.drawable.btn_circle_blue, R.drawable.btn_circle_blue);
|
||||||
myLocButtonView.setContentDescription(mapActivity.getString(R.string.map_widget_back_to_loc));
|
myLocButtonView.setContentDescription(mapActivity.getString(R.string.map_widget_back_to_loc));
|
||||||
}
|
}
|
||||||
|
|
|
@ -2299,7 +2299,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener
|
||||||
case ROUTE_INFO:
|
case ROUTE_INFO:
|
||||||
return 0;
|
return 0;
|
||||||
case ROUTE_DETAILS:
|
case ROUTE_DETAILS:
|
||||||
return app != null ? app.getRoutingHelper().getAppMode().getIconRes() : R.drawable.map_directions;
|
return app != null ? app.getRoutingHelper().getAppMode().getIconRes() : R.drawable.ic_action_gdirections_dark;
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,7 +83,7 @@ public class ImportedSettingsItemsAdapter extends
|
||||||
holder.title.setText(R.string.shared_string_settings);
|
holder.title.setText(R.string.shared_string_settings);
|
||||||
break;
|
break;
|
||||||
case QUICK_ACTIONS:
|
case QUICK_ACTIONS:
|
||||||
holder.icon.setImageDrawable(uiUtils.getIcon(R.drawable.map_quick_action, activeColorRes));
|
holder.icon.setImageDrawable(uiUtils.getIcon(R.drawable.ic_quick_action, activeColorRes));
|
||||||
holder.title.setText(R.string.configure_screen_quick_action);
|
holder.title.setText(R.string.configure_screen_quick_action);
|
||||||
break;
|
break;
|
||||||
case POI_TYPES:
|
case POI_TYPES:
|
||||||
|
|
|
@ -273,7 +273,7 @@ public class MapControlsLayer extends OsmandMapLayer {
|
||||||
});
|
});
|
||||||
|
|
||||||
View compass = mapActivity.findViewById(R.id.map_compass_button);
|
View compass = mapActivity.findViewById(R.id.map_compass_button);
|
||||||
compassHud = createHudButton(compass, R.drawable.map_compass, COMPASS_HUD_ID).setIconColorId(0).
|
compassHud = createHudButton(compass, R.drawable.ic_compass, COMPASS_HUD_ID).setIconColorId(0).
|
||||||
setBg(R.drawable.btn_inset_circle_trans, R.drawable.btn_inset_circle_night);
|
setBg(R.drawable.btn_inset_circle_trans, R.drawable.btn_inset_circle_night);
|
||||||
compassHud.compass = true;
|
compassHud.compass = true;
|
||||||
controls.add(compassHud);
|
controls.add(compassHud);
|
||||||
|
@ -299,6 +299,7 @@ public class MapControlsLayer extends OsmandMapLayer {
|
||||||
|
|
||||||
View search = mapActivity.findViewById(R.id.map_search_button);
|
View search = mapActivity.findViewById(R.id.map_search_button);
|
||||||
quickSearchHud = createHudButton(search, R.drawable.ic_action_search_dark, QUICK_SEARCH_HUD_ID)
|
quickSearchHud = createHudButton(search, R.drawable.ic_action_search_dark, QUICK_SEARCH_HUD_ID)
|
||||||
|
.setIconColorId(R.color.map_button_icon_color_light, R.color.map_button_icon_color_dark)
|
||||||
.setBg(R.drawable.btn_inset_circle_trans, R.drawable.btn_inset_circle_night);
|
.setBg(R.drawable.btn_inset_circle_trans, R.drawable.btn_inset_circle_night);
|
||||||
controls.add(quickSearchHud);
|
controls.add(quickSearchHud);
|
||||||
search.setOnClickListener(new View.OnClickListener() {
|
search.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@ -353,7 +354,8 @@ public class MapControlsLayer extends OsmandMapLayer {
|
||||||
|
|
||||||
private void initControls() {
|
private void initControls() {
|
||||||
View backToLocation = mapActivity.findViewById(R.id.map_my_location_button);
|
View backToLocation = mapActivity.findViewById(R.id.map_my_location_button);
|
||||||
backToLocationControl = createHudButton(backToLocation, R.drawable.map_my_location, BACK_TO_LOC_HUD_ID)
|
backToLocationControl = createHudButton(backToLocation, R.drawable.ic_my_location, BACK_TO_LOC_HUD_ID)
|
||||||
|
.setIconColorId(R.color.map_button_icon_color_light, R.color.map_button_icon_color_dark)
|
||||||
.setBg(R.drawable.btn_circle_blue);
|
.setBg(R.drawable.btn_circle_blue);
|
||||||
controls.add(backToLocationControl);
|
controls.add(backToLocationControl);
|
||||||
|
|
||||||
|
@ -373,8 +375,9 @@ public class MapControlsLayer extends OsmandMapLayer {
|
||||||
|
|
||||||
final boolean dash = settings.SHOW_DASHBOARD_ON_MAP_SCREEN.get();
|
final boolean dash = settings.SHOW_DASHBOARD_ON_MAP_SCREEN.get();
|
||||||
menuControl = createHudButton(backToMenuButton,
|
menuControl = createHudButton(backToMenuButton,
|
||||||
!dash ? R.drawable.ic_navigation_drawer : R.drawable.ic_dashboard_dark, MENU_HUD_ID).setBg(
|
!dash ? R.drawable.ic_navigation_drawer : R.drawable.ic_dashboard, MENU_HUD_ID)
|
||||||
R.drawable.btn_round, R.drawable.btn_round_night);
|
.setIconColorId(R.color.map_button_icon_color_light, R.color.map_button_icon_color_dark)
|
||||||
|
.setBg(R.drawable.btn_round, R.drawable.btn_round_night);
|
||||||
controls.add(menuControl);
|
controls.add(menuControl);
|
||||||
backToMenuButton.setOnClickListener(new View.OnClickListener() {
|
backToMenuButton.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -390,8 +393,9 @@ public class MapControlsLayer extends OsmandMapLayer {
|
||||||
zoomText = (TextView) mapActivity.findViewById(R.id.map_app_mode_text);
|
zoomText = (TextView) mapActivity.findViewById(R.id.map_app_mode_text);
|
||||||
|
|
||||||
View routePlanButton = mapActivity.findViewById(R.id.map_route_info_button);
|
View routePlanButton = mapActivity.findViewById(R.id.map_route_info_button);
|
||||||
routePlanningBtn = createHudButton(routePlanButton, R.drawable.ic_action_gdirections_dark, ROUTE_PLANNING_HUD_ID).setBg(
|
routePlanningBtn = createHudButton(routePlanButton, R.drawable.ic_action_gdirections_dark, ROUTE_PLANNING_HUD_ID)
|
||||||
R.drawable.btn_round, R.drawable.btn_round_night);
|
.setIconColorId(R.color.map_button_icon_color_light, R.color.map_button_icon_color_dark)
|
||||||
|
.setBg(R.drawable.btn_round, R.drawable.btn_round_night);
|
||||||
controls.add(routePlanningBtn);
|
controls.add(routePlanningBtn);
|
||||||
routePlanButton.setOnClickListener(new View.OnClickListener() {
|
routePlanButton.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -584,7 +588,7 @@ public class MapControlsLayer extends OsmandMapLayer {
|
||||||
private void initZooms() {
|
private void initZooms() {
|
||||||
final OsmandMapTileView view = mapActivity.getMapView();
|
final OsmandMapTileView view = mapActivity.getMapView();
|
||||||
View zoomInButton = mapActivity.findViewById(R.id.map_zoom_in_button);
|
View zoomInButton = mapActivity.findViewById(R.id.map_zoom_in_button);
|
||||||
mapZoomIn = createHudButton(zoomInButton, R.drawable.map_zoom_in, ZOOM_IN_HUD_ID).setRoundTransparent();
|
mapZoomIn = createHudButton(zoomInButton, R.drawable.ic_zoom_in, ZOOM_IN_HUD_ID).setRoundTransparent();
|
||||||
controls.add(mapZoomIn);
|
controls.add(mapZoomIn);
|
||||||
zoomInButton.setOnClickListener(new View.OnClickListener() {
|
zoomInButton.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -603,7 +607,7 @@ public class MapControlsLayer extends OsmandMapLayer {
|
||||||
final View.OnLongClickListener listener = MapControlsLayer.getOnClickMagnifierListener(view);
|
final View.OnLongClickListener listener = MapControlsLayer.getOnClickMagnifierListener(view);
|
||||||
zoomInButton.setOnLongClickListener(listener);
|
zoomInButton.setOnLongClickListener(listener);
|
||||||
View zoomOutButton = mapActivity.findViewById(R.id.map_zoom_out_button);
|
View zoomOutButton = mapActivity.findViewById(R.id.map_zoom_out_button);
|
||||||
mapZoomOut = createHudButton(zoomOutButton, R.drawable.map_zoom_out, ZOOM_OUT_HUD_ID).setRoundTransparent();
|
mapZoomOut = createHudButton(zoomOutButton, R.drawable.ic_zoom_out, ZOOM_OUT_HUD_ID).setRoundTransparent();
|
||||||
controls.add(mapZoomOut);
|
controls.add(mapZoomOut);
|
||||||
zoomOutButton.setOnClickListener(new View.OnClickListener() {
|
zoomOutButton.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -787,19 +791,19 @@ public class MapControlsLayer extends OsmandMapLayer {
|
||||||
updateMyLocation(rh, routeDialogOpened || trackDialogOpened || contextMenuOpened);
|
updateMyLocation(rh, routeDialogOpened || trackDialogOpened || contextMenuOpened);
|
||||||
boolean showButtons = (showRouteCalculationControls || !routeFollowingMode)
|
boolean showButtons = (showRouteCalculationControls || !routeFollowingMode)
|
||||||
&& !isInMovingMarkerMode() && !isInGpxDetailsMode() && !isInMeasurementToolMode() && !isInPlanRouteMode() && !contextMenuOpened && !isInChoosingRoutesMode() && !isInWaypointsChoosingMode();
|
&& !isInMovingMarkerMode() && !isInGpxDetailsMode() && !isInMeasurementToolMode() && !isInPlanRouteMode() && !contextMenuOpened && !isInChoosingRoutesMode() && !isInWaypointsChoosingMode();
|
||||||
//routePlanningBtn.setIconResId(routeFollowingMode ? R.drawable.ic_action_info_dark : R.drawable.map_directions);
|
//routePlanningBtn.setIconResId(routeFollowingMode ? R.drawable.ic_action_info_dark : R.drawable.ic_action_gdirections_dark);
|
||||||
int routePlanningBtnImage = mapRouteInfoMenu.getRoutePlanningBtnImage();
|
int routePlanningBtnImage = mapRouteInfoMenu.getRoutePlanningBtnImage();
|
||||||
if (routePlanningBtnImage != 0) {
|
if (routePlanningBtnImage != 0) {
|
||||||
routePlanningBtn.setIconResId(routePlanningBtnImage);
|
routePlanningBtn.setIconResId(routePlanningBtnImage);
|
||||||
routePlanningBtn.setIconColorId(R.color.color_myloc_distance);
|
routePlanningBtn.setIconColorId(R.color.color_myloc_distance);
|
||||||
} else if (rh.isFollowingMode()) {
|
} else if (rh.isFollowingMode()) {
|
||||||
routePlanningBtn.setIconResId(R.drawable.map_start_navigation);
|
routePlanningBtn.setIconResId(R.drawable.ic_action_start_navigation);
|
||||||
routePlanningBtn.setIconColorId(R.color.color_myloc_distance);
|
routePlanningBtn.setIconColorId(R.color.color_myloc_distance);
|
||||||
} else if (routePlanningMode) {
|
} else if (routePlanningMode) {
|
||||||
routePlanningBtn.setIconResId(R.drawable.map_directions);
|
routePlanningBtn.setIconResId(R.drawable.ic_action_gdirections_dark);
|
||||||
routePlanningBtn.setIconColorId(R.color.color_myloc_distance);
|
routePlanningBtn.setIconColorId(R.color.color_myloc_distance);
|
||||||
} else {
|
} else {
|
||||||
routePlanningBtn.setIconResId(R.drawable.map_directions);
|
routePlanningBtn.setIconResId(R.drawable.ic_action_gdirections_dark);
|
||||||
routePlanningBtn.resetIconColors();
|
routePlanningBtn.resetIconColors();
|
||||||
}
|
}
|
||||||
routePlanningBtn.updateVisibility(showButtons);
|
routePlanningBtn.updateVisibility(showButtons);
|
||||||
|
@ -854,15 +858,15 @@ public class MapControlsLayer extends OsmandMapLayer {
|
||||||
compassHud.updateVisibility(showCompass);
|
compassHud.updateVisibility(showCompass);
|
||||||
}
|
}
|
||||||
if (settings.ROTATE_MAP.get() == OsmandSettings.ROTATE_MAP_NONE) {
|
if (settings.ROTATE_MAP.get() == OsmandSettings.ROTATE_MAP_NONE) {
|
||||||
compassHud.setIconResId(isNight ? R.drawable.map_compass_niu_white : R.drawable.map_compass_niu);
|
compassHud.setIconResId(isNight ? R.drawable.ic_compass_niu_white : R.drawable.ic_compass_niu);
|
||||||
compassHud.iv.setContentDescription(mapActivity.getString(R.string.rotate_map_none_opt));
|
compassHud.iv.setContentDescription(mapActivity.getString(R.string.rotate_map_none_opt));
|
||||||
compassHud.updateVisibility(showCompass);
|
compassHud.updateVisibility(showCompass);
|
||||||
} else if (settings.ROTATE_MAP.get() == OsmandSettings.ROTATE_MAP_BEARING) {
|
} else if (settings.ROTATE_MAP.get() == OsmandSettings.ROTATE_MAP_BEARING) {
|
||||||
compassHud.setIconResId(isNight ? R.drawable.map_compass_bearing_white : R.drawable.map_compass_bearing);
|
compassHud.setIconResId(isNight ? R.drawable.ic_compass_bearing_white : R.drawable.ic_compass_bearing);
|
||||||
compassHud.iv.setContentDescription(mapActivity.getString(R.string.rotate_map_bearing_opt));
|
compassHud.iv.setContentDescription(mapActivity.getString(R.string.rotate_map_bearing_opt));
|
||||||
compassHud.updateVisibility(true);
|
compassHud.updateVisibility(true);
|
||||||
} else {
|
} else {
|
||||||
compassHud.setIconResId(isNight ? R.drawable.map_compass_white : R.drawable.map_compass);
|
compassHud.setIconResId(isNight ? R.drawable.ic_compass_white : R.drawable.ic_compass);
|
||||||
compassHud.iv.setContentDescription(mapActivity.getString(R.string.rotate_map_compass_opt));
|
compassHud.iv.setContentDescription(mapActivity.getString(R.string.rotate_map_compass_opt));
|
||||||
compassHud.updateVisibility(true);
|
compassHud.updateVisibility(true);
|
||||||
}
|
}
|
||||||
|
@ -887,7 +891,7 @@ public class MapControlsLayer extends OsmandMapLayer {
|
||||||
|
|
||||||
if (!enabled) {
|
if (!enabled) {
|
||||||
backToLocationControl.setBg(R.drawable.btn_circle, R.drawable.btn_circle_night);
|
backToLocationControl.setBg(R.drawable.btn_circle, R.drawable.btn_circle_night);
|
||||||
backToLocationControl.setIconColorId(R.color.icon_color_default_light, 0);
|
backToLocationControl.setIconColorId(R.color.map_button_icon_color_light, R.color.map_button_icon_color_dark);
|
||||||
backToLocationControl.iv.setContentDescription(mapActivity.getString(R.string.unknown_location));
|
backToLocationControl.iv.setContentDescription(mapActivity.getString(R.string.unknown_location));
|
||||||
} else if (tracked) {
|
} else if (tracked) {
|
||||||
backToLocationControl.setBg(R.drawable.btn_circle, R.drawable.btn_circle_night);
|
backToLocationControl.setBg(R.drawable.btn_circle, R.drawable.btn_circle_night);
|
||||||
|
@ -983,8 +987,8 @@ public class MapControlsLayer extends OsmandMapLayer {
|
||||||
int resId;
|
int resId;
|
||||||
int resLightId;
|
int resLightId;
|
||||||
int resDarkId;
|
int resDarkId;
|
||||||
int resClrLight = R.color.icon_color_default_light;
|
int resClrLight = R.color.map_button_icon_color_light;
|
||||||
int resClrDark = 0;
|
int resClrDark = R.color.map_button_icon_color_dark;
|
||||||
String id;
|
String id;
|
||||||
|
|
||||||
boolean nightMode = false;
|
boolean nightMode = false;
|
||||||
|
@ -1093,11 +1097,11 @@ public class MapControlsLayer extends OsmandMapLayer {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean resetIconColors() {
|
public boolean resetIconColors() {
|
||||||
if (resClrLight == R.color.icon_color_default_light && resClrDark == 0) {
|
if (resClrLight == R.color.map_button_icon_color_light && resClrDark == R.color.map_button_icon_color_dark) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
resClrLight = R.color.icon_color_default_light;
|
resClrLight = R.color.map_button_icon_color_light;
|
||||||
resClrDark = 0;
|
resClrDark = R.color.map_button_icon_color_dark;
|
||||||
f = true;
|
f = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1157,14 +1161,9 @@ public class MapControlsLayer extends OsmandMapLayer {
|
||||||
}
|
}
|
||||||
if (iv instanceof ImageView) {
|
if (iv instanceof ImageView) {
|
||||||
if (compass) {
|
if (compass) {
|
||||||
((ImageView) iv).setImageDrawable(new CompassDrawable(d));
|
setMapButtonIcon((ImageView) iv, new CompassDrawable(d));
|
||||||
} else {
|
} else {
|
||||||
int btnSizePx = (iv).getLayoutParams().height;
|
setMapButtonIcon((ImageView) iv, d);
|
||||||
int iconSizePx = (int) ctx.getResources().getDimension(R.dimen.map_widget_icon);
|
|
||||||
int iconPadding = (btnSizePx - iconSizePx) / 2;
|
|
||||||
iv.setPadding(iconPadding, iconPadding, iconPadding, iconPadding);
|
|
||||||
((ImageView) iv).setScaleType(ImageView.ScaleType.FIT_CENTER);
|
|
||||||
((ImageView) iv).setImageDrawable(d);
|
|
||||||
}
|
}
|
||||||
} else if (iv instanceof TextView) {
|
} else if (iv instanceof TextView) {
|
||||||
((TextView) iv).setCompoundDrawablesWithIntrinsicBounds(
|
((TextView) iv).setCompoundDrawablesWithIntrinsicBounds(
|
||||||
|
|
|
@ -2,6 +2,7 @@ package net.osmand.plus.views;
|
||||||
|
|
||||||
|
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.View.OnClickListener;
|
import android.view.View.OnClickListener;
|
||||||
import android.widget.ImageButton;
|
import android.widget.ImageButton;
|
||||||
|
@ -237,8 +238,9 @@ public class MapInfoLayer extends OsmandMapLayer {
|
||||||
|
|
||||||
expand.setVisibility(mapInfoControls.hasCollapsibles(settings.getApplicationMode())?
|
expand.setVisibility(mapInfoControls.hasCollapsibles(settings.getApplicationMode())?
|
||||||
View.VISIBLE : View.GONE);
|
View.VISIBLE : View.GONE);
|
||||||
this.expand.setImageResource(expanded ? R.drawable.map_up :
|
Drawable expandIcon = map.getMyApplication().getUIUtilities().getMapIcon(expanded ? R.drawable.ic_action_arrow_up :
|
||||||
R.drawable.map_down);
|
R.drawable.ic_action_arrow_down, true);
|
||||||
|
setMapButtonIcon(expand, expandIcon);
|
||||||
expand.setContentDescription(map.getString(expanded ? R.string.shared_string_collapse : R.string.access_widget_expand));
|
expand.setContentDescription(map.getString(expanded ? R.string.shared_string_collapse : R.string.access_widget_expand));
|
||||||
expand.setOnClickListener(new OnClickListener() {
|
expand.setOnClickListener(new OnClickListener() {
|
||||||
|
|
||||||
|
@ -289,7 +291,9 @@ public class MapInfoLayer extends OsmandMapLayer {
|
||||||
updateTopToolbar(nightMode);
|
updateTopToolbar(nightMode);
|
||||||
lanesControl.updateTextSize(nightMode, ts.textColor, ts.textShadowColor, ts.textBold, ts.textShadowRadius / 2);
|
lanesControl.updateTextSize(nightMode, ts.textColor, ts.textShadowColor, ts.textBold, ts.textShadowRadius / 2);
|
||||||
rulerControl.updateTextSize(nightMode, ts.textColor, ts.textShadowColor, (int) (2 * view.getDensity()));
|
rulerControl.updateTextSize(nightMode, ts.textColor, ts.textShadowColor, (int) (2 * view.getDensity()));
|
||||||
|
int padding = this.expand.getPaddingLeft();
|
||||||
this.expand.setBackgroundResource(ts.expand);
|
this.expand.setBackgroundResource(ts.expand);
|
||||||
|
this.expand.setPadding(padding, padding, padding, padding);
|
||||||
rightStack.invalidate();
|
rightStack.invalidate();
|
||||||
leftStack.invalidate();
|
leftStack.invalidate();
|
||||||
}
|
}
|
||||||
|
|
|
@ -283,15 +283,9 @@ public class MapQuickActionLayer extends OsmandMapLayer implements QuickActionRe
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateQuickActionButton(boolean widgetVisible) {
|
private void updateQuickActionButton(boolean widgetVisible) {
|
||||||
quickActionButton.setBackgroundResource(
|
quickActionButton.setBackgroundResource(nightMode ? R.drawable.btn_circle_night : R.drawable.btn_circle_trans);
|
||||||
nightMode ? R.drawable.btn_circle_night : R.drawable.btn_circle_trans);
|
setMapButtonIcon(quickActionButton, app.getUIUtilities().getMapIcon(
|
||||||
int btnSizePx = quickActionButton.getLayoutParams().height;
|
!widgetVisible ? R.drawable.ic_quick_action : R.drawable.ic_action_close, !nightMode));
|
||||||
int iconSizePx = (int) quickActionButton.getContext().getResources().getDimension(R.dimen.map_widget_icon);
|
|
||||||
int iconPadding = (btnSizePx - iconSizePx) / 2;
|
|
||||||
quickActionButton.setPadding(iconPadding, iconPadding, iconPadding, iconPadding);
|
|
||||||
quickActionButton.setScaleType(ImageView.ScaleType.FIT_CENTER);
|
|
||||||
quickActionButton.setImageDrawable(app.getUIUtilities().getMapIcon(
|
|
||||||
!widgetVisible ? R.drawable.map_quick_action : R.drawable.ic_action_close, !nightMode));
|
|
||||||
quickActionButton.setContentDescription(mapActivity.getString(!widgetVisible ? R.string.configure_screen_quick_action : R.string.shared_string_cancel));
|
quickActionButton.setContentDescription(mapActivity.getString(!widgetVisible ? R.string.configure_screen_quick_action : R.string.shared_string_cancel));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|