diff --git a/OsmAnd-java/src/main/java/net/osmand/binary/BinaryMapDataObject.java b/OsmAnd-java/src/main/java/net/osmand/binary/BinaryMapDataObject.java index 4a3c465699..8966256ea5 100644 --- a/OsmAnd-java/src/main/java/net/osmand/binary/BinaryMapDataObject.java +++ b/OsmAnd-java/src/main/java/net/osmand/binary/BinaryMapDataObject.java @@ -109,7 +109,7 @@ public class BinaryMapDataObject { } public boolean containsAdditionalType(int cachedType) { - if (cachedType != -1) { + if (cachedType != -1 && additionalTypes != null) { for (int i = 0; i < additionalTypes.length; i++) { if (additionalTypes[i] == cachedType) { return true; diff --git a/OsmAnd-telegram/build.gradle b/OsmAnd-telegram/build.gradle index 78df6e3f08..64c9f23668 100644 --- a/OsmAnd-telegram/build.gradle +++ b/OsmAnd-telegram/build.gradle @@ -145,11 +145,11 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.0.0' implementation 'com.google.android.material:material:1.0.0' implementation 'androidx.browser:browser:1.0.0' - implementation 'androidx.annotation:annotation:1.0.0' + implementation 'androidx.annotation:annotation:1.1.0' implementation 'commons-logging:commons-logging-api:1.1' - implementation 'androidx.recyclerview:recyclerview:1.0.0' + implementation 'androidx.recyclerview:recyclerview:1.1.0' implementation 'com.vividsolutions:jts-core:1.14.0' - implementation("com.github.HITGIF:TextFieldBoxes:1.4.4") { + implementation("com.github.HITGIF:TextFieldBoxes:1.4.5") { exclude group: 'com.android.support' } implementation 'org.jetbrains:annotations-java5:15.0' diff --git a/OsmAnd/res/drawable-xxxhdpi/img_empty_state_terrain.webp b/OsmAnd/res/drawable-xxxhdpi/img_empty_state_terrain.webp new file mode 100644 index 0000000000..860d358e33 Binary files /dev/null and b/OsmAnd/res/drawable-xxxhdpi/img_empty_state_terrain.webp differ diff --git a/OsmAnd/res/drawable/img_settings_customize_configure_map_day.xml b/OsmAnd/res/drawable/img_settings_customize_configure_map_day.xml new file mode 100644 index 0000000000..d784c2cf8a --- /dev/null +++ b/OsmAnd/res/drawable/img_settings_customize_configure_map_day.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + diff --git a/OsmAnd/res/drawable/img_settings_customize_configure_map_night.xml b/OsmAnd/res/drawable/img_settings_customize_configure_map_night.xml new file mode 100644 index 0000000000..f4811557b2 --- /dev/null +++ b/OsmAnd/res/drawable/img_settings_customize_configure_map_night.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/OsmAnd/res/drawable/img_settings_customize_context_menu_day.xml b/OsmAnd/res/drawable/img_settings_customize_context_menu_day.xml new file mode 100644 index 0000000000..1e5c46781b --- /dev/null +++ b/OsmAnd/res/drawable/img_settings_customize_context_menu_day.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/OsmAnd/res/drawable/img_settings_customize_context_menu_night.xml b/OsmAnd/res/drawable/img_settings_customize_context_menu_night.xml new file mode 100644 index 0000000000..dee2ae1aaa --- /dev/null +++ b/OsmAnd/res/drawable/img_settings_customize_context_menu_night.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/OsmAnd/res/drawable/img_settings_customize_drawer_day.xml b/OsmAnd/res/drawable/img_settings_customize_drawer_day.xml new file mode 100644 index 0000000000..396a5363bf --- /dev/null +++ b/OsmAnd/res/drawable/img_settings_customize_drawer_day.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/OsmAnd/res/drawable/img_settings_customize_drawer_night.xml b/OsmAnd/res/drawable/img_settings_customize_drawer_night.xml new file mode 100644 index 0000000000..a0cfc00b90 --- /dev/null +++ b/OsmAnd/res/drawable/img_settings_customize_drawer_night.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 7d5529a3ff..a00d39e6ad 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -43,7 +43,7 @@ Current items will be replaced with items from the file Replace all Keep both - Imported items will be added with prexif + Imported items will be added with prefix OsmAnd already has elements with the same names as those imported.\n\nSelect an action. Some items already exist Select the data to be imported. diff --git a/OsmAnd/src/net/osmand/aidl/ConnectedApp.java b/OsmAnd/src/net/osmand/aidl/ConnectedApp.java index ce25221fc8..bebccd4097 100644 --- a/OsmAnd/src/net/osmand/aidl/ConnectedApp.java +++ b/OsmAnd/src/net/osmand/aidl/ConnectedApp.java @@ -21,7 +21,6 @@ import net.osmand.plus.activities.MapActivity; import net.osmand.plus.views.AidlMapLayer; import net.osmand.plus.views.MapInfoLayer; import net.osmand.plus.views.OsmandMapLayer; -import net.osmand.plus.views.mapwidgets.MapWidgetRegistry; import net.osmand.plus.views.mapwidgets.TextInfoWidget; import net.osmand.util.Algorithms; @@ -174,11 +173,8 @@ public class ConnectedApp implements Comparable { widgetControls.put(widget.getId(), control); int iconId = AndroidUtils.getDrawableId(mapActivity.getMyApplication(), widget.getMenuIconName()); int menuIconId = iconId != 0 ? iconId : ContextMenuItem.INVALID_ID; - MapWidgetRegistry.MapWidgetRegInfo widgetInfo = layer.registerSideWidget(control, menuIconId, - widget.getMenuTitle(), "aidl_widget_" + widget.getId(), false, widget.getOrder()); - if (!mapActivity.getMapLayers().getMapWidgetRegistry().isVisible(widgetInfo.key)) { - mapActivity.getMapLayers().getMapWidgetRegistry().setVisibility(widgetInfo, true, false); - } + String widgetKey = "aidl_widget_" + widget.getId(); + layer.registerSideWidget(control, menuIconId, widget.getMenuTitle(), widgetKey, false, widget.getOrder()); } } } diff --git a/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java b/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java index 9e7f2feb10..9404442c1d 100644 --- a/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java +++ b/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java @@ -72,7 +72,6 @@ import net.osmand.plus.views.AidlMapLayer; import net.osmand.plus.views.MapInfoLayer; import net.osmand.plus.views.OsmandMapLayer; import net.osmand.plus.views.OsmandMapTileView; -import net.osmand.plus.views.mapwidgets.MapWidgetRegistry.MapWidgetRegInfo; import net.osmand.plus.views.mapwidgets.TextInfoWidget; import net.osmand.router.TurnType; import net.osmand.util.Algorithms; @@ -320,14 +319,11 @@ public class OsmandAidlApi { ApplicationMode.regWidgetVisibility(widget.getId(), (ApplicationMode[]) null); TextInfoWidget control = connectedApp.createWidgetControl(mapActivity, widgetId); connectedApp.getWidgetControls().put(widgetId, control); + int iconId = AndroidUtils.getDrawableId(app, widget.getMenuIconName()); int menuIconId = iconId != 0 ? iconId : ContextMenuItem.INVALID_ID; - MapWidgetRegInfo widgetInfo = layer.registerSideWidget(control, - menuIconId, widget.getMenuTitle(), "aidl_widget_" + widgetId, - false, widget.getOrder()); - if (!mapActivity.getMapLayers().getMapWidgetRegistry().isVisible(widgetInfo.key)) { - mapActivity.getMapLayers().getMapWidgetRegistry().setVisibility(widgetInfo, true, false); - } + String widgetKey = "aidl_widget_" + widgetId; + layer.registerSideWidget(control, menuIconId, widget.getMenuTitle(), widgetKey, false, widget.getOrder()); layer.recreateControls(); } } diff --git a/OsmAndCore-sample/build.gradle b/OsmAndCore-sample/build.gradle index 7a8f84669e..9dc879445d 100644 --- a/OsmAndCore-sample/build.gradle +++ b/OsmAndCore-sample/build.gradle @@ -1,8 +1,8 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 27 - buildToolsVersion "27.0.3" + compileSdkVersion 28 + buildToolsVersion "28.0.3" dexOptions { jumboMode true @@ -10,7 +10,7 @@ android { defaultConfig { minSdkVersion 15 - targetSdkVersion 27 + targetSdkVersion 28 versionCode 1 versionName "1.0" multiDexEnabled true @@ -121,9 +121,9 @@ repositories { dependencies { implementation project(path: ':OsmAnd-java', configuration: 'android') - implementation 'androidx.multidex:multidex:2.0.0' - implementation 'androidx.appcompat:appcompat:1.0.0' - implementation 'com.google.android.material:material:1.0.0' + implementation 'androidx.multidex:multidex:2.0.1' + implementation 'androidx.appcompat:appcompat:1.1.0' + implementation 'com.google.android.material:material:1.1.0' implementation 'commons-logging:commons-logging-api:1.1' implementation 'com.moparisthebest:junidecode:0.1.1'