Merge branch 'master' into plan_route_config_profile
# Conflicts: # OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java
This commit is contained in:
commit
7158e4fc71
300 changed files with 2323 additions and 14401 deletions
|
@ -77,6 +77,7 @@ import net.osmand.aidlapi.customization.OsmandSettingsInfoParams;
|
|||
import net.osmand.aidlapi.customization.CustomizationInfoParams;
|
||||
import net.osmand.aidlapi.customization.ProfileSettingsParams;
|
||||
import net.osmand.aidlapi.customization.MapMarginsParams;
|
||||
import net.osmand.aidlapi.customization.CustomPluginParams;
|
||||
|
||||
import net.osmand.aidlapi.gpx.AGpxFile;
|
||||
import net.osmand.aidlapi.gpx.AGpxFileDetails;
|
||||
|
@ -883,4 +884,6 @@ interface IOsmAndAidlInterface {
|
|||
* Is contect menu open.
|
||||
*/
|
||||
boolean isMenuOpen();
|
||||
|
||||
int getPluginVersion(in CustomPluginParams params);
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.customization;
|
||||
|
||||
parcelable CustomPluginParams;
|
|
@ -0,0 +1,48 @@
|
|||
package net.osmand.aidlapi.customization;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidlapi.AidlParams;
|
||||
|
||||
|
||||
public class CustomPluginParams extends AidlParams {
|
||||
|
||||
public static final String PLUGIN_ID_KEY = "plugin_id";
|
||||
|
||||
private String pluginId;
|
||||
|
||||
public CustomPluginParams(String pluginId) {
|
||||
this.pluginId = pluginId;
|
||||
}
|
||||
|
||||
public CustomPluginParams(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Creator<CustomPluginParams> CREATOR = new Creator<CustomPluginParams>() {
|
||||
@Override
|
||||
public CustomPluginParams createFromParcel(Parcel in) {
|
||||
return new CustomPluginParams(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CustomPluginParams[] newArray(int size) {
|
||||
return new CustomPluginParams[size];
|
||||
}
|
||||
};
|
||||
|
||||
public String getPluginId() {
|
||||
return pluginId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToBundle(Bundle bundle) {
|
||||
bundle.putString(PLUGIN_ID_KEY, pluginId);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readFromBundle(Bundle bundle) {
|
||||
pluginId = bundle.getString(PLUGIN_ID_KEY);
|
||||
}
|
||||
}
|
|
@ -43,6 +43,7 @@ public class Amenity extends MapObject {
|
|||
public static final String IS_PART = "is_part";
|
||||
public static final String IS_AGGR_PART = "is_aggr_part";
|
||||
public static final String CONTENT_JSON = "content_json";
|
||||
public static final String ROUTE_ID = "route_id";
|
||||
|
||||
|
||||
private String subType;
|
||||
|
|
|
@ -315,7 +315,7 @@ public class RouteSegmentResult implements StringExternalizable<RouteDataBundle>
|
|||
int[] turnLanes = TurnType.lanesFromString(bundle.getString("turnLanes", null));
|
||||
turnType.setLanes(turnLanes);
|
||||
}
|
||||
object.id = bundle.getLong("id", object.id);
|
||||
object.id = bundle.getLong("id", object.id) << 6;
|
||||
object.types = bundle.getIntArray("types", null);
|
||||
object.pointTypes = bundle.getIntIntArray("pointTypes", null);
|
||||
object.nameIds = bundle.getIntArray("names", null);
|
||||
|
|
|
@ -155,7 +155,7 @@
|
|||
<string name="shared_string_later">Síðar</string>
|
||||
<string name="bearing">Stefna</string>
|
||||
<string name="unit_of_speed_system">Hraðaeining</string>
|
||||
<string name="shared_string_map">Landakort</string>
|
||||
<string name="shared_string_map">Kort</string>
|
||||
<string name="min_logging_speed_descr">Sía: Engin skráning punkta fyrir neðan valinn hraða</string>
|
||||
<string name="in_time">í %1$s</string>
|
||||
<string name="my_location_search_hint">Leit: Hópur eða tengiliður</string>
|
||||
|
|
|
@ -269,4 +269,8 @@
|
|||
<string name="logcat_buffer">Logcat buffer</string>
|
||||
<string name="send_report">Invia rapporto</string>
|
||||
<string name="shared_string_export">Esporta</string>
|
||||
<string name="unit_of_speed_system_descr">Specifica l\'unità di misura della velocità.</string>
|
||||
<string name="time_zone_descr">Seleziona il fuso orario da mostrare nei messaggi sulla posizione.</string>
|
||||
<string name="buffer_time">Tempo di scadenza del buffer</string>
|
||||
<string name="buffer_time_descr">Tempo massimo per memorizzare i punti nel buffer</string>
|
||||
</resources>
|
|
@ -699,18 +699,20 @@ class TelegramSettings(private val app: TelegramApplication) {
|
|||
|
||||
val hiddenChats = mutableSetOf<Long>()
|
||||
val hiddenChatsSet = prefs.getStringSet(HIDDEN_ON_MAP_CHATS_KEY, mutableSetOf())
|
||||
for (chatId in hiddenChatsSet) {
|
||||
hiddenChats.add(chatId.toLong())
|
||||
hiddenChatsSet?.let {
|
||||
for (chatId in it) {
|
||||
hiddenChats.add(chatId.toLong())
|
||||
}
|
||||
}
|
||||
hiddenOnMapChats = hiddenChats
|
||||
|
||||
metricsConstants = MetricsConstants.valueOf(
|
||||
prefs.getString(METRICS_CONSTANTS_KEY, MetricsConstants.KILOMETERS_AND_METERS.name)
|
||||
prefs.getString(METRICS_CONSTANTS_KEY, MetricsConstants.KILOMETERS_AND_METERS.name)!!
|
||||
)
|
||||
speedConstants = SpeedConstants.valueOf(
|
||||
prefs.getString(SPEED_CONSTANTS_KEY, SpeedConstants.KILOMETERS_PER_HOUR.name)
|
||||
prefs.getString(SPEED_CONSTANTS_KEY, SpeedConstants.KILOMETERS_PER_HOUR.name)!!
|
||||
)
|
||||
utcOffset = prefs.getString(UTC_OFFSET_CONSTANTS_KEY, DataConstants.UTC_FORMAT)
|
||||
utcOffset = prefs.getString(UTC_OFFSET_CONSTANTS_KEY, DataConstants.UTC_FORMAT)!!
|
||||
|
||||
try {
|
||||
parseShareChatsInfo(JSONArray(prefs.getString(SHARE_CHATS_INFO_KEY, "")))
|
||||
|
@ -724,7 +726,7 @@ class TelegramSettings(private val app: TelegramApplication) {
|
|||
log.error(e)
|
||||
}
|
||||
|
||||
parseShareDevices(prefs.getString(SHARE_DEVICES_KEY, ""))
|
||||
parseShareDevices(prefs.getString(SHARE_DEVICES_KEY, "")!!)
|
||||
|
||||
val sendMyLocDef = SEND_MY_LOC_VALUES_SEC[SEND_MY_LOC_DEFAULT_INDEX]
|
||||
sendMyLocInterval = prefs.getLong(SEND_MY_LOC_INTERVAL_KEY, sendMyLocDef)
|
||||
|
@ -733,7 +735,7 @@ class TelegramSettings(private val app: TelegramApplication) {
|
|||
val locHistoryDef = LOC_HISTORY_VALUES_SEC[LOC_HISTORY_DEFAULT_INDEX]
|
||||
locHistoryTime = prefs.getLong(LOC_HISTORY_TIME_KEY, locHistoryDef)
|
||||
val shareTypeDef = SHARE_TYPE_VALUES[SHARE_TYPE_DEFAULT_INDEX]
|
||||
shareTypeValue = prefs.getString(SHARE_TYPE_KEY, shareTypeDef)
|
||||
shareTypeValue = prefs.getString(SHARE_TYPE_KEY, shareTypeDef)!!
|
||||
|
||||
val minLocationDistanceDef = MIN_LOCATION_DISTANCE[MIN_LOCATION_DISTANCE_INDEX]
|
||||
minLocationDistance = prefs.getFloat(MIN_LOCATION_DISTANCE_KEY, minLocationDistanceDef)
|
||||
|
@ -743,13 +745,13 @@ class TelegramSettings(private val app: TelegramApplication) {
|
|||
minLocationSpeed = prefs.getFloat(MIN_LOCATION_SPEED_KEY, minLocationSpeedDef)
|
||||
|
||||
val currentUserId = app.telegramHelper.getCurrentUserId()
|
||||
currentSharingMode = prefs.getString(SHARING_MODE_KEY, if (currentUserId != -1) currentUserId.toString() else "")
|
||||
currentSharingMode = prefs.getString(SHARING_MODE_KEY, if (currentUserId != -1) currentUserId.toString() else "")!!
|
||||
|
||||
val defPackage = if (AppConnect.getInstalledApps(app).size == 1) AppConnect.getInstalledApps(app).first().appPackage else ""
|
||||
appToConnectPackage = prefs.getString(APP_TO_CONNECT_PACKAGE_KEY, defPackage)
|
||||
appToConnectPackage = prefs.getString(APP_TO_CONNECT_PACKAGE_KEY, defPackage)!!
|
||||
|
||||
liveNowSortType = LiveNowSortType.valueOf(
|
||||
prefs.getString(LIVE_NOW_SORT_TYPE_KEY, LiveNowSortType.SORT_BY_DISTANCE.name)
|
||||
prefs.getString(LIVE_NOW_SORT_TYPE_KEY, LiveNowSortType.SORT_BY_DISTANCE.name)!!
|
||||
)
|
||||
|
||||
batteryOptimisationAsked = prefs.getBoolean(BATTERY_OPTIMISATION_ASKED,false)
|
||||
|
|
|
@ -295,7 +295,7 @@ class ShowLocationHelper(private val app: TelegramApplication) {
|
|||
|
||||
private fun getStatusWidgetIntent(): Intent {
|
||||
val startIntent = app.packageManager.getLaunchIntentForPackage(app.packageName)
|
||||
startIntent.addCategory(Intent.CATEGORY_LAUNCHER)
|
||||
startIntent!!.addCategory(Intent.CATEGORY_LAUNCHER)
|
||||
startIntent.putExtra(OPEN_MY_LOCATION_TAB_KEY,true)
|
||||
return startIntent
|
||||
}
|
||||
|
|
|
@ -106,18 +106,20 @@ class SetTimeBottomSheet : DialogFragment() {
|
|||
}
|
||||
|
||||
private fun selectStartDate() {
|
||||
val dateFromDialog = DatePickerDialog.OnDateSetListener { _, year, monthOfYear, dayOfMonth ->
|
||||
startCalendar.set(Calendar.YEAR, year)
|
||||
startCalendar.set(Calendar.MONTH, monthOfYear)
|
||||
startCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth)
|
||||
updateDateAndTimeButtons()
|
||||
}
|
||||
DatePickerDialog(
|
||||
context, dateFromDialog,
|
||||
startCalendar.get(Calendar.YEAR),
|
||||
startCalendar.get(Calendar.MONTH),
|
||||
startCalendar.get(Calendar.DAY_OF_MONTH)
|
||||
).show()
|
||||
context?.let {
|
||||
val dateFromDialog = DatePickerDialog.OnDateSetListener { _, year, monthOfYear, dayOfMonth ->
|
||||
startCalendar.set(Calendar.YEAR, year)
|
||||
startCalendar.set(Calendar.MONTH, monthOfYear)
|
||||
startCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth)
|
||||
updateDateAndTimeButtons()
|
||||
}
|
||||
DatePickerDialog(
|
||||
it, dateFromDialog,
|
||||
startCalendar.get(Calendar.YEAR),
|
||||
startCalendar.get(Calendar.MONTH),
|
||||
startCalendar.get(Calendar.DAY_OF_MONTH)
|
||||
).show()
|
||||
}
|
||||
}
|
||||
|
||||
private fun selectStartTime() {
|
||||
|
@ -132,18 +134,20 @@ class SetTimeBottomSheet : DialogFragment() {
|
|||
}
|
||||
|
||||
private fun selectEndDate() {
|
||||
val dateFromDialog = DatePickerDialog.OnDateSetListener { _, year, monthOfYear, dayOfMonth ->
|
||||
endCalendar.set(Calendar.YEAR, year)
|
||||
endCalendar.set(Calendar.MONTH, monthOfYear)
|
||||
endCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth)
|
||||
updateDateAndTimeButtons()
|
||||
}
|
||||
DatePickerDialog(
|
||||
context, dateFromDialog,
|
||||
endCalendar.get(Calendar.YEAR),
|
||||
endCalendar.get(Calendar.MONTH),
|
||||
endCalendar.get(Calendar.DAY_OF_MONTH)
|
||||
).show()
|
||||
context?.let {
|
||||
val dateFromDialog = DatePickerDialog.OnDateSetListener { _, year, monthOfYear, dayOfMonth ->
|
||||
endCalendar.set(Calendar.YEAR, year)
|
||||
endCalendar.set(Calendar.MONTH, monthOfYear)
|
||||
endCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth)
|
||||
updateDateAndTimeButtons()
|
||||
}
|
||||
DatePickerDialog(
|
||||
it, dateFromDialog,
|
||||
endCalendar.get(Calendar.YEAR),
|
||||
endCalendar.get(Calendar.MONTH),
|
||||
endCalendar.get(Calendar.DAY_OF_MONTH)
|
||||
).show()
|
||||
}
|
||||
}
|
||||
|
||||
private fun selectEndTime() {
|
||||
|
|
|
@ -53,7 +53,7 @@ class TimelineTabFragment : Fragment() {
|
|||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
): View {
|
||||
mainView = inflater.inflate(R.layout.fragment_timeline_tab, container, false)
|
||||
val appBarLayout = mainView.findViewById<View>(R.id.app_bar_layout)
|
||||
|
||||
|
@ -139,22 +139,24 @@ class TimelineTabFragment : Fragment() {
|
|||
fun tabClosed() {}
|
||||
|
||||
private fun selectDate() {
|
||||
val dateSetListener =
|
||||
DatePickerDialog.OnDateSetListener { _, year, monthOfYear, dayOfMonth ->
|
||||
calendar = Calendar.getInstance()
|
||||
calendar.set(Calendar.YEAR, year)
|
||||
calendar.set(Calendar.MONTH, monthOfYear)
|
||||
calendar.set(Calendar.DAY_OF_MONTH, dayOfMonth)
|
||||
context?.let {
|
||||
val dateSetListener =
|
||||
DatePickerDialog.OnDateSetListener { _, year, monthOfYear, dayOfMonth ->
|
||||
calendar = Calendar.getInstance()
|
||||
calendar.set(Calendar.YEAR, year)
|
||||
calendar.set(Calendar.MONTH, monthOfYear)
|
||||
calendar.set(Calendar.DAY_OF_MONTH, dayOfMonth)
|
||||
|
||||
updateList()
|
||||
updateDateButton()
|
||||
}
|
||||
DatePickerDialog(
|
||||
context, dateSetListener,
|
||||
calendar.get(Calendar.YEAR),
|
||||
calendar.get(Calendar.MONTH),
|
||||
calendar.get(Calendar.DAY_OF_MONTH)
|
||||
).show()
|
||||
updateList()
|
||||
updateDateButton()
|
||||
}
|
||||
DatePickerDialog(
|
||||
it, dateSetListener,
|
||||
calendar.get(Calendar.YEAR),
|
||||
calendar.get(Calendar.MONTH),
|
||||
calendar.get(Calendar.DAY_OF_MONTH)
|
||||
).show()
|
||||
}
|
||||
}
|
||||
|
||||
private fun getStartOfDay(calendar: Calendar): Long {
|
||||
|
|
|
@ -32,11 +32,11 @@ class BottomSheetDialog(ctx: Context) : Dialog(ctx, R.style.AppTheme_BottomSheet
|
|||
super.setContentView(wrapInContainer(layoutResID, null, null))
|
||||
}
|
||||
|
||||
override fun setContentView(view: View?) {
|
||||
override fun setContentView(view: View) {
|
||||
super.setContentView(wrapInContainer(0, view, null))
|
||||
}
|
||||
|
||||
override fun setContentView(view: View?, params: ViewGroup.LayoutParams?) {
|
||||
override fun setContentView(view: View, params: ViewGroup.LayoutParams?) {
|
||||
super.setContentView(wrapInContainer(0, view, params))
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ class TextViewEx : AppCompatTextView {
|
|||
}
|
||||
|
||||
val typefaceName = resolvedAttrs.getString(R.styleable.TextViewEx_typeface)
|
||||
val typeface = FontCache.getFont(context, typefaceName)
|
||||
val typeface = FontCache.getFont(context, typefaceName!!)
|
||||
if (typeface != null) {
|
||||
val style = getTypeface()?.style ?: 0
|
||||
setTypeface(typeface, style)
|
||||
|
|
|
@ -344,39 +344,16 @@ project.afterEvaluate {
|
|||
repositories {
|
||||
ivy {
|
||||
url = System.getenv("OSMAND_BINARIES_IVY_ROOT") ?: "./"
|
||||
version = "0.1-SNAPSHOT"
|
||||
}
|
||||
}
|
||||
publications {
|
||||
aar(IvyPublication) {
|
||||
artifact bundleLegacyX86DebugAar {
|
||||
classifier 'legacyX86Debug'
|
||||
}
|
||||
artifact bundleLegacyX86ReleaseAar {
|
||||
classifier 'legacyX86Release'
|
||||
}
|
||||
artifact bundleLegacyArm64DebugAar {
|
||||
classifier 'legacyArm64Debug'
|
||||
}
|
||||
artifact bundleLegacyArm64ReleaseAar {
|
||||
classifier 'legacyArm64Release'
|
||||
}
|
||||
artifact bundleLegacyArmonlyDebugAar {
|
||||
classifier 'legacyArmonlyDebug'
|
||||
}
|
||||
artifact bundleLegacyArmonlyReleaseAar {
|
||||
classifier 'legacyArmonlyRelease'
|
||||
}
|
||||
artifact bundleLegacyArmv7DebugAar {
|
||||
classifier 'legacyArmv7Debug'
|
||||
}
|
||||
artifact bundleLegacyArmv7ReleaseAar {
|
||||
classifier 'legacyArmv7Release'
|
||||
}
|
||||
artifact bundleLegacyFatDebugAar {
|
||||
classifier 'legacyFatDebug'
|
||||
classifier 'debug'
|
||||
}
|
||||
artifact bundleLegacyFatReleaseAar {
|
||||
classifier 'legacyFatRelease'
|
||||
classifier 'release'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
13
OsmAnd/res/drawable/ic_action_folder_add.xml
Normal file
13
OsmAnd/res/drawable/ic_action_folder_add.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="M4,4C2.8954,4 2,4.8954 2,6V18C2,19.1046 2.8954,20 4,20H12V19C12,15.134 15.134,12 19,12C20.0736,12 21.0907,12.2417 22,12.6736V8C22,6.8954 21.1046,6 20,6H12L10,4H4Z"
|
||||
android:fillColor="#727272"/>
|
||||
<path
|
||||
android:pathData="M24,19C24,21.7614 21.7614,24 19,24C16.2386,24 14,21.7614 14,19C14,16.2386 16.2386,14 19,14C21.7614,14 24,16.2386 24,19ZM20,18V16H18V18H16V20H18V22H20V20H22V18H20Z"
|
||||
android:fillColor="#727272"
|
||||
android:fillType="evenOdd"/>
|
||||
</vector>
|
31
OsmAnd/res/drawable/ic_action_light_aircraft.xml
Normal file
31
OsmAnd/res/drawable/ic_action_light_aircraft.xml
Normal file
|
@ -0,0 +1,31 @@
|
|||
<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="M11,3.5001C10.4477,3.5001 10,3.9454 10,4.4977V13.0001C10,18.0001 12,22.0001 12,22.0001C12,22.0001 14,18.0001 14,13.0001V4.4977C14,3.9454 13.5523,3.5001 13,3.5001C12.0781,3.5 11.5,3.5 11,3.5001Z"
|
||||
android:strokeAlpha="0.7"
|
||||
android:fillColor="#727272"
|
||||
android:fillAlpha="0.7"/>
|
||||
<path
|
||||
android:pathData="M11,12H13C13,12.5523 12.5523,13 12,13C11.4477,13 11,12.5523 11,12Z"
|
||||
android:strokeAlpha="0.8"
|
||||
android:fillColor="#727272"
|
||||
android:fillAlpha="0.8"/>
|
||||
<path
|
||||
android:pathData="M9.0296,3.7425L11,3.25V3.5H13V3.2501L14.9704,3.7427C15.4934,3.8734 16,3.4778 16,2.9388C16,2.4403 15.5632,2.0547 15.0686,2.1165L12.8001,2.4C12.6177,2.1571 12.3272,2 12,2C11.6729,2 11.3824,2.1571 11.2,2.4L8.9314,2.1164C8.4368,2.0546 8,2.4402 8,2.9386C8,3.4777 8.5066,3.8733 9.0296,3.7425Z"
|
||||
android:fillColor="#727272"/>
|
||||
<path
|
||||
android:pathData="M2,7C2,6.4477 2.4477,6 3,6H21C21.5523,6 22,6.4477 22,7V9C22,10.6569 20.6569,12 19,12H5C3.3431,12 2,10.6569 2,9V7Z"
|
||||
android:fillColor="#727272"/>
|
||||
<path
|
||||
android:pathData="M9,20H11.2019C11.6263,21.2526 12,22 12,22H9C8.4477,22 8,21.5523 8,21C8,20.4477 8.4477,20 9,20Z"
|
||||
android:fillColor="#727272"/>
|
||||
<path
|
||||
android:pathData="M12,22C12,22 12.3737,21.2526 12.7981,20H15C15.5523,20 16,20.4477 16,21C16,21.5523 15.5523,22 15,22H12Z"
|
||||
android:fillColor="#727272"/>
|
||||
<path
|
||||
android:pathData="M12,18C11.7239,18 11.5,18.2233 11.5,18.4994V19C11.5,19.5 12,20.5 12,20.5C12,20.5 12.5,19.5 12.5,19V18.4994C12.5,18.2233 12.2761,18 12,18Z"
|
||||
android:fillColor="#727272"/>
|
||||
</vector>
|
|
@ -8,7 +8,8 @@
|
|||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/scroll_view"
|
||||
|
|
|
@ -93,6 +93,7 @@
|
|||
android:paddingRight="@dimen/content_padding_small"
|
||||
android:scrollHorizontally="false"
|
||||
android:textSize="@dimen/default_list_text_size"
|
||||
android:imeOptions="actionDone"
|
||||
tools:text="@string/lorem_ipsum" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
@ -143,6 +144,7 @@
|
|||
android:paddingEnd="@dimen/content_padding_small"
|
||||
android:paddingRight="@dimen/content_padding_small"
|
||||
android:textSize="@dimen/default_list_text_size"
|
||||
android:imeOptions="actionDone"
|
||||
tools:text="@string/lorem_ipsum" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
@ -253,6 +255,7 @@
|
|||
android:text="@string/add_description"
|
||||
android:textSize="@dimen/default_desc_text_size"
|
||||
osmand:typeface="@string/font_roboto_medium"
|
||||
android:imeOptions="actionDone"
|
||||
tools:text="@string/add_description" />
|
||||
|
||||
<View
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
|
|
|
@ -6,56 +6,50 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="@dimen/bottom_sheet_title_height"
|
||||
android:paddingStart="@dimen/content_padding"
|
||||
android:paddingLeft="@dimen/content_padding"
|
||||
android:paddingTop="@dimen/content_padding"
|
||||
android:paddingEnd="@dimen/wikilink_bottom_sheet_padding"
|
||||
android:paddingRight="@dimen/wikilink_bottom_sheet_padding"
|
||||
android:paddingBottom="@dimen/wikilink_bottom_sheet_padding">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="@dimen/content_padding"
|
||||
android:layout_marginRight="@dimen/content_padding"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
android:ellipsize="end"
|
||||
android:letterSpacing="@dimen/text_button_letter_spacing"
|
||||
android:minHeight="@dimen/default_title_line_height"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="@dimen/default_list_text_size"
|
||||
app:lineHeight="@dimen/default_title_line_height"
|
||||
app:typeface="@string/font_roboto_medium"
|
||||
tools:text="Some title" />
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:letterSpacing="@dimen/text_button_letter_spacing"
|
||||
android:minHeight="@dimen/default_title_line_height"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="@dimen/default_list_text_size"
|
||||
app:lineHeight="@dimen/default_title_line_height"
|
||||
app:typeface="@string/font_roboto_medium"
|
||||
tools:text="Some title" />
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:id="@+id/description"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:letterSpacing="@dimen/description_letter_spacing"
|
||||
android:minHeight="@dimen/default_desc_line_height"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:textSize="@dimen/default_desc_text_size"
|
||||
app:lineHeight="@dimen/default_desc_line_height"
|
||||
app:typeface="@string/font_roboto_regular"
|
||||
tools:text="Some description" />
|
||||
|
||||
</LinearLayout>
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:id="@+id/description"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/title"
|
||||
android:ellipsize="end"
|
||||
android:letterSpacing="@dimen/description_letter_spacing"
|
||||
android:minHeight="@dimen/default_desc_line_height"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:textSize="@dimen/default_desc_text_size"
|
||||
app:lineHeight="@dimen/default_desc_line_height"
|
||||
app:typeface="@string/font_roboto_regular"
|
||||
tools:text="Some description" />
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:id="@+id/selected_size"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:letterSpacing="@dimen/text_button_letter_spacing"
|
||||
android:minHeight="@dimen/default_title_line_height"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
|
@ -64,7 +58,7 @@
|
|||
app:typeface="@string/font_roboto_regular"
|
||||
tools:text="5/6" />
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/select_all_button"
|
||||
|
|
|
@ -3987,4 +3987,7 @@
|
|||
<string name="cannot_upload_image">لا يمكن تحميل الصورة، من فضلك، حاول مرة أخرى في وقت لاحق</string>
|
||||
<string name="select_picture">تحديد صورة</string>
|
||||
<string name="ltr_or_rtl_combine_via_star">%1$s * %2$s</string>
|
||||
<string name="lang_de_casual">الألمانية (تقليدية)</string>
|
||||
<string name="elevation_data">يمكنك استخدام بيانات الارتفاع للنظر في الصعود / الهبوط لرحلتك</string>
|
||||
<string name="app_mode_light_aircraft">طائرة</string>
|
||||
</resources>
|
|
@ -3883,4 +3883,6 @@
|
|||
<string name="poi_parking_layby">Langs gaden</string>
|
||||
<string name="poi_parking_sheds">Overdækket parkering</string>
|
||||
<string name="poi_fuel_lng">LNG</string>
|
||||
<string name="poi_siren">Sirene</string>
|
||||
<string name="poi_nurse">Sygeplejerske</string>
|
||||
</resources>
|
|
@ -3861,4 +3861,6 @@
|
|||
<string name="select_items_for_import">Vælg emner, der skal importeres.</string>
|
||||
<string name="use_dev_url_descr">Skift til dev.openstreetmap.org i stedet for openstreetmap.org for at teste overførelse af OSM-note / IP / GPX.</string>
|
||||
<string name="use_dev_url">Brug dev.openstreetmap.org</string>
|
||||
<string name="cannot_upload_image">Kan ikke overføre billedet, prøv igen senere</string>
|
||||
<string name="select_picture">Vælg billede</string>
|
||||
</resources>
|
|
@ -3883,4 +3883,7 @@
|
|||
<string name="poi_liaison_filter">Verbindungsbüro</string>
|
||||
<string name="poi_consulate_filter">Konsulat</string>
|
||||
<string name="poi_embassy_filter">Botschaft</string>
|
||||
<string name="poi_siren">Sirene</string>
|
||||
<string name="poi_nurse">Krankenpfleger/in</string>
|
||||
<string name="poi_mobile_money_agent">Mobiler Geldvermittler</string>
|
||||
</resources>
|
|
@ -4004,4 +4004,6 @@
|
|||
<string name="cannot_upload_image">Bild kann nicht hochgeladen werden, bitte versuchen Sie es später erneut</string>
|
||||
<string name="select_picture">Bild auswählen</string>
|
||||
<string name="ltr_or_rtl_combine_via_star">%1$s * %2$s</string>
|
||||
<string name="elevation_data">Sie können Höhendaten für die Berücksichtigung von Aufstieg / Abstieg auf Ihrer Strecke verwenden</string>
|
||||
<string name="app_mode_light_aircraft">Kleinflugzeug</string>
|
||||
</resources>
|
|
@ -3999,4 +3999,5 @@
|
|||
<string name="cannot_upload_image">Ne povas alŝuti la bildon, reprovu poste</string>
|
||||
<string name="select_picture">Elektu bildon</string>
|
||||
<string name="ltr_or_rtl_combine_via_star">%1$s * %2$s</string>
|
||||
<string name="lang_de_casual">Germana (ordinara)</string>
|
||||
</resources>
|
|
@ -3887,4 +3887,7 @@
|
|||
<string name="poi_liaison_filter">Enlace</string>
|
||||
<string name="poi_consulate_filter">Consulado</string>
|
||||
<string name="poi_embassy_filter">Embajada</string>
|
||||
<string name="poi_siren">Sirena</string>
|
||||
<string name="poi_nurse">Enfermera</string>
|
||||
<string name="poi_mobile_money_agent">Agente de dinero móvil</string>
|
||||
</resources>
|
|
@ -4004,4 +4004,8 @@
|
|||
<string name="use_dev_url">Usar dev.openstreetmap.org</string>
|
||||
<string name="cannot_upload_image">No se puede subir la imagen, inténtalo más tarde</string>
|
||||
<string name="select_picture">Elegir imagen</string>
|
||||
<string name="lang_de_casual">Alemán (casual)</string>
|
||||
<string name="ltr_or_rtl_combine_via_star">%1$s * %2$s</string>
|
||||
<string name="elevation_data">Puedes usar los datos de elevación para considerar el ascenso o descenso de su viaje</string>
|
||||
<string name="app_mode_light_aircraft">Avión ligero</string>
|
||||
</resources>
|
|
@ -3976,4 +3976,6 @@
|
|||
<string name="cannot_upload_image">Impossible d\'envoyer l\'image, veuillez réessayer plus tard</string>
|
||||
<string name="select_picture">Sélectionnez une image</string>
|
||||
<string name="ltr_or_rtl_combine_via_star">%1$s * %2$s</string>
|
||||
<string name="lang_de_casual">Allemand (courant)</string>
|
||||
<string name="app_mode_light_aircraft">Aviation légère</string>
|
||||
</resources>
|
|
@ -187,7 +187,7 @@
|
|||
<string name="lang_zh_cn">Chinés sinxelo</string>
|
||||
<string name="lang_sk">Eslovaco</string>
|
||||
<string name="lang_sl">Esloveno</string>
|
||||
<string name="lang_es">Español ou castelán</string>
|
||||
<string name="lang_es">Español</string>
|
||||
<string name="lang_sv">Sueco</string>
|
||||
<string name="lang_zh_tw">Chinés tradicional</string>
|
||||
<string name="lang_tr">Turco</string>
|
||||
|
@ -1420,7 +1420,7 @@
|
|||
<string name="lang_bn">Bengalí</string>
|
||||
<string name="lang_tl">Tagalo</string>
|
||||
<string name="lang_sh">Serbo-croata</string>
|
||||
<string name="lang_az">Azarí ou acerbaixano</string>
|
||||
<string name="lang_az">Azarí</string>
|
||||
<string name="lang_br">Bretón</string>
|
||||
<string name="lang_sq">Albanés</string>
|
||||
<string name="lang_is">Islandés</string>
|
||||
|
@ -4024,4 +4024,7 @@ Lon %2$s</string>
|
|||
\nMapillary - maxes a nivel de rúa;
|
||||
\nWeb / Wikimedia - imaxes POI especificadas nos datos do OpenStreetMap.</string>
|
||||
<string name="ltr_or_rtl_combine_via_star">%1$s * %2$s</string>
|
||||
<string name="lang_de_casual">Alemán casual</string>
|
||||
<string name="elevation_data">Podes empregar os datos de elevación para considerar o ascenso ou descenso da túa viaxe</string>
|
||||
<string name="app_mode_light_aircraft">Avión lixeiro</string>
|
||||
</resources>
|
|
@ -3872,4 +3872,7 @@
|
|||
<string name="poi_liaison_filter">Összekötő iroda</string>
|
||||
<string name="poi_embassy_filter">Külképviselet</string>
|
||||
<string name="poi_consulate_filter">Konzulátus</string>
|
||||
<string name="poi_nurse">Ápoló</string>
|
||||
<string name="poi_siren">Sziréna</string>
|
||||
<string name="poi_mobile_money_agent">Mobilpénzfizetési iroda</string>
|
||||
</resources>
|
|
@ -3990,4 +3990,8 @@
|
|||
<string name="use_dev_url">A dev.openstreetmap.org használata</string>
|
||||
<string name="cannot_upload_image">Nem lehet feltölteni a képet, kérjük, próbálja meg később</string>
|
||||
<string name="select_picture">Kép kijelölése</string>
|
||||
<string name="lang_de_casual">német (tegeződő)</string>
|
||||
<string name="ltr_or_rtl_combine_via_star">%1$s * %2$s</string>
|
||||
<string name="elevation_data">A magassági adatokat az utazás során előforduló emelkedés/lejtés megfontolásához használhatja</string>
|
||||
<string name="app_mode_light_aircraft">Könnyű légi jármű</string>
|
||||
</resources>
|
|
@ -3835,4 +3835,37 @@
|
|||
<string name="poi_parking_rooftop">Á þaki</string>
|
||||
<string name="poi_gpx_point">GPX-punktur</string>
|
||||
<string name="poi_radar_tower">Radarturn</string>
|
||||
<string name="poi_mobile_money_agent">Farsímagreiðsluþjónusta</string>
|
||||
<string name="poi_diplomatic_embassy">Sendiráð</string>
|
||||
<string name="poi_diplomatic_services_citizen_services_no">Nei</string>
|
||||
<string name="poi_nurse">Hjúkrunarfræðingur</string>
|
||||
<string name="poi_diplomatic_services_immigrant_visas_filter">Vegabréfsáritun fyrir innflytjendur</string>
|
||||
<string name="poi_embassy_residence">Aðsetur</string>
|
||||
<string name="poi_liaison_subnational">Undirþjóðlegt</string>
|
||||
<string name="poi_siren">Sírena</string>
|
||||
<string name="poi_embassy_mission">Sendinefnd</string>
|
||||
<string name="poi_diplomatic_liaison">Tengifulltrúi</string>
|
||||
<string name="poi_liaison_filter">Tenging</string>
|
||||
<string name="poi_diplomatic_services_citizen_services_yes">Já</string>
|
||||
<string name="poi_liaison_liaison_office">Skrifstofa</string>
|
||||
<string name="poi_consulate_filter">Ræðismaður</string>
|
||||
<string name="poi_consulate_consulate_general">Ræðismannsskrifstofa</string>
|
||||
<string name="poi_embassy_nunciature">Sendinefnd Vatíkansins (nunciature)</string>
|
||||
<string name="poi_consulate_honorary_consul">Heiðursræðismaður</string>
|
||||
<string name="poi_diplomatic_services_citizen_services_filter">Borgaraþjónustur</string>
|
||||
<string name="poi_diplomatic_services_non_immigrant_visas_filter">Vegabréfsáritun fyrir ekki-innflytjendur</string>
|
||||
<string name="poi_diplomatic_services_non_immigrant_visas_no">Nei</string>
|
||||
<string name="poi_liaison_representative_office">Umboðsskrifstofa</string>
|
||||
<string name="poi_embassy_yes">Sendiherra í forsvari</string>
|
||||
<string name="poi_diplomatic_services_non_immigrant_visas_yes">Já</string>
|
||||
<string name="poi_embassy_interests_section">Hagsmunadeild</string>
|
||||
<string name="poi_diplomatic_services_immigrant_visas_yes">Já</string>
|
||||
<string name="poi_embassy_high_commission">Sendifulltrúi</string>
|
||||
<string name="poi_embassy_filter">Sendiráð</string>
|
||||
<string name="poi_embassy_delegation">Sendinefnd</string>
|
||||
<string name="poi_diplomatic_services_immigrant_visas_no">Nei</string>
|
||||
<string name="poi_consulate_yes">Ræðismaður í forsvari</string>
|
||||
<string name="poi_consulate_consular_agency">Ræðismannastofnun</string>
|
||||
<string name="poi_embassy_branch_embassy">Útibú</string>
|
||||
<string name="poi_consulate_consular_office">Ræðisskrifstofa</string>
|
||||
</resources>
|
|
@ -52,7 +52,7 @@
|
|||
<string name="shared_string_move_down">Færa ↓</string>
|
||||
<string name="storage_directory_shared">Samnýtt minni</string>
|
||||
<string name="recalculate_route">Endurreikna leið</string>
|
||||
<string name="donations">Gjafir</string>
|
||||
<string name="donations">Styrkir</string>
|
||||
<string name="osm_live_subscribe_btn">Gerast áskrifandi</string>
|
||||
<string name="osm_live_active">Virkt</string>
|
||||
<string name="osm_live_not_active">Óvirkt</string>
|
||||
|
@ -131,7 +131,7 @@
|
|||
<string name="rendering_value_green_name">Grænt</string>
|
||||
<string name="rendering_value_lightblue_name">Ljósblátt</string>
|
||||
<string name="rendering_value_blue_name">Blátt</string>
|
||||
<string name="rendering_value_purple_name">Fjólublátt</string>
|
||||
<string name="rendering_value_purple_name">Purpurablátt</string>
|
||||
<string name="rendering_value_pink_name">Bleikt</string>
|
||||
<string name="rendering_value_brown_name">Brúnt</string>
|
||||
<string name="light_theme">Ljóst</string>
|
||||
|
@ -229,7 +229,7 @@
|
|||
<string name="shared_string_do_not_show_again">Ekki sýna aftur</string>
|
||||
<string name="shared_string_remember_my_choice">Muna valið</string>
|
||||
<string name="shared_string_refresh">Endurnýja</string>
|
||||
<string name="shared_string_download">Hlaða niður</string>
|
||||
<string name="shared_string_download">Sækja</string>
|
||||
<string name="shared_string_downloading">Sæki…</string>
|
||||
<string name="shared_string_action_template">Aðgerð {0}</string>
|
||||
<string name="shared_string_close">Loka</string>
|
||||
|
@ -238,7 +238,7 @@
|
|||
<string name="shared_string_show_all">Sýna allt</string>
|
||||
<string name="shared_string_collapse">Fella saman</string>
|
||||
<string name="shared_string_show_on_map">Birta á korti</string>
|
||||
<string name="shared_string_map">Landakort</string>
|
||||
<string name="shared_string_map">Kort</string>
|
||||
<string name="shared_string_favorite">Eftirlæti</string>
|
||||
<string name="shared_string_favorites">Eftirlæti</string>
|
||||
<string name="shared_string_address">Heimilisfang</string>
|
||||
|
@ -293,8 +293,8 @@
|
|||
<string name="shared_string_all">Allt</string>
|
||||
<string name="shared_string_waypoints">Ferilpunktar</string>
|
||||
<string name="rendering_value_browse_map_name">Fletta korti</string>
|
||||
<string name="rendering_value_car_name">Bíll</string>
|
||||
<string name="rendering_value_bicycle_name">Reiðhjól</string>
|
||||
<string name="rendering_value_car_name">Akandi</string>
|
||||
<string name="rendering_value_bicycle_name">Hjólandi</string>
|
||||
<string name="rendering_value_pedestrian_name">Fótgangandi</string>
|
||||
<string name="keep_navigation_service">Halda</string>
|
||||
<string name="lang_sw">Svahílí</string>
|
||||
|
@ -519,7 +519,7 @@
|
|||
<string name="arrival_distance_factor_at_last">Á síðustu metrunum</string>
|
||||
<string name="local_openstreetmap_uploading">Sendi inn…</string>
|
||||
<string name="index_name_north_america">Norður-Ameríka</string>
|
||||
<string name="index_name_central_america">Mið-Ameríka</string>
|
||||
<string name="index_name_central_america">MIð-Ameríka</string>
|
||||
<string name="index_name_south_america">Suður-Ameríka</string>
|
||||
<string name="index_name_europe">Evrópa</string>
|
||||
<string name="index_name_russia">Rússland</string>
|
||||
|
@ -553,7 +553,7 @@
|
|||
<string name="shared_string_release">Útgefið</string>
|
||||
<string name="local_index_mi_restore">Virkja</string>
|
||||
<string name="local_index_mi_backup">Gera óvirkt</string>
|
||||
<string name="local_indexes_cat_backup">Aftengt</string>
|
||||
<string name="local_indexes_cat_backup">Afvirkjað</string>
|
||||
<string name="search_offline_clear_search">Ný leit</string>
|
||||
<string name="tts_language_not_supported_title">Tungumálið er ekki stutt</string>
|
||||
<string name="system_locale">Kerfi</string>
|
||||
|
@ -649,7 +649,7 @@
|
|||
<string name="poi_action_add">bæta við</string>
|
||||
<string name="poi_action_change">breyta</string>
|
||||
<string name="poi_action_delete">eyða</string>
|
||||
<string name="poi_dialog_opening_hours">Opna</string>
|
||||
<string name="poi_dialog_opening_hours">Opið</string>
|
||||
<string name="poi_dialog_comment">Athugasemd</string>
|
||||
<string name="poi_dialog_reopen">Enduropna</string>
|
||||
<string name="default_buttons_commit">Senda</string>
|
||||
|
@ -858,7 +858,7 @@
|
|||
<string name="base_world_map">Grunnkort af heiminum</string>
|
||||
<string name="local_index_tile_data_expire">Rennur út (mínútur): %1$s</string>
|
||||
<string name="edit_tilesource_expiration_time">Rennur út (mínútur)</string>
|
||||
<string name="edit_tilesource_url_to_load">Slóð (URL)</string>
|
||||
<string name="edit_tilesource_url_to_load">Slóð</string>
|
||||
<string name="distance_measurement_finish_subtrack">Byrja nýjan undirferil</string>
|
||||
<string name="shared_location">Deild staðsetning</string>
|
||||
<string name="rendering_attr_noPolygons_name">Flákar</string>
|
||||
|
@ -968,7 +968,7 @@
|
|||
<string name="only_show">Birta leið</string>
|
||||
<string name="follow">Hefja leiðsögn</string>
|
||||
<string name="mark_final_location_first">Stilltu fyrst áfangastað</string>
|
||||
<string name="get_directions">Leiðir</string>
|
||||
<string name="get_directions">Leiðarlýsingar</string>
|
||||
<string name="opening_hours">Opnunartímar</string>
|
||||
<string name="loading_streets_buildings">Hleð inn götum/byggingum…</string>
|
||||
<string name="loading_postcodes">Hleð inn póstnúmerum…</string>
|
||||
|
@ -1023,7 +1023,7 @@
|
|||
<string name="enter_country_name">Settu heiti lands</string>
|
||||
<string name="map_viewing_item">Skoðun korts</string>
|
||||
<string name="techical_articles_item">Tæknilegar greinar</string>
|
||||
<string name="map_legend">Kortaskýring</string>
|
||||
<string name="map_legend">Skýringar á korti</string>
|
||||
<string name="dashboard_or_drawer_title">Stjórnborð eða valmyndastýring</string>
|
||||
<string name="only_download_over_wifi">Einungis hlaða niður yfir WiFi-net</string>
|
||||
<string name="missing_write_external_storage_permission">OsmAnd hefur ekki heimildir til að nota SD-kortið</string>
|
||||
|
@ -1165,7 +1165,7 @@
|
|||
<string name="open_street_map_login_and_pass">Notandanafn og lykilorð á OSM</string>
|
||||
<string name="map_markers">Kortamerki</string>
|
||||
<string name="map_marker">Kortamerki</string>
|
||||
<string name="map_downloaded">Náð í kort</string>
|
||||
<string name="map_downloaded">Búið að ná í kort</string>
|
||||
<string name="share_geo">geo:</string>
|
||||
<string name="record_plugin_name">Skráning ferðar</string>
|
||||
<string name="srtm_plugin_name">Hæðarlínur</string>
|
||||
|
@ -1622,7 +1622,7 @@
|
|||
<string name="rotate_map_to_bearing_descr">Stefna korts miðað við skjá:</string>
|
||||
<string name="fav_imported_sucessfully">Innflutningur eftirlæta tókst</string>
|
||||
<string name="import_file_favourites">Vista gögn sem GPX-skrá eða flytja ferilpunkta inn í eftirlæti?</string>
|
||||
<string name="transport_stops">biðstöðvar</string>
|
||||
<string name="transport_stops">stoppmerki</string>
|
||||
<string name="transport_search_after">Næsta ferðaáætlun</string>
|
||||
<string name="transport_search_before">Fyrri ferðaáætlun</string>
|
||||
<string name="transport_stop_to_go_out">Veldu biðstöð þar sem farið er út</string>
|
||||
|
@ -1856,13 +1856,13 @@
|
|||
<string name="routing_attr_driving_style_balance_name">Jafnvægi</string>
|
||||
<string name="routing_attr_driving_style_safety_name">Velja frekar hjáleiðir</string>
|
||||
<string name="relief_smoothness_factor_descr">Kjörið landslag: slétt eða hæðótt.</string>
|
||||
<string name="shared_string_slope">Brekka</string>
|
||||
<string name="shared_string_slope">Halli</string>
|
||||
<string name="add_new_folder">Bæta við nýrri möppu</string>
|
||||
<string name="points_delete_multiple_succesful">Punkti/punktum eytt.</string>
|
||||
<string name="points_delete_multiple">Ertu viss um að þú viljir eyða %1$d punkt(i/um) \?</string>
|
||||
<string name="track_points_category_name">Vegpunktar, merkisstaðir, nefnd fyrirbæri</string>
|
||||
<string name="shared_string_gpx_track">Ferill</string>
|
||||
<string name="max_speed">Mesti hraði</string>
|
||||
<string name="max_speed">Hámarkshraði</string>
|
||||
<string name="average_speed">Meðalhraði</string>
|
||||
<string name="shared_string_time_moving">Tími á ferð</string>
|
||||
<string name="shared_string_time_span">Tímarammi</string>
|
||||
|
@ -2055,7 +2055,7 @@
|
|||
<string name="safe_mode_description">Keyra forritið í öryggisham (notar hægvirkari Android-kóða í stað þess innbyggða).</string>
|
||||
<string name="shared_string_add_photos">Bæta við ljósmyndum</string>
|
||||
<string name="restart_search">Byrja leit aftur</string>
|
||||
<string name="increase_search_radius">Auka radíus leitar</string>
|
||||
<string name="increase_search_radius">Stækka radíus leitar</string>
|
||||
<string name="nothing_found">Ekkert fannst</string>
|
||||
<string name="quick_action_showhide_osmbugs_title">Birta/fela OSM-minnispunkta</string>
|
||||
<string name="quick_action_osmbugs_show">Birta OSM-minnispunkta</string>
|
||||
|
@ -2116,7 +2116,7 @@
|
|||
<string name="import_gpx_failed_descr">Gat ekki flutt skrána inn. Vinsamlegast athugið hvort OsmAnd hafi réttindi til að lesa skrána þar sem hún er.</string>
|
||||
<string name="open_mapillary">Opna Mapillary</string>
|
||||
<string name="mapillary_widget">Mapillary græja</string>
|
||||
<string name="mapillary">Mapillary götumyndir</string>
|
||||
<string name="mapillary">Mapillary</string>
|
||||
<string name="mapillary_image">Mapillary-mynd</string>
|
||||
<string name="map_widget_ruler_control">Mælistika út frá miðju hrings</string>
|
||||
<string name="shared_string_permissions">Heimildir</string>
|
||||
|
@ -2125,7 +2125,7 @@
|
|||
<string name="hide_from_zoom_level">Fela frá og með aðdráttarstigi</string>
|
||||
<string name="shared_string_reload">Endurnýja</string>
|
||||
<string name="mapillary_menu_descr_tile_cache">Endurlesa kortaflísar til að sjá uppfærð gögn.</string>
|
||||
<string name="mapillary_menu_title_tile_cache">Tiglaskyndiminni</string>
|
||||
<string name="mapillary_menu_title_tile_cache">Kortaflísaskyndiminni</string>
|
||||
<string name="wrong_user_name">Rangt notandanafn</string>
|
||||
<string name="shared_string_to">Til</string>
|
||||
<string name="mapillary_menu_date_from">Frá</string>
|
||||
|
@ -2180,7 +2180,7 @@
|
|||
<string name="by_type">Eftir gerð</string>
|
||||
<string name="looking_for_tracks_with_waypoints">Leita að ferlum með ferilpunktum</string>
|
||||
<string name="shared_string_more_without_dots">Meira</string>
|
||||
<string name="appearance_on_the_map">Framsetning á korti</string>
|
||||
<string name="appearance_on_the_map">Framsetning á kortinu</string>
|
||||
<string name="shared_string_gpx_waypoints">Ferilpunktar í ferli</string>
|
||||
<string name="favourites_group">Flokkur eftirlæta</string>
|
||||
<string name="add_group">Bæta við hópi</string>
|
||||
|
@ -2685,7 +2685,7 @@
|
|||
<string name="rendering_attr_whiteWaterSports_name">Fljótasiglingar</string>
|
||||
<string name="clear_all_intermediates">Hreinsa út alla milliáfanga</string>
|
||||
<string name="select_waypoints_category_description">Þú getur bætt við öllum punktum ferilsins, eða valið aðskilda flokka.</string>
|
||||
<string name="shared_string_total">Alls</string>
|
||||
<string name="shared_string_total">Samtals</string>
|
||||
<string name="nothing_found_in_radius">Ekkert fannst:</string>
|
||||
<string name="waypoints_removed_from_map_markers">Punktar fjarlægðir úr kortamerkjum</string>
|
||||
<string name="shared_string_travel_guides">Ferðalög</string>
|
||||
|
@ -2784,7 +2784,7 @@
|
|||
<string name="coord_input_add_point">Bæta við punkti</string>
|
||||
<string name="coord_input_save_as_track">Vista sem feril</string>
|
||||
<string name="coord_input_save_as_track_descr">Þú bættir við %1$s punktum. Settu inn heitið á skránni og vistaðu.</string>
|
||||
<string name="shared_string_world">Veröld</string>
|
||||
<string name="shared_string_world">Heimurinn</string>
|
||||
<string name="point_deleted">Punkti %1$s eytt</string>
|
||||
<string name="release_3_1">"• Leiðsögn: Framvindustika lagfærð, hraðari víxl á upphafi og enda leiða
|
||||
\n
|
||||
|
@ -3438,7 +3438,7 @@
|
|||
<string name="multimedia_notes_view_descr">OSM-minnispunktarnir þínir eru í %1$s.</string>
|
||||
<string name="video_notes">Minnispunktar myndskeiða</string>
|
||||
<string name="photo_notes">Minnispunktar ljósmynda</string>
|
||||
<string name="accessibility_announce">Auglýsing</string>
|
||||
<string name="accessibility_announce">Tilkynna</string>
|
||||
<string name="login_and_pass">Notandanafn og lykilorð</string>
|
||||
<string name="select_map_icon_descr">Táknmynd birtist við hvíld.</string>
|
||||
<string name="logcat_buffer_descr">Athugaðu og deildu nákvæmum atvikaskrám úr forritinu</string>
|
||||
|
@ -3452,7 +3452,7 @@
|
|||
<string name="monitoring_notification">Tilkynning</string>
|
||||
<string name="monitoring_min_speed">Lágmarkshraði</string>
|
||||
<string name="monitoring_min_accuracy">Lágmarksnákvæmni</string>
|
||||
<string name="monitoring_min_distance">Minnsta hreyfing</string>
|
||||
<string name="monitoring_min_distance">Lágmarkshreyfing</string>
|
||||
<string name="reset_plugin_to_default">Frumstilla stillingar viðbótar á sjálfgefin gildi</string>
|
||||
<string name="multimedia_rec_split_title">Uppskipting upptöku</string>
|
||||
<string name="multimedia_use_system_camera">Nota kerfisforrit</string>
|
||||
|
@ -3877,7 +3877,7 @@
|
|||
<string name="shared_string_gpx_route">Skrá leið í feril</string>
|
||||
<string name="select_another_track">Velja annan feril</string>
|
||||
<string name="save_track_to_gpx">Skrifa feril sjálfkrafa í GPX-skrá á meðan leiðsögn stendur</string>
|
||||
<string name="what_is_new">Nýjungar</string>
|
||||
<string name="what_is_new">Hvað er nýtt</string>
|
||||
<string name="simplified_track">Einfaldaður ferill</string>
|
||||
<string name="simplified_track_description">Aðeins leiðarlínan verður vistuð, ferilpunktunum verður eytt.</string>
|
||||
<string name="shared_string_file_name">Skráarheiti</string>
|
||||
|
@ -3905,10 +3905,10 @@
|
|||
<string name="complex_routing_descr">Tveggja-þátta leiðagerð fyrir bílaleiðsögn.</string>
|
||||
<string name="use_native_pt">Innbyggð þróun almenningssamgangna</string>
|
||||
<string name="use_native_pt_desc">Skipta yfir í Java (öruggt) útreikning fyrir almenningssamgöngur</string>
|
||||
<string name="perform_oauth_authorization_description">Framkvæma OAuth-innskráningu til að nota osmedit-eiginleika</string>
|
||||
<string name="perform_oauth_authorization_description">Skrá inn með OAuth til að nota osmedit-eiginleika</string>
|
||||
<string name="perform_oauth_authorization">Skrá inn í gegnum OAuth</string>
|
||||
<string name="clear_osm_token">Hreinsa OAuth-teikn OpenStreetMap</string>
|
||||
<string name="osm_edit_logout_success">Útskráning tókst</string>
|
||||
<string name="osm_edit_logout_success">Skráð út</string>
|
||||
<string name="number_of_gpx_files_selected_pattern">%s GPX-skrár valdar</string>
|
||||
<string name="disable_recording_once_app_killed_descrp">Mun setja GPX-skráningu í bið þegar forritið er drepið (slökkt á því í gegnum skjáinn fyrir nýleg forrit - bakgrunnsvísir OsmAnd hverfur þar með úr tilkynningastiku Android-kerfisins.)</string>
|
||||
<string name="save_global_track_interval_descr">Veldu millibil skráninga í almenna leiðarskráningu (virkjað með viðmótshlutanum \'Skráning ferðar\' á kortinu).</string>
|
||||
|
@ -3960,7 +3960,7 @@
|
|||
<string name="subscription_payment_issue_title">Það er vandamál með áskriftina þína. Smelltu á hnappinn til að fara í stillingar Google Play áskriftarinnar og laga þar greiðslumátann.</string>
|
||||
<string name="use_login_password">Nota notandanafn og lykilorð</string>
|
||||
<string name="login_open_street_map">Skrá inn á OpenStreetMap</string>
|
||||
<string name="user_login">Innskrá</string>
|
||||
<string name="user_login">Skrá inn</string>
|
||||
<string name="enter_text_separated">Settu inn merki aðskilin með kommu.</string>
|
||||
<string name="send_files_to_openstreetmap">Senda GPX-skrá til OpenStreetMap</string>
|
||||
<string name="subscription_expired_title">Áskrift að OsmAnd Live er útrunnin</string>
|
||||
|
@ -3991,4 +3991,26 @@
|
|||
<string name="register_on_openplacereviews_desc">Ljósmyndir eru í boði frá opna gagnaverkefninu OpenPlaceReviews.org. Til að geta sent inn myndir þarftu að skrá þig á vefsvæðinu.</string>
|
||||
<string name="osm_edit_comment_note">Gera athugasemd við OSM-minnispunkt</string>
|
||||
<string name="gpx_upload_trackable_visibility_descr">\"Rekjanlegt\" þýðir að ferillinn birtist ekki á neinum opinberum listum, en meðhöndlaðir ferilpunktar með tímamerkjum úr ferlinum (sem ekki er hægt að tengja beint við þig) munu birtast í gögnum sem eru sótt í gegnum opinbert GPS API-forritsviðmót.</string>
|
||||
<string name="elevation_data">Þú getur notað hæðargögn til útreikninga á hækkun/lækkun í ferðunum þínum</string>
|
||||
<string name="add_photos_descr">OsmAnd birtir ljósmyndir frá ýmsum þjónustum:
|
||||
\nOpenPlaceReviews - ljósmyndir POI-merkisstaða;
|
||||
\nMapillary - myndefni í götuhæð;
|
||||
\nWeb / Wikimedia - ljósmyndir POI-merkisstaða sem eru í gögnum OpenStreetMap.</string>
|
||||
<string name="use_dev_url_descr">Skiptu yfir í að nota dev.openstreetmap.org í staðinn fyrir openstreetmap.org til að prófa innsendingu OSM-minnispunkta / POI-merkisstaða / GPX-ferla.</string>
|
||||
<string name="lang_de_casual">Þýska (dagleg)</string>
|
||||
<string name="use_dev_url">Nota dev.openstreetmap.org</string>
|
||||
<string name="app_mode_light_aircraft">Létt flugfar</string>
|
||||
<string name="add_to_mapillary">Bæta í Mapillary</string>
|
||||
<string name="export_not_enough_space">Ekki er nægilegt pláss</string>
|
||||
<string name="export_not_enough_space_descr">Tækið þitt er aðeins með %1$s laust. Losaðu um eitthvað minni eða afveldu atriði sem á að flytja út.</string>
|
||||
<string name="add_to_opr">Bæta í OpenPlaceReviews</string>
|
||||
<string name="file_size_needed_for_import">Nauðsynlegt fyrir innflutning</string>
|
||||
<string name="select_items_for_import">Veldu atriði sem á að flytja inn.</string>
|
||||
<string name="select_groups_for_import">Veldu hópa sem á að flytja inn.</string>
|
||||
<string name="approximate_file_size">Áætluð skráarstærð</string>
|
||||
<string name="shared_string_resources">Tilföng</string>
|
||||
<string name="ltr_or_rtl_combine_via_star">%1$s * %2$s</string>
|
||||
<string name="select_data_to_export">Veldu þau gögn sem á að flytja út í skrána.</string>
|
||||
<string name="select_picture">Veldu mynd</string>
|
||||
<string name="cannot_upload_image">Mistókst að senda inn mynd, reyndu aftur síðar</string>
|
||||
</resources>
|
|
@ -2311,7 +2311,7 @@
|
|||
<string name="poi_surface_tartan">Tartan</string>
|
||||
<string name="poi_checkpoint_type">Tipo Checkpoint</string>
|
||||
<string name="poi_bowls">Ciotole</string>
|
||||
<string name="poi_water_place_access">Accesso all\'acqua</string>
|
||||
<string name="poi_water_place_access">Accesso al luogo dell\'acqua</string>
|
||||
<string name="poi_resort">Villaggio turistico</string>
|
||||
<string name="poi_recreation_ground">Terreno ricreativo</string>
|
||||
<string name="poi_cuisine_donut">Ciambella</string>
|
||||
|
@ -2820,4 +2820,176 @@
|
|||
<string name="poi_resource_beryl">Berillio</string>
|
||||
<string name="poi_shop_wholesale">Negozio all\'ingrosso</string>
|
||||
<string name="poi_psv_designated">Accesso PSV: riservato</string>
|
||||
<string name="poi_historic_civilization_etruscan">Civiltà: etrusca (XII - VI sec. a.C.)</string>
|
||||
<string name="poi_historic_civilization_nuragic">Civiltà: nuragica (XVIII sec. a.C. - II sec. d.C.)</string>
|
||||
<string name="poi_historic_civilization_ancient_roman">Civiltà: antica romana (753 a.C. - 284 d.C.)</string>
|
||||
<string name="poi_tomb_columbarium">Tipo: colombario</string>
|
||||
<string name="poi_tomb_vault">Tipo: caveau</string>
|
||||
<string name="poi_deaf_description">Descrizione per non udenti</string>
|
||||
<string name="poi_product_charcoal">Prodotto: carbone</string>
|
||||
<string name="poi_product_leather">Prodotto: pelle</string>
|
||||
<string name="poi_product_quicklime">Prodotto: calce viva</string>
|
||||
<string name="poi_kiln">Forno</string>
|
||||
<string name="poi_theatre_genre_chamber_music">Musica da camera</string>
|
||||
<string name="poi_theatre_genre_puppet">Burattino</string>
|
||||
<string name="poi_theatre_genre_musical">Musical</string>
|
||||
<string name="poi_social_facility_for_diseased">Malati</string>
|
||||
<string name="poi_social_facility_for_underprivileged">Svantaggiati</string>
|
||||
<string name="poi_social_facility_for_juvenile">Giovanile</string>
|
||||
<string name="poi_social_facility_day_care">Assistenza diurna</string>
|
||||
<string name="poi_social_facility_workshop">Officina</string>
|
||||
<string name="poi_social_facility_ambulatory_care">Assistenza ambulatoriale</string>
|
||||
<string name="poi_refugee_no">Rifugiati: no</string>
|
||||
<string name="poi_refugee_yes">Servizi per i rifugiati</string>
|
||||
<string name="poi_capacity_tents">Tende massime</string>
|
||||
<string name="poi_impromptu_no">Improvviso: no</string>
|
||||
<string name="poi_impromptu_yes">Improvviso: sì</string>
|
||||
<string name="poi_castle_type_castrum">Tipo di castello: castrum</string>
|
||||
<string name="poi_castle_type_defensive_stately">Tipo di castello: difensivo, maestoso</string>
|
||||
<string name="poi_castle_type_kremlin">Tipo di castello: cremlino</string>
|
||||
<string name="poi_castle_type_stately">Tipo di castello: signorile</string>
|
||||
<string name="poi_clothes_fur">Pelliccia</string>
|
||||
<string name="poi_surveillance_indoor">Sorveglianza: interna</string>
|
||||
<string name="poi_crop_poultry">Allevamento: pollame</string>
|
||||
<string name="poi_crop_hop">Coltivazione: luppolo</string>
|
||||
<string name="poi_crop_barley">Coltivazione: orzo</string>
|
||||
<string name="poi_crop_cereal">Coltivazione: cereali</string>
|
||||
<string name="poi_crop_corn">Coltivazione: mais</string>
|
||||
<string name="poi_publisher">Ufficio editoriale</string>
|
||||
<string name="poi_cooperative">Ufficio cooperativo</string>
|
||||
<string name="poi_consulting">Ufficio di consulenza</string>
|
||||
<string name="poi_guide">Ufficio della guida</string>
|
||||
<string name="poi_office_camping">Ufficio del campeggio</string>
|
||||
<string name="poi_technical_monument">Monumento tecnico</string>
|
||||
<string name="poi_industrial_port">Tipo: porto</string>
|
||||
<string name="poi_training_language">Formazione: lingua</string>
|
||||
<string name="poi_route_light_rail_ref">Binario leggero</string>
|
||||
<string name="poi_route_share_taxi_ref">Condividi il taxi</string>
|
||||
<string name="poi_bridge_movable_retractable">Tipo di ponte mobile: retrattile</string>
|
||||
<string name="poi_bridge_movable_transporter">Tipo di ponte mobile: trasportatore</string>
|
||||
<string name="poi_bridge_movable_submersible">Tipo di ponte mobile: sommergibile</string>
|
||||
<string name="poi_bridge_movable_drawbridge">Tipo di ponte mobile: ponte levatoio</string>
|
||||
<string name="poi_bridge_movable_bascule">Tipo di ponte mobile: basculante</string>
|
||||
<string name="poi_bridge_type_movable">Tipo di ponte: mobile</string>
|
||||
<string name="poi_bridge_structure_log">Struttura del ponte: trave</string>
|
||||
<string name="poi_bridge_waterway">Ponte fluviale</string>
|
||||
<string name="poi_tunnel_railway">Galleria ferroviaria</string>
|
||||
<string name="poi_tunnel_car">Galleria stradale</string>
|
||||
<string name="poi_architecture_postconstructivism">Architettura: postcostruttivismo</string>
|
||||
<string name="poi_architecture_oldrussian">Architettura: oldrussian</string>
|
||||
<string name="poi_architecture_art_nouveau">Architettura: art nouveau</string>
|
||||
<string name="poi_architecture_umgebinde">Architettura: umgebinde</string>
|
||||
<string name="poi_internet_access_type_service">Tipo di accesso a Internet: servizio</string>
|
||||
<string name="poi_internet_access_type_wired">Cablata</string>
|
||||
<string name="poi_shelter_type_abandoned">Tipo di riparo: abbandonato</string>
|
||||
<string name="poi_shelter_type_tent">Tipo di riparo: tenda</string>
|
||||
<string name="poi_shelter_type_field_shelter">Rifugio da campo</string>
|
||||
<string name="poi_shelter_type_sun_shelter">Riparo dal sole</string>
|
||||
<string name="poi_shelter_type_rock_shelter">Riparo in roccia</string>
|
||||
<string name="poi_shelter_type_basic_hut">Capanna di base</string>
|
||||
<string name="poi_shelter_type_lean_to">Capannone</string>
|
||||
<string name="poi_palm">Palma</string>
|
||||
<string name="poi_beach_shingle">Ghiaia</string>
|
||||
<string name="poi_wetland_mud">Fango</string>
|
||||
<string name="poi_wetland_tidalflat">Marea piatta</string>
|
||||
<string name="poi_wetland_saltern">Salina</string>
|
||||
<string name="poi_wetland_marsh">Palude</string>
|
||||
<string name="poi_wetland_bog">Palude</string>
|
||||
<string name="poi_resource_tuff">Tufo</string>
|
||||
<string name="poi_resource_slate">Ardesia</string>
|
||||
<string name="poi_resource_slate_iron_ore_copper">Ardesia;minerale di ferro;rame</string>
|
||||
<string name="poi_resource_sandstone">Arenaria</string>
|
||||
<string name="poi_resource_rutile">Rutilo</string>
|
||||
<string name="poi_resource_ruby">Rubino</string>
|
||||
<string name="poi_resource_iron_ore">Minerale di ferro</string>
|
||||
<string name="poi_resource_clay">Argilla</string>
|
||||
<string name="poi_resource_chromite">Cromite</string>
|
||||
<string name="poi_resource_bismuth">Bismuto</string>
|
||||
<string name="poi_resource_bauxite">Bauxite</string>
|
||||
<string name="poi_resource_barite">Barite</string>
|
||||
<string name="poi_resource_antimony">Antimonio</string>
|
||||
<string name="poi_memorial_fassade_decoration">Decorazione della facciata</string>
|
||||
<string name="poi_memorial_cross">A forma di croce</string>
|
||||
<string name="poi_memorial_blue_plaque">Targa blu</string>
|
||||
<string name="poi_memorial_bust">Busto</string>
|
||||
<string name="poi_vending_toll">Pedaggio automatico</string>
|
||||
<string name="poi_vending_parcel_mail_in">Invio di pacchi</string>
|
||||
<string name="poi_vending_parcel_pickup_mail_in">Ritiro dei pacchi e consegna della posta</string>
|
||||
<string name="poi_diet_pescetarian_yes">Pescetariano</string>
|
||||
<string name="poi_diet_halal_no">Dieta halal: no</string>
|
||||
<string name="poi_diet_halal_yes">Halal</string>
|
||||
<string name="poi_diet_halal_only">Solo halal</string>
|
||||
<string name="poi_diet_halal_filter_yes">Halal</string>
|
||||
<string name="poi_events_venue">Sede degli eventi</string>
|
||||
<string name="poi_payment_ep_cash_no">Bancomat (Geldkarte) non accettata</string>
|
||||
<string name="poi_payment_ep_cash_yes">Bancomat (Geldkarte)</string>
|
||||
<string name="poi_payment_account_cards_no">Non si accettano carte di credito</string>
|
||||
<string name="poi_aerialway_bubble_no">Nessuna bolla</string>
|
||||
<string name="poi_aerialway_bubble_yes">Bolla</string>
|
||||
<string name="poi_piste_grooming_scooter">Scooter</string>
|
||||
<string name="poi_logging">Registrazione</string>
|
||||
<string name="poi_horse_riding">Equitazione</string>
|
||||
<string name="poi_water_characteristic_mud">Fango</string>
|
||||
<string name="poi_source_biomass">Fonte di energia: biomassa</string>
|
||||
<string name="poi_deadlock">Deadlock</string>
|
||||
<string name="poi_animal_shelter_wildlife">Fauna selvatica</string>
|
||||
<string name="poi_trees_rubber">Gomma</string>
|
||||
<string name="poi_trees_meadow_orchard">Frutteto di prato</string>
|
||||
<string name="poi_leaf_type_broadleaved">Latifoglie</string>
|
||||
<string name="poi_bicycle_parking_shed">Capannone</string>
|
||||
<string name="poi_bicycle_parking_rack">Rack</string>
|
||||
<string name="poi_bicycle_parking_wall_loops">Passanti a parete</string>
|
||||
<string name="poi_bicycle_parking_stands">Stand</string>
|
||||
<string name="poi_content_fodder">Contenuto: foraggio</string>
|
||||
<string name="poi_content_crop">Contenuto: raccolto</string>
|
||||
<string name="poi_content_wastewater">Contenuto: acque reflue</string>
|
||||
<string name="poi_content_sewage">Contenuto: liquame</string>
|
||||
<string name="poi_content_manure">Contenuto: letame</string>
|
||||
<string name="poi_content_slurry">Contenuto: liquame</string>
|
||||
<string name="poi_wiki_lang_mn">Wiki mongolo</string>
|
||||
<string name="poi_wiki_lang_an">Wiki aragonese</string>
|
||||
<string name="poi_wiki_lang_my">Wiki birmano</string>
|
||||
<string name="poi_wiki_lang_lmo">Wiki lombardo</string>
|
||||
<string name="poi_wiki_lang_pnb">Wiki punjabi</string>
|
||||
<string name="poi_wiki_lang_sco">Wiki scozzese</string>
|
||||
<string name="poi_wiki_lang_jv">Wiki giavanese</string>
|
||||
<string name="poi_wiki_lang_tt">Wiki tartaro</string>
|
||||
<string name="poi_wiki_lang_mg">Wiki malgascio</string>
|
||||
<string name="poi_wiki_lang_oc">Wiki occitano</string>
|
||||
<string name="poi_wiki_lang_ur">Wiki urdu</string>
|
||||
<string name="poi_wiki_lang_ce">Wiki ceceno</string>
|
||||
<string name="poi_wiki_lang_uz">Wiki uzbeko</string>
|
||||
<string name="poi_wiki_lang_kk">Wiki kazako</string>
|
||||
<string name="poi_wiki_lang_ta">Wiki tamil</string>
|
||||
<string name="poi_wiki_lang_sh">Wiki serbo-croato</string>
|
||||
<string name="poi_wiki_lang_os">Wiki osseto</string>
|
||||
<string name="poi_wiki_lang_nv">Wiki navajo</string>
|
||||
<string name="poi_wiki_lang_nds">Wiki basso sassone</string>
|
||||
<string name="poi_wiki_lang_ku">Wiki curdo</string>
|
||||
<string name="poi_wiki_lang_fa">Wiki farsi</string>
|
||||
<string name="poi_wiki_lang_eu">Wiki basco</string>
|
||||
<string name="poi_wiki_lang_eo">Wiki esperanto</string>
|
||||
<string name="poi_wiki_lang_cy">Wiki gallese</string>
|
||||
<string name="poi_wiki_lang_bs">Wiki bosniaco</string>
|
||||
<string name="poi_wiki_lang_bpy">Wiki bishnupriya</string>
|
||||
<string name="poi_wiki_lang_az">Wiki azero</string>
|
||||
<string name="poi_wiki_lang_als">Wiki alsaziano</string>
|
||||
<string name="poi_signal_station_warning">Stazione di segnale, avvertimento</string>
|
||||
<string name="poi_signal_station_traffic">Stazione di segnale, traffico</string>
|
||||
<string name="poi_radio_station">Stazione radio, seamark</string>
|
||||
<string name="poi_pile">Mucchio</string>
|
||||
<string name="poi_seamark_dyke">Diga di Seamark</string>
|
||||
<string name="poi_buoy_installation">Boa di installazione</string>
|
||||
<string name="poi_recycling_small_electrical_appliances">Piccoli elettrodomestici</string>
|
||||
<string name="poi_diplomatic_services_citizen_services_filter">Servizi per il cittadino</string>
|
||||
<string name="poi_diplomatic_services_immigrant_visas_filter">Visti per immigrati</string>
|
||||
<string name="poi_diplomatic_services_non_immigrant_visas_filter">Visti per non immigrati</string>
|
||||
<string name="poi_liaison_filter">Collegamento</string>
|
||||
<string name="poi_consulate_filter">Consolato</string>
|
||||
<string name="poi_embassy_filter">Ambasciata</string>
|
||||
<string name="poi_departures_board">Tabellone delle partenze</string>
|
||||
<string name="poi_drinking_water_refill">Ricarica di acqua potabile</string>
|
||||
<string name="poi_traffic_signals_arrow">Freccia</string>
|
||||
<string name="poi_traffic_signals_vibration">Vibrazione</string>
|
||||
<string name="poi_fire_hydrant_pressure_filter">Pressione</string>
|
||||
</resources>
|
|
@ -3342,7 +3342,7 @@
|
|||
<string name="tts_initialization_error">Impossibile avviare il motore dal-testo-alla-voce.</string>
|
||||
<string name="simulate_your_location_gpx_descr">Simula la mia posizione utilizzando una traccia GPX registrata.</string>
|
||||
<string name="default_speed_dialog_msg">Utilizzata per stimare l\'orario d\'arrivo per le strade di tipo sconosciute e come limite di velocità per tutte le strade (può influenzare il calcolo del percorso)</string>
|
||||
<string name="export_profile">Esporta il profilo</string>
|
||||
<string name="export_profile">Esporta profilo</string>
|
||||
<string name="exported_osmand_profile">Profilo OsmAnd: %1$s</string>
|
||||
<string name="overwrite_profile_q">Il profilo \'%1$s\' c\'è già. Sovrascriverlo\?</string>
|
||||
<string name="export_profile_failed">Esportazione del profilo non riuscita.</string>
|
||||
|
@ -3389,7 +3389,7 @@
|
|||
<string name="select_color">Seleziona il colore</string>
|
||||
<string name="edit_profiles_descr">Non puoi cancellare i profili preimpostati di OsmAnd, ma puoi disabilitarli nello schermo precedente o spostarli in basso.</string>
|
||||
<string name="edit_profiles">Modifica il profilo</string>
|
||||
<string name="select_nav_profile_dialog_message">Il tipo di navigazione influenza le regole di calcolo dei percorsi.</string>
|
||||
<string name="select_nav_profile_dialog_message">Il \'Tipo di navigazione\' determina il modo in cui vengono calcolati i percorsi.</string>
|
||||
<string name="profile_appearance">Aspetto del profilo</string>
|
||||
<string name="choose_icon_color_name">Scegli l\'icona, il colore e il nome</string>
|
||||
<string name="reorder_profiles">Modifica la lista dei profili</string>
|
||||
|
@ -3633,7 +3633,7 @@
|
|||
<string name="legend_item_description">La guida ai simboli della mappa.</string>
|
||||
<string name="navigation_profiles_item">Profili di navigazione</string>
|
||||
<string name="unsupported_type_error">Tipo non supportato</string>
|
||||
<string name="gpx_parse_error">Il GPX OsmAnd non è ben formattato, per favore contatta il supporto per ulteriori informazioni.</string>
|
||||
<string name="gpx_parse_error">OsmAnd GPX non è ben formato, contatta il team di supporto per approfondire.</string>
|
||||
<string name="shared_string_always">Sempre</string>
|
||||
<string name="screen_control">Controllo dello schermo</string>
|
||||
<string name="system_screen_timeout_descr">Spegni lo schermo dopo il tempo di spegnimento di sistema dello schermo.</string>
|
||||
|
@ -3952,7 +3952,7 @@
|
|||
<string name="shared_string_add_photo">Aggiungi foto</string>
|
||||
<string name="register_on_openplacereviews">Registrati su
|
||||
\nOpenPlaceReviews.org</string>
|
||||
<string name="register_on_openplacereviews_desc">Per contribuire delle altre foto autenticati nel sito del progetto a sorgente aperto OpenPlaceReviews.org.</string>
|
||||
<string name="register_on_openplacereviews_desc">Le foto sono fornite dal progetto open data OpenPlaceReviews.org. Per caricare le tue foto devi registrarti sul sito web.</string>
|
||||
<string name="register_opr_create_new_account">Crea un nuovo account</string>
|
||||
<string name="register_opr_have_account">Ho già un account</string>
|
||||
<string name="shared_string_search_history">Cronologia di ricerca</string>
|
||||
|
@ -3960,7 +3960,7 @@
|
|||
<string name="app_mode_motorboat">Motoscafo</string>
|
||||
<string name="login_open_street_map">Connettiti a OpenStreetMap</string>
|
||||
<string name="login_open_street_map_org">Connettiti a OpenStreetMap.org</string>
|
||||
<string name="sign_in_with_open_street_map">Registrati con OpenStreetMap</string>
|
||||
<string name="sign_in_with_open_street_map">Accedi con OpenStreetMap</string>
|
||||
<string name="open_street_map_login_mode">Devi fare il login per inviare nuove modifiche o dei cambiamenti.
|
||||
\n
|
||||
\nPuoi fare login utilizzando il metodo sicuro OAuth o il nomeutente e password.</string>
|
||||
|
@ -3977,14 +3977,14 @@
|
|||
<string name="enter_text_separated">Immetti le etichette separate dalla virgola.</string>
|
||||
<string name="gpx_upload_public_visibility_descr">\"Pubblico\" significa che la traccia è visualizzata pubblicamente nelle tue tracce GPS, nelle liste pubbliche di tracce GPS con le informazioni temporali in forma grezza. I dati forniti attraverso le API non conducono alla tua pagina delle tracce. Le informazioni temporali dei punti traccia non sono disponibili attraverso le API GPS pubbliche, e i punti della traccia non sono ordinati cronologicamente.</string>
|
||||
<string name="gpx_upload_private_visibility_descr">\"Privato\" significa che la traccia non è visualizzabile in alcuna lista pubblica ma i suoi punti, in ordine non cronologico, sono disponibili attraverso le API GPS senza le informazioni temporali.</string>
|
||||
<string name="gpx_upload_identifiable_visibility_descr">\"Identificabile\" significa che la traccia è visualizzabile nelle Mie tracce GPS e nelle liste pubbliche, es. gli altri utenti potranno scaricare la traccia grezza e associarla con il tuo nome utente. I punti della traccia, con le loro informazioni temporali, saranno riconducibili, attraverso le API GPS, alla tua traccia originale.</string>
|
||||
<string name="gpx_upload_identifiable_visibility_descr">\"Identificabile\" significa che la traccia è visualizzabile nelle Mie tracce GPS e nelle liste pubbliche, ad es. gli altri utenti potranno scaricare la traccia grezza e associarla con il tuo nome utente. I punti della traccia, con le loro informazioni temporali, saranno riconducibili, attraverso le API GPS, alla tua traccia originale.</string>
|
||||
<string name="gpx_upload_trackable_visibility_descr">\"Tracciabile\" significa che la traccia non è visualizzabile in alcuna lista pubblica, ma solo i suoi punti, processati, con le informazioni temporali (che non possono essere direttamente associati a te) attraverso le API GPS pubbliche.</string>
|
||||
<string name="add_to_mapillary">Aggiungi a Mapillary</string>
|
||||
<string name="add_to_opr">Aggiungi a OpenPlaceReviews</string>
|
||||
<string name="add_photos_descr">OsmAnd mostra foto da più sorgenti:
|
||||
\nOpenPlaceReviews - foto PDI;
|
||||
<string name="add_photos_descr">OsmAnd mostra foto da diverse fonti:
|
||||
\nOpenPlaceReviews - foto POI;
|
||||
\nMapillary - immagini stradali;
|
||||
\nWeb / Wikimedia - foto PDI OpenStreetMap.</string>
|
||||
\nWeb / Wikimedia - foto POI specificate nei dati di OpenStreetMap.</string>
|
||||
<string name="shared_string_resources">Risorse</string>
|
||||
<string name="approximate_file_size">Dimesione approssimativa del file</string>
|
||||
<string name="select_data_to_export">Seleziona i dati da esportare nel file.</string>
|
||||
|
@ -3998,4 +3998,7 @@
|
|||
<string name="cannot_upload_image">Impossibile caricare l\'immagine, riprovare in seguito</string>
|
||||
<string name="select_picture">Scegli la foto</string>
|
||||
<string name="ltr_or_rtl_combine_via_star">%1$s * %2$s</string>
|
||||
<string name="lang_de_casual">Tedesco (informale)</string>
|
||||
<string name="elevation_data">Puoi utililizzare i dati dell\'altitudine per valutare la Salita/Discesa del tuo percorso</string>
|
||||
<string name="app_mode_light_aircraft">Ultraleggeri</string>
|
||||
</resources>
|
|
@ -3982,7 +3982,7 @@
|
|||
<string name="shared_string_search_history">היסטוריית חיפוש</string>
|
||||
<string name="app_mode_kayak">קיאק</string>
|
||||
<string name="app_mode_motorboat">סירת מנוע</string>
|
||||
<string name="gpx_upload_identifiable_visibility_descr"></string>
|
||||
<string name="gpx_upload_identifiable_visibility_descr"/>
|
||||
<string name="shared_string_resources">משאבים</string>
|
||||
<string name="approximate_file_size">גודל קובץ משוערך</string>
|
||||
<string name="select_data_to_export">נא לבחור את הנתונים שייוצאו לקובץ.</string>
|
||||
|
@ -4001,4 +4001,8 @@
|
|||
<string name="use_dev_url">להשתמש ב־dev.openstreetmap.org</string>
|
||||
<string name="cannot_upload_image">לא ניתן להעלות תמונה, נא לנסות שוב מאוחר יותר</string>
|
||||
<string name="select_picture">בחירת תמונה</string>
|
||||
<string name="lang_de_casual">גרמנית (עממית)</string>
|
||||
<string name="ltr_or_rtl_combine_via_star">%1$s * %2$s</string>
|
||||
<string name="elevation_data">אפשר להשתמש בנתוני רום לצורך התחשבות בעליה / ירידה במהלך הטיול</string>
|
||||
<string name="app_mode_light_aircraft">כלי טיס קל</string>
|
||||
</resources>
|
|
@ -3928,7 +3928,7 @@ POIの更新は利用できません</string>
|
|||
<string name="message_you_need_add_two_points_to_show_graphs">少なくとも2つの地点を追加する必要があります</string>
|
||||
<string name="login_open_street_map">OpenStreetMapにログイン</string>
|
||||
<string name="login_open_street_map_org">OpenStreetMap.orgにログイン</string>
|
||||
<string name="sign_in_with_open_street_map">OpenStreetMapに登録</string>
|
||||
<string name="sign_in_with_open_street_map">OpenStreetMapにOAuthログイン</string>
|
||||
<string name="open_street_map_login_mode">変更をアップロードするには、ログインする必要があります。
|
||||
\n
|
||||
\n安全なOAuth方式を使用してログイン、または通常のユーザー名とパスワード方式が選択できます。</string>
|
||||
|
@ -3949,4 +3949,6 @@ POIの更新は利用できません</string>
|
|||
<string name="login_account">アカウント</string>
|
||||
<string name="message_graph_will_be_available_after_recalculation">ルートが再計算されるのを待ちます。
|
||||
\nグラフは再計算後に利用できるようになります。</string>
|
||||
<string name="use_dev_url_descr">OSM通知/ POI / GPXのアップロードをテストする場合、openstreetmap.orgではなくdev.openstreetmap.orgを使用するよう切り替えます。</string>
|
||||
<string name="use_dev_url">dev.openstreetmap.orgを使用</string>
|
||||
</resources>
|
|
@ -2799,8 +2799,9 @@
|
|||
\n• Andre feilrettinger
|
||||
\n</string>
|
||||
<string name="commiting_way">Sender inn vei…</string>
|
||||
<string name="send_search_query_description">Vi kommer til å sende inn ditt søk \"%1$s\", sammen med din plassering.
|
||||
\nIngen personlig informasjon samles inn, søkedata brukes kun for å forbedre søkealgoritmen.</string>
|
||||
<string name="send_search_query_description">Vi kommer til å sende inn ditt søk «%1$s», sammen med din plassering.
|
||||
\n
|
||||
\nIngen personlig info samles inn, søkedata brukes kun for å forbedre søkealgoritmen.</string>
|
||||
<string name="test_voice_desrc">Trykk på en knapp og lytt til den tilhørende talemeldingen for å høre om den mangler eller er feil</string>
|
||||
<string name="release_3_2_pre">• Fikset krasj ved oppstart som skjedde på noen enheter
|
||||
\n
|
||||
|
|
|
@ -2705,8 +2705,8 @@
|
|||
<string name="poi_diplomatic_consulate_general">Konsulat generalny</string>
|
||||
<string name="poi_diplomatic_honorary_consulate">Konsul honorowy</string>
|
||||
<string name="poi_diplomatic_permanent_mission">Misja dyplomatyczna</string>
|
||||
<string name="poi_diplomatic_ambassadors_residence">Ambasada</string>
|
||||
<string name="poi_diplomatic_delegation">Delegacja UE</string>
|
||||
<string name="poi_diplomatic_ambassadors_residence">Rezydencja ambasadora</string>
|
||||
<string name="poi_diplomatic_delegation">Delegacja</string>
|
||||
<string name="poi_diplomatic_high_commission">Wysoka komisja</string>
|
||||
<string name="poi_inscription_n">Inskrypcja: N (północ)</string>
|
||||
<string name="poi_inscription_nw">Inskrypcja: NW (północny-zachód)</string>
|
||||
|
@ -3849,4 +3849,27 @@
|
|||
<string name="poi_parking_sheds">Wiaty parkingowe</string>
|
||||
<string name="poi_gpx_point">Punkt GPX</string>
|
||||
<string name="poi_beehive">Ul</string>
|
||||
<string name="poi_diplomatic_services_citizen_services_no">Nie</string>
|
||||
<string name="poi_diplomatic_services_citizen_services_yes">Tak</string>
|
||||
<string name="poi_diplomatic_services_immigrant_visas_no">Nie</string>
|
||||
<string name="poi_diplomatic_services_immigrant_visas_yes">Tak</string>
|
||||
<string name="poi_diplomatic_services_non_immigrant_visas_no">Nie</string>
|
||||
<string name="poi_diplomatic_services_non_immigrant_visas_yes">Tak</string>
|
||||
<string name="poi_liaison_liaison_office">Biuro</string>
|
||||
<string name="poi_consulate_consulate_general">Konsulat generalny</string>
|
||||
<string name="poi_consulate_consular_agency">Agencja konsularna</string>
|
||||
<string name="poi_consulate_yes">Kierowany przez konsula</string>
|
||||
<string name="poi_embassy_residence">Rezydencja</string>
|
||||
<string name="poi_embassy_nunciature">Nuncjatura</string>
|
||||
<string name="poi_embassy_mission">Misja</string>
|
||||
<string name="poi_embassy_high_commission">Wysoka komisja</string>
|
||||
<string name="poi_embassy_delegation">Delegacja</string>
|
||||
<string name="poi_embassy_branch_embassy">Dział</string>
|
||||
<string name="poi_embassy_yes">Na czele z ambasadorem</string>
|
||||
<string name="poi_diplomatic_embassy">Ambasada</string>
|
||||
<string name="poi_diplomatic_services_citizen_services_filter">Usługi dla obywateli</string>
|
||||
<string name="poi_diplomatic_services_immigrant_visas_filter">Wizy imigracyjne</string>
|
||||
<string name="poi_diplomatic_services_non_immigrant_visas_filter">Wizy nieimigracyjne</string>
|
||||
<string name="poi_consulate_filter">Konsulat</string>
|
||||
<string name="poi_embassy_filter">Ambasada</string>
|
||||
</resources>
|
|
@ -3028,7 +3028,7 @@
|
|||
<string name="downloaded_maps">Pobrane mapy</string>
|
||||
<string name="visited_screens">Odwiedzane ekrany</string>
|
||||
<string name="colleted_data">Zebrane Informacje</string>
|
||||
<string name="routing_attr_piste_type_downhill_name">Narciarstwo alpejskie/zjazdowe</string>
|
||||
<string name="routing_attr_piste_type_downhill_name">Narciarstwo alpejskie i zjazdowe</string>
|
||||
<string name="collected_data_descr">Określ, które dane pozwalasz OsmAnd udostępniać.</string>
|
||||
<string name="downloaded_maps_collect_descr">Pomóż nam poznać popularność map krajów i regionów.</string>
|
||||
<string name="visited_screens_collect_descr">Pomóż nam poznać popularność funkcji OsmAnd.</string>
|
||||
|
@ -3369,7 +3369,7 @@
|
|||
<string name="default_speed_dialog_msg">Szacuje czas przyjazdu dla nieznanego rodzaju dróg i ograniczenia prędkości na wszystkich drogach (może zmienić trasę)</string>
|
||||
<string name="swap_start_and_destination">Odwróć początek i cel</string>
|
||||
<string name="track_saved">Zapisano ślad</string>
|
||||
<string name="empty_filename">Nazwa pliku jest pusta</string>
|
||||
<string name="empty_filename">Pusta nazwa pliku</string>
|
||||
<string name="shared_string_revert">Przywróć</string>
|
||||
<string name="quick_action_directions_from_desc">Przycisk umożliwiający wyśrodkowanie ekranu w punkcie wyjścia. Następnie poprosi o ustawienie miejsca docelowego lub uruchomi obliczanie trasy.</string>
|
||||
<string name="clear_confirmation_msg">Wyczyścić %1$s\?</string>
|
||||
|
@ -3958,26 +3958,26 @@
|
|||
<string name="message_you_need_add_two_points_to_show_graphs">Musisz dodać co najmniej dwa punkty</string>
|
||||
<string name="subscription_payment_issue_title">Wystąpił problem z Twoją subskrypcją. Kliknij przycisk, aby przejść do ustawień subskrypcji Google Play i naprawić metodę płatności.</string>
|
||||
<string name="subscription_on_hold_title">Subskrypcja OsmAnd Live jest wstrzymana</string>
|
||||
<string name="user_login">Nazwa użytkownika</string>
|
||||
<string name="user_login">Login</string>
|
||||
<string name="login_open_street_map">Zaloguj się do OpenStreetMap</string>
|
||||
<string name="login_open_street_map_org">Zaloguj się do OpenStreetMap.org</string>
|
||||
<string name="sign_in_with_open_street_map">Zaloguj się za pomocą OpenStreetMap</string>
|
||||
<string name="open_street_map_login_mode">Zaloguj się, aby przesłać nowe lub zmodyfikowane zmiany,
|
||||
<string name="open_street_map_login_mode">Musisz zalogować się, aby przesłać nowe lub zmodyfikowane zmiany,
|
||||
\n
|
||||
\nza pomocą protokołu OAuth lub nazwy użytkownika i hasła.</string>
|
||||
<string name="use_login_password">Zaloguj się za pomocą nazwy użytkownika i hasła</string>
|
||||
\nMożesz zalogować się za pomocą protokołu OAuth lub loginu i hasła.</string>
|
||||
<string name="use_login_password">Użyj loginu i hasła</string>
|
||||
<string name="login_account">Konto</string>
|
||||
<string name="osm_edit_close_note">Zamknij uwagę OSM</string>
|
||||
<string name="osm_edit_comment_note">Skomentuj uwagę OSM</string>
|
||||
<string name="markers_history">Historia znaczników</string>
|
||||
<string name="send_files_to_openstreetmap">Wyślij plik GPX do OpenStreetMap</string>
|
||||
<string name="enter_text_separated">Wpisz tagi oddzielone przecinkami.</string>
|
||||
<string name="gpx_upload_trackable_visibility_descr">Możliwość śledzenia oznacza, że ślad nie pojawi się na żadnej publicznej liście, ale punkty śledzenia będą nadal dostępne za pośrednictwem publicznego API GPS ze znacznikami czasu. Inni użytkownicy będą mogli pobrać tylko te przetworzone punkty śledzenia z Twojego śladu, których nie można powiązać bezpośrednio z Tobą.</string>
|
||||
<string name="osm_login_descr">Zaloguj się przy użyciu bezpiecznej metody autoryzacji OAuth lub użyj swojej nazwy użytkownika i hasła.</string>
|
||||
<string name="gpx_upload_trackable_visibility_descr">„Śledzenie” oznacza, że ślad nie pojawia się w żadnych publicznych wykazach, ale przetworzone punkty śledzenia z sygnaturami czasowymi (których nie można bezpośrednio powiązać z Tobą) są pobierane z publicznego interfejsu GPS API.</string>
|
||||
<string name="osm_login_descr">Możesz zalogować się za pomocą bezpiecznej metody autoryzacji OAuth lub przy użyciu swojego loginu i hasła.</string>
|
||||
<string name="shared_string_add_photo">Dodaj zdjęcie</string>
|
||||
<string name="register_on_openplacereviews">Zarejestruj się w
|
||||
\nOpenPlaceReviews.org</string>
|
||||
<string name="register_on_openplacereviews_desc">Zaloguj się na stronie projektu otwartych danych OpenPlaceReviews.org, aby przesłać jeszcze więcej zdjęć.</string>
|
||||
<string name="register_on_openplacereviews_desc">Zdjęcia są dostarczane przez otwarty projekt OpenPlaceReviews.org. Aby przesłać swoje zdjęcia, musisz zarejestrować się na stronie.</string>
|
||||
<string name="register_opr_create_new_account">Utwórz nowe konto</string>
|
||||
<string name="register_opr_have_account">Mam już konto</string>
|
||||
<string name="select_groups_for_import">Wybierz grupy, które zostaną zaimportowane.</string>
|
||||
|
@ -3999,4 +3999,10 @@
|
|||
<string name="app_mode_motorboat">Motorówka</string>
|
||||
<string name="add_to_mapillary">Dodaj do Mapillary</string>
|
||||
<string name="add_to_opr">Dodaj do OpenPlaceReviews</string>
|
||||
<string name="gpx_upload_private_visibility_descr">„Prywatny” oznacza, że ślad nie pojawia się w żadnych publicznych wykazach, ale punkty śledzenia z niego w kolejności niechronologicznej są dostępne za pośrednictwem publicznego interfejsu API GPS bez sygnatur czasowych.</string>
|
||||
<string name="gpx_upload_identifiable_visibility_descr">\"Możliwe do zidentyfikowania\" oznacza, że ślad zostanie podany publicznie w śladach GPS i w publicznych wykazach śledzenia GPS, czyli inni użytkownicy będą mogli pobrać surowy ślad i skojarzyć go z twoją nazwą użytkownika. Publiczne dane śledzenia sygnatury czasowej z interfejsu API GPS obsługiwane za pośrednictwem interfejsu API punktów śladowych będą odwoływać się do oryginalnej strony śledzenia.</string>
|
||||
<string name="select_picture">Wybierz zdjęcie</string>
|
||||
<string name="cannot_upload_image">Nie można przesłać obrazu, spróbuj ponownie później</string>
|
||||
<string name="ltr_or_rtl_combine_via_star">%1$s * %2$s</string>
|
||||
<string name="lang_de_casual">Niemiecki (styl potoczny)</string>
|
||||
</resources>
|
|
@ -3880,4 +3880,7 @@
|
|||
<string name="poi_liaison_filter">Ligação</string>
|
||||
<string name="poi_consulate_filter">Consulado</string>
|
||||
<string name="poi_embassy_filter">Embaixada</string>
|
||||
<string name="poi_siren">Sereia</string>
|
||||
<string name="poi_nurse">Enfermaria</string>
|
||||
<string name="poi_mobile_money_agent">Agente de dinheiro móvel</string>
|
||||
</resources>
|
|
@ -3995,4 +3995,7 @@
|
|||
<string name="cannot_upload_image">Não é possível carregar a imagem, por favor, tente novamente mais tarde</string>
|
||||
<string name="select_picture">Selecione a foto</string>
|
||||
<string name="ltr_or_rtl_combine_via_star">%1$s * %2$s</string>
|
||||
<string name="lang_de_casual">Alemão (casual)</string>
|
||||
<string name="elevation_data">Você pode usar os dados de elevação para consideração de subida / descida para sua viagem</string>
|
||||
<string name="app_mode_light_aircraft">Avião leve</string>
|
||||
</resources>
|
|
@ -4002,4 +4002,7 @@
|
|||
<string name="select_picture">Selecione a imagem</string>
|
||||
<string name="use_dev_url_descr">Mude para usar dev.openstreetmap.org ao invés de openstreetmap.org para testar enviar uma OSM Nota / POI / GPX.</string>
|
||||
<string name="ltr_or_rtl_combine_via_star">%1$s * %2$s</string>
|
||||
<string name="lang_de_casual">Alemão (casual)</string>
|
||||
<string name="elevation_data">Pode usar os dados de elevação para considerar a ascensão / descida na sua viagem</string>
|
||||
<string name="app_mode_light_aircraft">Aeronaves ligeiras</string>
|
||||
</resources>
|
|
@ -3868,4 +3868,6 @@
|
|||
<string name="poi_consulate_consular_agency">Консульское агентство</string>
|
||||
<string name="poi_embassy_interests_section">Раздел интересов</string>
|
||||
<string name="poi_consulate_filter">Консульство</string>
|
||||
<string name="poi_siren">Сирена</string>
|
||||
|
||||
</resources>
|
|
@ -3954,7 +3954,7 @@
|
|||
<string name="login_open_street_map_org">Вход в OpenStreetMap.org</string>
|
||||
<string name="sign_in_with_open_street_map">Войти через OpenStreetMap</string>
|
||||
<string name="login_account">Аккаунт</string>
|
||||
<string name="user_login">Пользователь</string>
|
||||
<string name="user_login">Авторизоваться</string>
|
||||
<string name="manage_subscription">Управление подпиской</string>
|
||||
<string name="subscription_expired_title">Срок действия подписки OsmAnd Live истёк</string>
|
||||
<string name="subscription_paused_title">Подписка OsmAnd Live была приостановлена</string>
|
||||
|
@ -3993,4 +3993,5 @@
|
|||
<string name="select_picture">Выбор изображения</string>
|
||||
<string name="app_mode_kayak">Каяк</string>
|
||||
<string name="ltr_or_rtl_combine_via_star">%1$s * %2$s</string>
|
||||
<string name="lang_de_casual">Немецкий (повседневный)</string>
|
||||
</resources>
|
|
@ -3876,4 +3876,7 @@
|
|||
<string name="poi_diplomatic_services_immigrant_visas_filter">Vistos pro immigrantes</string>
|
||||
<string name="poi_diplomatic_services_non_immigrant_visas_filter">Vistos pro no immigrantes</string>
|
||||
<string name="poi_liaison_filter">Ufìtziu de collegamentu</string>
|
||||
<string name="poi_siren">Sirena</string>
|
||||
<string name="poi_nurse">Infermieri</string>
|
||||
<string name="poi_mobile_money_agent">Agente de denaru mòbile</string>
|
||||
</resources>
|
|
@ -3997,4 +3997,7 @@
|
|||
<string name="cannot_upload_image">Impossìbile carrigare s\'immàgine, torra a proare prus a tardu</string>
|
||||
<string name="select_picture">Ischerta un\'immàgine</string>
|
||||
<string name="ltr_or_rtl_combine_via_star">%1$s * %2$s</string>
|
||||
<string name="lang_de_casual">Tedescu (informale)</string>
|
||||
<string name="elevation_data">Podes impreare sos datos de s\'artària pro pigare in cunsideru s\'Artziada / Achirrada pro su biàgiu tuo</string>
|
||||
<string name="app_mode_light_aircraft">Aèreu lèbiu</string>
|
||||
</resources>
|
|
@ -3953,13 +3953,13 @@
|
|||
<string name="subscription_expired_title">Predplatné OsmAnd Live skončilo</string>
|
||||
<string name="subscription_paused_title">Predplatné OsmAnd Live je pozastavené</string>
|
||||
<string name="subscription_on_hold_title">Predplatné OsmAnd Live je zablokované</string>
|
||||
<string name="login_open_street_map">Prihlásenie pre OpenStreetMap</string>
|
||||
<string name="login_open_street_map_org">Prihlásenie pre OpenStreetMap.org</string>
|
||||
<string name="sign_in_with_open_street_map">Prihlásiť sa do OpenStreetMap</string>
|
||||
<string name="open_street_map_login_mode">Prihláste sa pre odoslanie nových alebo zmenených údajov,
|
||||
<string name="login_open_street_map">Prihlásiť sa do OpenStreetMap</string>
|
||||
<string name="login_open_street_map_org">Prihlásiť sa do OpenStreetMap.org</string>
|
||||
<string name="sign_in_with_open_street_map">Zaregistrovať sa do OpenStreetMap</string>
|
||||
<string name="open_street_map_login_mode">Musíte sa prihlásiť pre odoslanie nových alebo zmenených údajov.
|
||||
\n
|
||||
\nbuď pomocou metódy OAuth alebo pomocou mena a hesla.</string>
|
||||
<string name="use_login_password">Prihlásiť sa menom a heslom</string>
|
||||
\nMôžete sa prihlásiť pomocou bezpečnej metódy OAuth alebo pomocou mena a hesla.</string>
|
||||
<string name="use_login_password">Použiť meno a heslo</string>
|
||||
<string name="login_account">Účet</string>
|
||||
<string name="user_login">Prihlasovacie meno</string>
|
||||
<string name="markers_history">História značiek</string>
|
||||
|
@ -3967,11 +3967,11 @@
|
|||
<string name="enter_text_separated">Zadajte značky oddelené čiarkou.</string>
|
||||
<string name="osm_edit_close_note">Zatvoriť OSM poznámku</string>
|
||||
<string name="osm_edit_comment_note">Komentovať OSM poznámku</string>
|
||||
<string name="osm_login_descr">Prihláste sa bezpečnou metódou OAuth alebo použite meno a heslo.</string>
|
||||
<string name="osm_login_descr">Môžete sa prihlásiť bezpečnou metódou OAuth alebo použite meno a heslo.</string>
|
||||
<string name="shared_string_add_photo">Pridať foto</string>
|
||||
<string name="register_on_openplacereviews">Zaregistrovať na
|
||||
\nOpenPlaceReviews.org</string>
|
||||
<string name="register_on_openplacereviews_desc">Prihláste sa na webstránke projektu OpenPlaceReviews.org s otvorenými dátami pre odoslanie ďalších fotografií.</string>
|
||||
<string name="register_on_openplacereviews_desc">Fotografie sú poskytované projektom OpenPlaceReviews.org s otvorenými dátami. Na odoslanie vašich fotiek sa musíte zaregistrovať na webovej stránke.</string>
|
||||
<string name="register_opr_create_new_account">Vytvoriť nový účet</string>
|
||||
<string name="register_opr_have_account">Už mám účet</string>
|
||||
<string name="shared_string_search_history">História hľadania</string>
|
||||
|
@ -3993,6 +3993,8 @@
|
|||
<string name="select_items_for_import">Zvoľte položky, ktoré budú importované.</string>
|
||||
<string name="use_dev_url_descr">Prepnúť na dev.openstreetmap.org namiesto openstreetmap.org pre otestovanie odosielania OSM poznámok / bodov záujmu / GPX stôp.</string>
|
||||
<string name="use_dev_url">Použiť dev.openstreetmap.org</string>
|
||||
<string name="cannot_upload_image"></string>
|
||||
<string name="select_picture"></string>
|
||||
<string name="cannot_upload_image">Nedá sa odoslať obrázok, prosím skúste neskôr</string>
|
||||
<string name="select_picture">Zvoľte obrázok</string>
|
||||
<string name="lang_de_casual">Nemecky (Deutsch) úsporne</string>
|
||||
<string name="ltr_or_rtl_combine_via_star">%1$s * %2$s</string>
|
||||
</resources>
|
|
@ -3329,7 +3329,7 @@
|
|||
<string name="poi_glacier_ele_top">Највиша тачка</string>
|
||||
<string name="poi_glacier_type_ice_tongue">Ледени језик</string>
|
||||
<string name="poi_glacier_type_remnant">Остатак</string>
|
||||
<string name="poi_glacier_type_shelf">Полица</string>
|
||||
<string name="poi_glacier_type_shelf">Плато</string>
|
||||
<string name="poi_glacier_type_rock">Стена</string>
|
||||
<string name="poi_glacier_type_icefall">Ледопад</string>
|
||||
<string name="poi_glacier_type_hanging">Висећи</string>
|
||||
|
@ -3421,8 +3421,8 @@
|
|||
<string name="poi_diameter_crown">Пречник круне</string>
|
||||
<string name="poi_circumference">Обим</string>
|
||||
<string name="poi_climbing_routes">Пењачке руте</string>
|
||||
<string name="poi_climbing_summit_log_no">Дневник врха пењања: не</string>
|
||||
<string name="poi_climbing_summit_log_yes">Дневник врха пењања: да</string>
|
||||
<string name="poi_climbing_summit_log_no">Брвно врха пењања: не</string>
|
||||
<string name="poi_climbing_summit_log_yes">Брвно врха пењања: да</string>
|
||||
<string name="poi_climbing_orientation_nw">Оријентација зида: СЗ</string>
|
||||
<string name="poi_climbing_orientation_w">Оријентација зида: З</string>
|
||||
<string name="poi_climbing_orientation_sw">Оријентација зида: ЈЗ</string>
|
||||
|
@ -3774,7 +3774,7 @@
|
|||
<string name="poi_fire_hydrant_type_pipe">Цев</string>
|
||||
<string name="poi_drinking_water_refill_network">Мрежа за поновно доливање питке воде</string>
|
||||
<string name="poi_drinking_water_refill_no">Доливање воде за пиће: не</string>
|
||||
<string name="poi_drinking_water_refill_yes">Доливање воде за пиће: да</string>
|
||||
<string name="poi_drinking_water_refill_yes">Да</string>
|
||||
<string name="poi_seamark_obstruction">Опструкција</string>
|
||||
<string name="poi_seamark_water_level_below_mwl">Ниво воде: испод средњег нивоа</string>
|
||||
<string name="poi_seamark_water_level_above_mwl">Ниво воде: изнад средњег нивоа</string>
|
||||
|
@ -3789,7 +3789,7 @@
|
|||
<string name="poi_tactile_paving_primitive">Примитивно</string>
|
||||
<string name="poi_tactile_paving_contrasted">Контрастно</string>
|
||||
<string name="poi_traffic_signals_sound_locate">Дозвољено је само при ходању</string>
|
||||
<string name="poi_internet_access_fee_customers">Сигнал за проналазак пола</string>
|
||||
<string name="poi_internet_access_fee_customers">Приступ интернету: купци</string>
|
||||
<string name="poi_video_no">Не</string>
|
||||
<string name="poi_video_yes">Да</string>
|
||||
<string name="poi_booth">Тип кабине</string>
|
||||
|
|
|
@ -1648,7 +1648,7 @@
|
|||
<string name="lang_nl">Холандски</string>
|
||||
<string name="lang_ka">Грузијски</string>
|
||||
<string name="lang_iw">Хебрејски</string>
|
||||
<string name="lang_hi">Хинди</string>
|
||||
<string name="lang_hi">Индијски</string>
|
||||
<string name="lang_hu_formal">Мађарски (званични)</string>
|
||||
<string name="lang_kn">Канада</string>
|
||||
<string name="lang_lv">Летонски</string>
|
||||
|
@ -3993,4 +3993,5 @@
|
|||
<string name="use_dev_url_descr">Пређите на употребу dev.openstreetmap.org уместо на openstreetmap.org да бисте тестирали отпремање ОСМ белешке / ПОИ / ГПКС.</string>
|
||||
<string name="use_dev_url">Употреби dev.openstreetmap.org</string>
|
||||
<string name="ltr_or_rtl_combine_via_star">%1$s * %2$s</string>
|
||||
<string name="lang_de_casual">Немачки (говорни)</string>
|
||||
</resources>
|
|
@ -3132,4 +3132,7 @@
|
|||
<string name="poi_fire_hydrant_style_water_source_pond">Gölet</string>
|
||||
<string name="poi_consulate_filter">Konsolosluk</string>
|
||||
<string name="poi_embassy_filter">Büyük elçilik</string>
|
||||
<string name="poi_diplomatic_services_citizen_services_filter">Vatandaş hizmetleri</string>
|
||||
<string name="poi_diplomatic_services_immigrant_visas_filter">Göçmen vizeleri</string>
|
||||
<string name="poi_diplomatic_services_non_immigrant_visas_filter">Göçmen olmayan vizeleri</string>
|
||||
</resources>
|
|
@ -3543,7 +3543,7 @@
|
|||
<string name="shared_string_circle">Daire</string>
|
||||
<string name="shared_string_octagon">Sekizgen</string>
|
||||
<string name="shared_string_square">Kare</string>
|
||||
<string name="shared_string_min">Min</string>
|
||||
<string name="shared_string_min">Asgari</string>
|
||||
<string name="replace_point_descr">Başka bir noktayı bununla değiştirin.</string>
|
||||
<string name="app_mode_ski_touring">Kayak turu</string>
|
||||
<string name="app_mode_ski_snowmobile">Kar arabası</string>
|
||||
|
@ -3903,13 +3903,13 @@
|
|||
<string name="icon_group_emergency">Acil</string>
|
||||
<string name="icon_group_travel">Seyahat</string>
|
||||
<string name="message_you_need_add_two_points_to_show_graphs">En az iki nokta eklemelisiniz</string>
|
||||
<string name="login_open_street_map">OpenStreetMap için oturum aç</string>
|
||||
<string name="login_open_street_map_org">OpenStreetMap.org için oturum aç</string>
|
||||
<string name="open_street_map_login_mode">Yenilikleri veya değişiklikleri karşıya yüklemek için oturum açın,
|
||||
<string name="login_open_street_map">OpenStreetMap\'te oturum aç</string>
|
||||
<string name="login_open_street_map_org">OpenStreetMap.org\'da oturum aç</string>
|
||||
<string name="open_street_map_login_mode">Yenilikleri veya değişiklikleri karşıya yüklemek için oturum açmanız gerekir.
|
||||
\n
|
||||
\nOAuth ile oturum açabilir veya kullanıcı adı ve parolanızı kullanabilirsiniz.</string>
|
||||
<string name="use_login_password">Kullanıcı adı ve parola ile oturum aç</string>
|
||||
<string name="user_login">Kullanıcı adı</string>
|
||||
\nGüvenli OAuth yöntemini kullanarak oturum açabilir veya giriş bilgilerinizi ve parolanızı kullanabilirsiniz.</string>
|
||||
<string name="use_login_password">Giriş bilgisi ve parola kullan</string>
|
||||
<string name="user_login">Giriş bilgisi</string>
|
||||
<string name="login_account">Hesap</string>
|
||||
<string name="manage_subscription">Aboneliği yönet</string>
|
||||
<string name="subscription_payment_issue_title">Aboneliğinizle ilgili bir sorun var. Ödeme yönteminizi düzeltmek üzere Google Play abonelik ayarlarına gitmek için düğmeye tıklayın.</string>
|
||||
|
@ -3926,11 +3926,11 @@
|
|||
<string name="gpx_upload_trackable_visibility_descr">\"Takip edilebilir\", izlemenin herkese açık herhangi bir listede gösterilmediği, ancak (sizinle doğrudan ilişkilendirilemeyen) zaman damgaları olan işlenen izleme noktalarının herkese açık GPS API\'sinden indirmeler yoluyla göründüğü anlamına gelir.</string>
|
||||
<string name="osm_edit_close_note">OSM Notunu Kapat</string>
|
||||
<string name="osm_edit_comment_note">OSM Notuna Yorum Yap</string>
|
||||
<string name="osm_login_descr">Güvenli OAuth yöntemini kullanarak oturum açın veya kullanıcı adınızı ve parolanızı kullanın.</string>
|
||||
<string name="osm_login_descr">Güvenli OAuth yöntemini kullanarak oturum açabilir veya giriş bilgilerinizi ve parolanızı kullanabilirsiniz.</string>
|
||||
<string name="shared_string_add_photo">Fotoğraf ekle</string>
|
||||
<string name="register_on_openplacereviews">OpenPlaceReviews.org\'a
|
||||
\nkaydolun</string>
|
||||
<string name="register_on_openplacereviews_desc">Daha da fazla fotoğraf yüklemek için açık veri projesi web sitesi OpenPlaceReviews.org\'da oturum açın.</string>
|
||||
<string name="register_on_openplacereviews_desc">Fotoğraflar açık veri projesi OpenPlaceReviews.org tarafından sağlanmaktadır. Fotoğraflarınızı yüklemek için web sitesine kaydolmanız gerekir.</string>
|
||||
<string name="register_opr_create_new_account">Yeni hesap oluştur</string>
|
||||
<string name="register_opr_have_account">Zaten bir hesabım var</string>
|
||||
<string name="shared_string_search_history">Arama geçmişi</string>
|
||||
|
@ -3952,4 +3952,10 @@
|
|||
<string name="select_items_for_import">İçe aktarılacak ögeleri seçin.</string>
|
||||
<string name="use_dev_url_descr">OSM Notu/POI/GPX yüklemeyi test etmek için openstreetmap.org yerine dev.openstreetmap.org kullanmaya geçin.</string>
|
||||
<string name="use_dev_url">dev.openstreetmap.org\'u kullan</string>
|
||||
<string name="lang_de_casual">Almanca (gündelik)</string>
|
||||
<string name="cannot_upload_image">Resim yüklenemiyor, lütfen daha sonra tekrar deneyin</string>
|
||||
<string name="select_picture">Resim seç</string>
|
||||
<string name="ltr_or_rtl_combine_via_star">%1$s * %2$s</string>
|
||||
<string name="elevation_data">Yolculuğunuzun Çıkış / İniş değerleri için Yükseklik verilerini kullanabilirsiniz</string>
|
||||
<string name="app_mode_light_aircraft">Hafif uçak</string>
|
||||
</resources>
|
|
@ -3868,4 +3868,7 @@
|
|||
<string name="poi_diplomatic_embassy">Посольство</string>
|
||||
<string name="poi_consulate_filter">Консульство</string>
|
||||
<string name="poi_embassy_filter">Посольство</string>
|
||||
<string name="poi_siren">Сирена</string>
|
||||
<string name="poi_nurse">Медсестра</string>
|
||||
<string name="poi_mobile_money_agent">Мобільний грошовий агент</string>
|
||||
</resources>
|
|
@ -3996,4 +3996,7 @@
|
|||
<string name="cannot_upload_image">Не вдається завантажити зображення, повторіть спробу пізніше</string>
|
||||
<string name="select_picture">Вибрати зображення</string>
|
||||
<string name="ltr_or_rtl_combine_via_star">%1$s * %2$s</string>
|
||||
<string name="lang_de_casual">Німецька (неформальна)</string>
|
||||
<string name="elevation_data">Ви можете використовувати дані про висоту для розгляду сходження / спуску для вашої подорожі</string>
|
||||
<string name="app_mode_light_aircraft">Легкий літак</string>
|
||||
</resources>
|
|
@ -3879,4 +3879,7 @@
|
|||
<string name="poi_liaison_filter">聯絡處</string>
|
||||
<string name="poi_consulate_filter">領事館</string>
|
||||
<string name="poi_embassy_filter">大使館</string>
|
||||
<string name="poi_siren">警報器</string>
|
||||
<string name="poi_nurse">護理師</string>
|
||||
<string name="poi_mobile_money_agent">行動貨幣代理商</string>
|
||||
</resources>
|
|
@ -3994,4 +3994,8 @@
|
|||
<string name="use_dev_url">使用 dev.openstreetmap.org</string>
|
||||
<string name="cannot_upload_image">無法上傳圖片,請稍後再試</string>
|
||||
<string name="select_picture">選取圖片</string>
|
||||
<string name="lang_de_casual">德語(非正式)</string>
|
||||
<string name="ltr_or_rtl_combine_via_star">%1$s * %2$s</string>
|
||||
<string name="elevation_data">您可以將海拔資料用於您旅程的上升與下降</string>
|
||||
<string name="app_mode_light_aircraft">輕型飛機</string>
|
||||
</resources>
|
|
@ -477,7 +477,8 @@
|
|||
<color name="switch_button_active_stroke_dark">#80D28521</color>
|
||||
<color name="empty_hint_bg">#80000000</color>
|
||||
<color name="input_layout_bg_color">#4DCCCCCC</color>
|
||||
<color name="text_input_background_light">#14000000</color>
|
||||
<color name="text_input_background_dark">#0DFFFFFF</color>
|
||||
<color name="text_input_background_light">#4DCCCCCC</color>
|
||||
<color name="text_input_background_dark">#1AFFFFFF</color>
|
||||
<color name="mtrl_textinput_default_box_stroke_color">#67727272</color>
|
||||
|
||||
</resources>
|
|
@ -3998,7 +3998,7 @@
|
|||
<string name="poi_vehicle_delivery">Vehicle access: delivery</string>
|
||||
<string name="poi_vehicle_forestry">Vehicle access: forestry</string>
|
||||
|
||||
<string name="poi_motorcar_yes">Motorcar access: </string>
|
||||
<string name="poi_motorcar_yes">Motorcar access: yes</string>
|
||||
<string name="poi_motorcar_private">Motorcar access: private</string>
|
||||
<string name="poi_motorcar_no">Motorcar access: no</string>
|
||||
<string name="poi_motorcar_destination">Motorcar access: destination</string>
|
||||
|
@ -4300,4 +4300,12 @@
|
|||
<string name="poi_diplomatic_services_citizen_services_yes">Yes</string>
|
||||
<string name="poi_diplomatic_services_citizen_services_no">No</string>
|
||||
|
||||
<string name="poi_mobile_money_agent">Mobile money agent</string>
|
||||
|
||||
<string name="poi_nurse">Nurse</string>
|
||||
|
||||
<string name="poi_siren">Siren</string>
|
||||
|
||||
<string name="poi_lifeguard_base">Lifeguard base</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -11,6 +11,11 @@
|
|||
Thx - Hardy
|
||||
|
||||
-->
|
||||
<string name="plan_route_add_new_segment">Add new segment</string>
|
||||
<string name="plan_route_split_after">Split after</string>
|
||||
<string name="plan_route_split_before">Split before</string>
|
||||
<string name="plan_route_join_segments">Join segments</string>
|
||||
<string name="app_mode_light_aircraft">Light aircraft</string>
|
||||
<string name="elevation_data">You can use Elevation data for consideration of Ascent / Descent for your trip</string>
|
||||
<string name="ltr_or_rtl_combine_via_star">%1$s * %2$s</string>
|
||||
<string name="add_photos_descr">OsmAnd shows photos from several sources:\nOpenPlaceReviews - POI photos;\nMapillary - street-level imagery;\nWeb / Wikimedia - POI photos specified in OpenStreetMap data.</string>
|
||||
|
@ -2654,7 +2659,7 @@
|
|||
<string name="files_limit">%1$d files left</string>
|
||||
<string name="available_downloads_left">%1$d files left to download</string>
|
||||
<string name="install_paid">Full version</string>
|
||||
<string name="cancel_route">Dismiss route</string>
|
||||
<string name="cancel_route">Dismiss route?</string>
|
||||
<string name="cancel_navigation">Stop navigation</string>
|
||||
<string name="clear_destination">Clear destination</string>
|
||||
<string name="download_using_mobile_internet">Not connected to Wi-Fi. Use current connection to the Internet to download?</string>
|
||||
|
|
|
@ -10,7 +10,6 @@ import android.content.res.Configuration;
|
|||
import android.content.res.Resources;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Matrix;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.PointF;
|
||||
|
@ -328,9 +327,9 @@ public class AndroidUtils {
|
|||
new int[] {}
|
||||
},
|
||||
new int[] {
|
||||
Color.GRAY,
|
||||
ContextCompat.getColor(ctx, night? R.color.text_color_secondary_dark : R.color.text_color_secondary_light),
|
||||
ContextCompat.getColor(ctx, night? R.color.active_color_primary_dark : R.color.active_color_primary_light),
|
||||
Color.GRAY}
|
||||
ContextCompat.getColor(ctx, night? R.color.text_color_secondary_dark : R.color.text_color_secondary_light)}
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ import android.view.KeyEvent;
|
|||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
@ -51,12 +50,11 @@ import net.osmand.plus.AppInitializer.AppInitializeListener;
|
|||
import net.osmand.plus.AppInitializer.InitEvents;
|
||||
import net.osmand.plus.ContextMenuAdapter;
|
||||
import net.osmand.plus.ContextMenuItem;
|
||||
import net.osmand.plus.CustomOsmandPlugin;
|
||||
import net.osmand.plus.FavouritesDbHelper;
|
||||
import net.osmand.plus.GPXDatabase.GpxDataItem;
|
||||
import net.osmand.plus.GpxSelectionHelper;
|
||||
import net.osmand.plus.GpxSelectionHelper.SelectedGpxFile;
|
||||
import net.osmand.plus.mapmarkers.MapMarkersHelper;
|
||||
import net.osmand.plus.mapmarkers.MapMarker;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.OsmandPlugin;
|
||||
import net.osmand.plus.SQLiteTileSource;
|
||||
|
@ -68,6 +66,8 @@ import net.osmand.plus.helpers.ExternalApiHelper;
|
|||
import net.osmand.plus.helpers.LockHelper;
|
||||
import net.osmand.plus.mapcontextmenu.MapContextMenu;
|
||||
import net.osmand.plus.mapcontextmenu.other.IContextMenuButtonListener;
|
||||
import net.osmand.plus.mapmarkers.MapMarker;
|
||||
import net.osmand.plus.mapmarkers.MapMarkersHelper;
|
||||
import net.osmand.plus.monitoring.OsmandMonitoringPlugin;
|
||||
import net.osmand.plus.myplaces.TrackBitmapDrawer;
|
||||
import net.osmand.plus.quickaction.QuickAction;
|
||||
|
@ -79,11 +79,11 @@ import net.osmand.plus.routing.RouteDirectionInfo;
|
|||
import net.osmand.plus.routing.RoutingHelper;
|
||||
import net.osmand.plus.routing.VoiceRouter;
|
||||
import net.osmand.plus.settings.backend.ApplicationMode;
|
||||
import net.osmand.plus.settings.backend.ExportSettingsType;
|
||||
import net.osmand.plus.settings.backend.OsmAndAppCustomization;
|
||||
import net.osmand.plus.settings.backend.OsmandSettings;
|
||||
import net.osmand.plus.settings.backend.backup.ProfileSettingsItem;
|
||||
import net.osmand.plus.settings.backend.backup.SettingsHelper;
|
||||
import net.osmand.plus.settings.backend.ExportSettingsType;
|
||||
import net.osmand.plus.settings.backend.backup.SettingsItem;
|
||||
import net.osmand.plus.views.OsmandMapLayer;
|
||||
import net.osmand.plus.views.OsmandMapTileView;
|
||||
|
@ -126,6 +126,7 @@ import static net.osmand.aidl.ConnectedApp.AIDL_OBJECT_ID;
|
|||
import static net.osmand.aidl.ConnectedApp.AIDL_PACKAGE_NAME;
|
||||
import static net.osmand.aidl.ConnectedApp.AIDL_REMOVE_MAP_LAYER;
|
||||
import static net.osmand.aidl.ConnectedApp.AIDL_REMOVE_MAP_WIDGET;
|
||||
import static net.osmand.aidlapi.OsmandAidlConstants.CANNOT_ACCESS_API_ERROR;
|
||||
import static net.osmand.aidlapi.OsmandAidlConstants.COPY_FILE_IO_ERROR;
|
||||
import static net.osmand.aidlapi.OsmandAidlConstants.COPY_FILE_MAX_LOCK_TIME_MS;
|
||||
import static net.osmand.aidlapi.OsmandAidlConstants.COPY_FILE_PARAMS_ERROR;
|
||||
|
@ -141,6 +142,7 @@ import static net.osmand.plus.helpers.ExternalApiHelper.PARAM_NT_DIRECTION_TURN;
|
|||
import static net.osmand.plus.helpers.ExternalApiHelper.PARAM_NT_DISTANCE;
|
||||
import static net.osmand.plus.helpers.ExternalApiHelper.PARAM_NT_IMMINENT;
|
||||
import static net.osmand.plus.settings.backend.backup.SettingsHelper.REPLACE_KEY;
|
||||
import static net.osmand.plus.settings.backend.backup.SettingsHelper.SILENT_IMPORT_KEY;
|
||||
|
||||
public class OsmandAidlApi {
|
||||
|
||||
|
@ -598,8 +600,7 @@ public class OsmandAidlApi {
|
|||
final RoutingHelper routingHelper = app.getRoutingHelper();
|
||||
boolean force = intent.getBooleanExtra(AIDL_FORCE, true);
|
||||
if (routingHelper.isFollowingMode() && !force) {
|
||||
AlertDialog dlg = mapActivity.getMapActions().stopNavigationActionConfirm();
|
||||
dlg.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
||||
mapActivity.getMapActions().stopNavigationActionConfirm(new DialogInterface.OnDismissListener() {
|
||||
|
||||
@Override
|
||||
public void onDismiss(DialogInterface dialog) {
|
||||
|
@ -665,8 +666,7 @@ public class OsmandAidlApi {
|
|||
final RoutingHelper routingHelper = app.getRoutingHelper();
|
||||
boolean force = intent.getBooleanExtra(AIDL_FORCE, true);
|
||||
if (routingHelper.isFollowingMode() && !force) {
|
||||
AlertDialog dlg = mapActivity.getMapActions().stopNavigationActionConfirm();
|
||||
dlg.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
||||
mapActivity.getMapActions().stopNavigationActionConfirm(new DialogInterface.OnDismissListener() {
|
||||
|
||||
@Override
|
||||
public void onDismiss(DialogInterface dialog) {
|
||||
|
@ -2236,11 +2236,12 @@ public class OsmandAidlApi {
|
|||
}
|
||||
|
||||
public boolean importProfileV2(final Uri profileUri, ArrayList<String> settingsTypeKeys, boolean replace,
|
||||
String latestChanges, int version) {
|
||||
String latestChanges, int version) {
|
||||
if (profileUri != null) {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putStringArrayList(SettingsHelper.SETTINGS_TYPE_LIST_KEY, settingsTypeKeys);
|
||||
bundle.putBoolean(REPLACE_KEY, replace);
|
||||
bundle.putBoolean(SILENT_IMPORT_KEY, true);
|
||||
bundle.putString(SettingsHelper.SETTINGS_LATEST_CHANGES_KEY, latestChanges);
|
||||
bundle.putInt(SettingsHelper.SETTINGS_VERSION_KEY, version);
|
||||
|
||||
|
@ -2327,6 +2328,15 @@ public class OsmandAidlApi {
|
|||
return mapActivity.getContextMenu().isVisible();
|
||||
}
|
||||
|
||||
public int getPluginVersion(String pluginName) {
|
||||
OsmandPlugin plugin = OsmandPlugin.getPlugin(pluginName);
|
||||
if (plugin instanceof CustomOsmandPlugin) {
|
||||
CustomOsmandPlugin customPlugin = (CustomOsmandPlugin) plugin;
|
||||
return customPlugin.getVersion();
|
||||
}
|
||||
return CANNOT_ACCESS_API_ERROR;
|
||||
}
|
||||
|
||||
private static class FileCopyInfo {
|
||||
long startTime;
|
||||
long lastAccessTime;
|
||||
|
|
|
@ -22,9 +22,9 @@ import net.osmand.aidlapi.contextmenu.ContextMenuButtonsParams;
|
|||
import net.osmand.aidlapi.contextmenu.RemoveContextMenuButtonsParams;
|
||||
import net.osmand.aidlapi.contextmenu.UpdateContextMenuButtonsParams;
|
||||
import net.osmand.aidlapi.copyfile.CopyFileParams;
|
||||
import net.osmand.aidlapi.customization.MapMarginsParams;
|
||||
import net.osmand.aidlapi.info.AppInfoParams;
|
||||
import net.osmand.aidlapi.customization.CustomPluginParams;
|
||||
import net.osmand.aidlapi.customization.CustomizationInfoParams;
|
||||
import net.osmand.aidlapi.customization.MapMarginsParams;
|
||||
import net.osmand.aidlapi.customization.OsmandSettingsInfoParams;
|
||||
import net.osmand.aidlapi.customization.OsmandSettingsParams;
|
||||
import net.osmand.aidlapi.customization.ProfileSettingsParams;
|
||||
|
@ -48,6 +48,7 @@ import net.osmand.aidlapi.gpx.RemoveGpxParams;
|
|||
import net.osmand.aidlapi.gpx.ShowGpxParams;
|
||||
import net.osmand.aidlapi.gpx.StartGpxRecordingParams;
|
||||
import net.osmand.aidlapi.gpx.StopGpxRecordingParams;
|
||||
import net.osmand.aidlapi.info.AppInfoParams;
|
||||
import net.osmand.aidlapi.lock.SetLockStateParams;
|
||||
import net.osmand.aidlapi.map.ALatLon;
|
||||
import net.osmand.aidlapi.map.SetMapLocationParams;
|
||||
|
@ -1122,6 +1123,7 @@ public class OsmandAidlServiceV2 extends Service implements AidlCallbackListener
|
|||
return UNKNOWN_API_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public long registerForKeyEvents(AKeyEventsParams params, final IOsmAndAidlCallback callback) {
|
||||
try {
|
||||
|
@ -1356,6 +1358,20 @@ public class OsmandAidlServiceV2 extends Service implements AidlCallbackListener
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPluginVersion(CustomPluginParams params) {
|
||||
try {
|
||||
OsmandAidlApi api = getApi("getPluginVersion");
|
||||
if (api != null) {
|
||||
return api.getPluginVersion(params.getPluginId());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
handleException(e);
|
||||
return UNKNOWN_API_ERROR;
|
||||
}
|
||||
return CANNOT_ACCESS_API_ERROR;
|
||||
}
|
||||
};
|
||||
|
||||
private void setCustomization(OsmandAidlApi api, CustomizationInfoParams params) {
|
||||
|
|
|
@ -17,16 +17,6 @@ import net.osmand.PlatformUtil;
|
|||
import net.osmand.data.LatLon;
|
||||
import net.osmand.map.ITileSource;
|
||||
import net.osmand.map.WorldRegion;
|
||||
import net.osmand.plus.settings.backend.ApplicationMode;
|
||||
import net.osmand.plus.settings.backend.backup.SettingsHelper;
|
||||
import net.osmand.plus.settings.backend.backup.AvoidRoadsSettingsItem;
|
||||
import net.osmand.plus.settings.backend.backup.MapSourcesSettingsItem;
|
||||
import net.osmand.plus.settings.backend.backup.PluginSettingsItem;
|
||||
import net.osmand.plus.settings.backend.backup.PoiUiFiltersSettingsItem;
|
||||
import net.osmand.plus.settings.backend.backup.ProfileSettingsItem;
|
||||
import net.osmand.plus.settings.backend.backup.QuickActionsSettingsItem;
|
||||
import net.osmand.plus.settings.backend.backup.SettingsHelper.SettingsCollectListener;
|
||||
import net.osmand.plus.settings.backend.backup.SettingsItem;
|
||||
import net.osmand.plus.download.DownloadActivityType;
|
||||
import net.osmand.plus.download.DownloadIndexesThread;
|
||||
import net.osmand.plus.download.DownloadResources;
|
||||
|
@ -35,6 +25,16 @@ import net.osmand.plus.helpers.AvoidSpecificRoads;
|
|||
import net.osmand.plus.poi.PoiUIFilter;
|
||||
import net.osmand.plus.quickaction.QuickAction;
|
||||
import net.osmand.plus.quickaction.QuickActionRegistry;
|
||||
import net.osmand.plus.settings.backend.ApplicationMode;
|
||||
import net.osmand.plus.settings.backend.backup.AvoidRoadsSettingsItem;
|
||||
import net.osmand.plus.settings.backend.backup.MapSourcesSettingsItem;
|
||||
import net.osmand.plus.settings.backend.backup.PluginSettingsItem;
|
||||
import net.osmand.plus.settings.backend.backup.PoiUiFiltersSettingsItem;
|
||||
import net.osmand.plus.settings.backend.backup.ProfileSettingsItem;
|
||||
import net.osmand.plus.settings.backend.backup.QuickActionsSettingsItem;
|
||||
import net.osmand.plus.settings.backend.backup.SettingsHelper;
|
||||
import net.osmand.plus.settings.backend.backup.SettingsHelper.SettingsCollectListener;
|
||||
import net.osmand.plus.settings.backend.backup.SettingsItem;
|
||||
import net.osmand.util.Algorithms;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
@ -73,9 +73,12 @@ public class CustomOsmandPlugin extends OsmandPlugin {
|
|||
private List<SuggestedDownloadItem> suggestedDownloadItems = new ArrayList<>();
|
||||
private List<WorldRegion> customRegions = new ArrayList<>();
|
||||
|
||||
private int version;
|
||||
|
||||
public CustomOsmandPlugin(@NonNull OsmandApplication app, @NonNull JSONObject json) throws JSONException {
|
||||
super(app);
|
||||
pluginId = json.getString("pluginId");
|
||||
version = json.optInt("version", -1);
|
||||
readAdditionalDataFromJson(json);
|
||||
readDependentFilesFromJson(json);
|
||||
loadResources();
|
||||
|
@ -86,6 +89,11 @@ public class CustomOsmandPlugin extends OsmandPlugin {
|
|||
return pluginId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return JsonUtils.getLocalizedResFromMap(app, names, app.getString(R.string.custom_osmand_plugin));
|
||||
|
|
|
@ -23,16 +23,15 @@ import net.osmand.PlatformUtil;
|
|||
import net.osmand.StateChangedListener;
|
||||
import net.osmand.data.LatLon;
|
||||
import net.osmand.plus.GPXDatabase.GpxDataItem;
|
||||
import net.osmand.plus.mapmarkers.MapMarkersHelper;
|
||||
import net.osmand.plus.mapmarkers.MapMarkersGroup;
|
||||
import net.osmand.plus.activities.SavingTrackHelper;
|
||||
import net.osmand.plus.helpers.GpxUiHelper;
|
||||
import net.osmand.plus.helpers.GpxUiHelper.GPXDataSetAxisType;
|
||||
import net.osmand.plus.helpers.GpxUiHelper.GPXDataSetType;
|
||||
import net.osmand.plus.routing.RouteProvider;
|
||||
import net.osmand.plus.helpers.enums.MetricsConstants;
|
||||
import net.osmand.plus.mapmarkers.MapMarkersGroup;
|
||||
import net.osmand.plus.mapmarkers.MapMarkersHelper;
|
||||
import net.osmand.plus.routing.RouteProvider;
|
||||
import net.osmand.plus.track.GpxSplitType;
|
||||
import net.osmand.plus.track.GradientScaleType;
|
||||
import net.osmand.util.Algorithms;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
@ -60,17 +59,13 @@ public class GpxSelectionHelper {
|
|||
private static final String BACKUP = "backup";
|
||||
private static final String BACKUPMODIFIEDTIME = "backupTime";
|
||||
private static final String COLOR = "color";
|
||||
private static final String WIDTH = "width";
|
||||
private static final String SELECTED_BY_USER = "selected_by_user";
|
||||
private static final String SHOW_ARROWS = "show_arrows";
|
||||
private static final String GRADIENT_SCALE_TYPE = "gradient_scale_type";
|
||||
private static final String SHOW_START_FINISH = "show_start_finish";
|
||||
|
||||
private OsmandApplication app;
|
||||
private SavingTrackHelper savingTrackHelper;
|
||||
@NonNull
|
||||
private List<SelectedGpxFile> selectedGPXFiles = new ArrayList<>();
|
||||
private Map<GPXFile, Long> selectedGpxFilesBackUp = new HashMap<>();
|
||||
private SavingTrackHelper savingTrackHelper;
|
||||
private SelectGpxTask selectGpxTask;
|
||||
private SelectedGpxFile trackToFollow;
|
||||
private StateChangedListener<String> followTrackListener;
|
||||
|
@ -231,22 +226,20 @@ public class GpxSelectionHelper {
|
|||
List<GpxDisplayGroup> groups = app.getSelectedGpxHelper().collectDisplayGroups(gpxFile);
|
||||
|
||||
GpxSplitType splitType = GpxSplitType.getSplitTypeByTypeId(dataItem.getSplitType());
|
||||
if (splitType != null) {
|
||||
if (splitType == GpxSplitType.NO_SPLIT) {
|
||||
for (GpxDisplayGroup model : groups) {
|
||||
model.noSplit(app);
|
||||
}
|
||||
} else if (splitType == GpxSplitType.DISTANCE) {
|
||||
for (GpxDisplayGroup model : groups) {
|
||||
model.splitByDistance(app, dataItem.getSplitInterval(), dataItem.isJoinSegments());
|
||||
}
|
||||
} else if (splitType == GpxSplitType.TIME) {
|
||||
for (GpxDisplayGroup model : groups) {
|
||||
model.splitByTime(app, (int) dataItem.getSplitInterval(), dataItem.isJoinSegments());
|
||||
}
|
||||
if (splitType == GpxSplitType.NO_SPLIT) {
|
||||
for (GpxDisplayGroup model : groups) {
|
||||
model.noSplit(app);
|
||||
}
|
||||
} else if (splitType == GpxSplitType.DISTANCE) {
|
||||
for (GpxDisplayGroup model : groups) {
|
||||
model.splitByDistance(app, dataItem.getSplitInterval(), dataItem.isJoinSegments());
|
||||
}
|
||||
} else if (splitType == GpxSplitType.TIME) {
|
||||
for (GpxDisplayGroup model : groups) {
|
||||
model.splitByTime(app, (int) dataItem.getSplitInterval(), dataItem.isJoinSegments());
|
||||
}
|
||||
selectedGpxFile.setDisplayGroups(groups, app);
|
||||
}
|
||||
selectedGpxFile.setDisplayGroups(groups, app);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -579,24 +572,6 @@ public class GpxSelectionHelper {
|
|||
int clr = parseColor(obj.getString(COLOR));
|
||||
gpx.setColor(clr);
|
||||
}
|
||||
for (GradientScaleType scaleType : GradientScaleType.values()) {
|
||||
if (obj.has(scaleType.getColorTypeName())) {
|
||||
int clr = parseColor(obj.getString(scaleType.getColorTypeName()));
|
||||
gpx.setGradientScaleColor(scaleType.getColorTypeName(), clr);
|
||||
}
|
||||
}
|
||||
if (obj.has(SHOW_ARROWS)) {
|
||||
gpx.setShowArrows(obj.optBoolean(SHOW_ARROWS, false));
|
||||
}
|
||||
if (obj.has(GRADIENT_SCALE_TYPE)) {
|
||||
gpx.setGradientScaleType(obj.optString(GRADIENT_SCALE_TYPE));
|
||||
}
|
||||
if (obj.has(SHOW_START_FINISH)) {
|
||||
gpx.setShowStartFinish(obj.optBoolean(SHOW_START_FINISH, true));
|
||||
}
|
||||
if (obj.has(WIDTH)) {
|
||||
gpx.setWidth(obj.getString(WIDTH));
|
||||
}
|
||||
if (gpx.error != null) {
|
||||
save = true;
|
||||
} else if (obj.has(BACKUP)) {
|
||||
|
@ -644,20 +619,6 @@ public class GpxSelectionHelper {
|
|||
if (s.gpxFile.getColor(0) != 0) {
|
||||
obj.put(COLOR, Algorithms.colorToString(s.gpxFile.getColor(0)));
|
||||
}
|
||||
if (s.gpxFile.getWidth(null) != null) {
|
||||
obj.put(WIDTH, s.gpxFile.getWidth(null));
|
||||
}
|
||||
if (s.gpxFile.getGradientScaleType() != null) {
|
||||
obj.put(GRADIENT_SCALE_TYPE, s.gpxFile.getGradientScaleType());
|
||||
}
|
||||
obj.put(SHOW_ARROWS, s.gpxFile.isShowArrows());
|
||||
obj.put(SHOW_START_FINISH, s.gpxFile.isShowStartFinish());
|
||||
for (GradientScaleType scaleType : GradientScaleType.values()) {
|
||||
int gradientScaleColor = s.gpxFile.getGradientScaleColor(scaleType.getColorTypeName(), 0);
|
||||
if (gradientScaleColor != 0) {
|
||||
obj.put(scaleType.getColorTypeName(), Algorithms.colorToString(gradientScaleColor));
|
||||
}
|
||||
}
|
||||
}
|
||||
obj.put(SELECTED_BY_USER, s.selectedByUser);
|
||||
} catch (JSONException e) {
|
||||
|
@ -710,23 +671,6 @@ public class GpxSelectionHelper {
|
|||
if (dataItem.getColor() != 0) {
|
||||
gpx.setColor(dataItem.getColor());
|
||||
}
|
||||
if (dataItem.getGradientSpeedColor() != 0) {
|
||||
gpx.setGradientScaleColor(GradientScaleType.SPEED.getColorTypeName(), dataItem.getGradientSpeedColor());
|
||||
}
|
||||
if (dataItem.getGradientAltitudeColor() != 0) {
|
||||
gpx.setGradientScaleColor(GradientScaleType.ALTITUDE.getColorTypeName(), dataItem.getGradientAltitudeColor());
|
||||
}
|
||||
if (dataItem.getGradientSlopeColor() != 0) {
|
||||
gpx.setGradientScaleColor(GradientScaleType.SLOPE.getColorTypeName(), dataItem.getGradientSlopeColor());
|
||||
}
|
||||
if (dataItem.getGradientScaleType() != null) {
|
||||
gpx.setGradientScaleType(dataItem.getGradientScaleType().getTypeName());
|
||||
}
|
||||
if (dataItem.getWidth() != null) {
|
||||
gpx.setWidth(dataItem.getWidth());
|
||||
}
|
||||
gpx.setShowArrows(dataItem.isShowArrows());
|
||||
gpx.setShowStartFinish(dataItem.isShowStartFinish());
|
||||
sf.setJoinSegments(dataItem.isJoinSegments());
|
||||
}
|
||||
sf.setGpxFile(gpx, app);
|
||||
|
|
|
@ -123,8 +123,8 @@ public abstract class OsmandPlugin {
|
|||
return null;
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return "";
|
||||
public int getVersion() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -340,6 +340,7 @@ public abstract class OsmandPlugin {
|
|||
try {
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("pluginId", plugin.getId());
|
||||
json.put("version", plugin.getVersion());
|
||||
plugin.writeAdditionalDataToJson(json);
|
||||
plugin.writeDependentFilesJson(json);
|
||||
itemsJson.put(json);
|
||||
|
|
|
@ -36,19 +36,17 @@ import java.util.List;
|
|||
|
||||
public class DownloadTilesDialog {
|
||||
|
||||
|
||||
private final static Log log = PlatformUtil.getLog(DownloadTilesDialog.class);
|
||||
private final static Log log = PlatformUtil.getLog(DownloadTilesDialog.class);
|
||||
private final Context ctx;
|
||||
private final OsmandApplication app;
|
||||
private final OsmandMapTileView mapView;
|
||||
|
||||
public DownloadTilesDialog(Context ctx, OsmandApplication app, OsmandMapTileView mapView){
|
||||
public DownloadTilesDialog(Context ctx, OsmandApplication app, OsmandMapTileView mapView) {
|
||||
this.ctx = ctx;
|
||||
this.app = app;
|
||||
this.mapView = mapView;
|
||||
}
|
||||
|
||||
|
||||
public void openDialog(){
|
||||
BaseMapLayer mainLayer = mapView.getMainLayer();
|
||||
if (!(mainLayer instanceof MapTileLayer) || !((MapTileLayer) mainLayer).isVisible()) {
|
||||
|
@ -77,7 +75,8 @@ public class DownloadTilesDialog {
|
|||
final TextView downloadText = ((TextView) view.findViewById(R.id.DownloadDescription));
|
||||
final String template = ctx.getString(R.string.tiles_to_download_estimated_size);
|
||||
|
||||
updateLabel(zoom, rb.getLatLonBounds(), downloadText, template, (int) slider.getValue());
|
||||
final boolean ellipticYTile = mapSource.isEllipticYTile();
|
||||
updateLabel(zoom, rb.getLatLonBounds(), downloadText, template, (int) slider.getValue(), ellipticYTile);
|
||||
if (max > zoom) {
|
||||
slider.setValueTo(max - zoom);
|
||||
int progress = (max - zoom) / 2;
|
||||
|
@ -85,7 +84,7 @@ public class DownloadTilesDialog {
|
|||
slider.addOnChangeListener(new Slider.OnChangeListener() {
|
||||
@Override
|
||||
public void onValueChange(@NonNull Slider slider, float value, boolean fromUser) {
|
||||
updateLabel(zoom, rb.getLatLonBounds(), downloadText, template, (int) value);
|
||||
updateLabel(zoom, rb.getLatLonBounds(), downloadText, template, (int) value, ellipticYTile);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -105,22 +104,16 @@ public class DownloadTilesDialog {
|
|||
private volatile boolean cancel = false;
|
||||
private IMapDownloaderCallback callback;
|
||||
|
||||
public void run(final int zoom, final int progress, final QuadRect latlonRect, final ITileSource map){
|
||||
public void run(final int zoom, final int progress, final QuadRect latlonRect, final ITileSource map) {
|
||||
cancel = false;
|
||||
int numberTiles = 0;
|
||||
for (int z = zoom; z <= progress + zoom; z++) {
|
||||
int x1 = (int) MapUtils.getTileNumberX(z, latlonRect.left);
|
||||
int x2 = (int) MapUtils.getTileNumberX(z, latlonRect.right);
|
||||
int y1 = (int) MapUtils.getTileNumberY(z, latlonRect.top);
|
||||
int y2 = (int) MapUtils.getTileNumberY(z, latlonRect.bottom);
|
||||
numberTiles += (x2 - x1 + 1) * (y2 - y1 + 1);
|
||||
}
|
||||
final boolean ellipticYTile = map.isEllipticYTile();
|
||||
int numberTiles = getNumberTiles(zoom, progress, latlonRect, ellipticYTile);
|
||||
final ProgressDialog progressDlg = new ProgressDialog(ctx);
|
||||
progressDlg.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
|
||||
progressDlg.setMessage(ctx.getString(R.string.shared_string_downloading));
|
||||
progressDlg.setCancelable(true);
|
||||
progressDlg.setMax(numberTiles);
|
||||
progressDlg.setOnCancelListener(new DialogInterface.OnCancelListener(){
|
||||
progressDlg.setOnCancelListener(new DialogInterface.OnCancelListener() {
|
||||
|
||||
@Override
|
||||
public void onCancel(DialogInterface dialog) {
|
||||
|
@ -152,8 +145,15 @@ public class DownloadTilesDialog {
|
|||
for (int z = zoom; z <= zoom + progress && !cancel; z++) {
|
||||
int x1 = (int) MapUtils.getTileNumberX(z, latlonRect.left);
|
||||
int x2 = (int) MapUtils.getTileNumberX(z, latlonRect.right);
|
||||
int y1 = (int) MapUtils.getTileNumberY(z, latlonRect.top);
|
||||
int y2 = (int) MapUtils.getTileNumberY(z, latlonRect.bottom);
|
||||
int y1;
|
||||
int y2;
|
||||
if (ellipticYTile) {
|
||||
y1 = (int) MapUtils.getTileEllipsoidNumberY(z, latlonRect.top);
|
||||
y2 = (int) MapUtils.getTileEllipsoidNumberY(z, latlonRect.bottom);
|
||||
} else {
|
||||
y1 = (int) MapUtils.getTileNumberY(z, latlonRect.top);
|
||||
y2 = (int) MapUtils.getTileNumberY(z, latlonRect.bottom);
|
||||
}
|
||||
for (int x = x1; x <= x2 && !cancel; x++) {
|
||||
for (int y = y1; y <= y2 && !cancel; y++) {
|
||||
String tileId = rm.calculateTileId(map, x, y, z);
|
||||
|
@ -178,7 +178,6 @@ public class DownloadTilesDialog {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if(cancel){
|
||||
instance.refuseAllPreviousRequests();
|
||||
|
@ -205,26 +204,34 @@ public class DownloadTilesDialog {
|
|||
}
|
||||
progressDlg.dismiss();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
new Thread(r, "Downloading tiles").start(); //$NON-NLS-1$
|
||||
progressDlg.show();
|
||||
}
|
||||
|
||||
private void updateLabel(final int zoom, final QuadRect latlonRect, final TextView downloadText,
|
||||
final String template, int progress, boolean ellipticYTile) {
|
||||
int numberTiles = getNumberTiles(zoom, progress, latlonRect, ellipticYTile);
|
||||
downloadText.setText(MessageFormat.format(template, (progress + zoom) + "",
|
||||
numberTiles, (double) numberTiles * 12 / 1000));
|
||||
}
|
||||
|
||||
private void updateLabel(final int zoom, final QuadRect latlonRect, final TextView downloadText, final String template, int progress) {
|
||||
private int getNumberTiles(int zoom, int progress, QuadRect latlonRect, boolean ellipticYTile) {
|
||||
int numberTiles = 0;
|
||||
for (int z = zoom; z <= progress + zoom; z++) {
|
||||
int x1 = (int) MapUtils.getTileNumberX(z, latlonRect.left);
|
||||
int x2 = (int) MapUtils.getTileNumberX(z, latlonRect.right);
|
||||
int y1 = (int) MapUtils.getTileNumberY(z, latlonRect.top);
|
||||
int y2 = (int) MapUtils.getTileNumberY(z, latlonRect.bottom);
|
||||
int y1;
|
||||
int y2;
|
||||
if (ellipticYTile) {
|
||||
y1 = (int) MapUtils.getTileEllipsoidNumberY(z, latlonRect.top);
|
||||
y2 = (int) MapUtils.getTileEllipsoidNumberY(z, latlonRect.bottom);
|
||||
} else {
|
||||
y1 = (int) MapUtils.getTileNumberY(z, latlonRect.top);
|
||||
y2 = (int) MapUtils.getTileNumberY(z, latlonRect.bottom);
|
||||
}
|
||||
numberTiles += (x2 - x1 + 1) * (y2 - y1 + 1);
|
||||
}
|
||||
downloadText.setText(MessageFormat.format(template, (progress + zoom)+"", //$NON-NLS-1$
|
||||
numberTiles, (double)numberTiles*12/1000));
|
||||
return numberTiles;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,6 +3,7 @@ package net.osmand.plus.activities;
|
|||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnDismissListener;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.net.Uri;
|
||||
|
@ -39,8 +40,6 @@ import net.osmand.plus.ContextMenuAdapter;
|
|||
import net.osmand.plus.ContextMenuAdapter.ItemClickListener;
|
||||
import net.osmand.plus.ContextMenuItem;
|
||||
import net.osmand.plus.ContextMenuItem.ItemBuilder;
|
||||
import net.osmand.plus.mapmarkers.MapMarkersHelper;
|
||||
import net.osmand.plus.mapmarkers.MapMarker;
|
||||
import net.osmand.plus.OsmAndLocationProvider;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.OsmandPlugin;
|
||||
|
@ -56,11 +55,14 @@ import net.osmand.plus.download.IndexItem;
|
|||
import net.osmand.plus.liveupdates.OsmLiveActivity;
|
||||
import net.osmand.plus.mapcontextmenu.AdditionalActionsBottomSheetDialogFragment;
|
||||
import net.osmand.plus.mapcontextmenu.AdditionalActionsBottomSheetDialogFragment.ContextMenuItemClickListener;
|
||||
import net.osmand.plus.mapmarkers.MapMarker;
|
||||
import net.osmand.plus.mapmarkers.MapMarkersDialogFragment;
|
||||
import net.osmand.plus.mapmarkers.MapMarkersHelper;
|
||||
import net.osmand.plus.mapmarkers.MarkersPlanRouteContext;
|
||||
import net.osmand.plus.measurementtool.MeasurementToolFragment;
|
||||
import net.osmand.plus.measurementtool.StartPlanRouteBottomSheet;
|
||||
import net.osmand.plus.monitoring.OsmandMonitoringPlugin;
|
||||
import net.osmand.plus.osmedit.dialogs.DismissRouteBottomSheetFragment;
|
||||
import net.osmand.plus.profiles.RoutingProfileDataObject;
|
||||
import net.osmand.plus.routepreparationmenu.MapRouteInfoMenu;
|
||||
import net.osmand.plus.routepreparationmenu.WaypointsFragment;
|
||||
|
@ -75,7 +77,6 @@ import net.osmand.plus.views.OsmandMapTileView;
|
|||
import net.osmand.plus.views.layers.MapControlsLayer;
|
||||
import net.osmand.plus.wikipedia.WikipediaDialogFragment;
|
||||
import net.osmand.plus.wikivoyage.WikivoyageWelcomeDialogFragment;
|
||||
import net.osmand.plus.wikivoyage.data.TravelDbHelper;
|
||||
import net.osmand.plus.wikivoyage.data.TravelHelper;
|
||||
import net.osmand.plus.wikivoyage.explore.WikivoyageExploreActivity;
|
||||
import net.osmand.router.GeneralRouter;
|
||||
|
@ -1122,26 +1123,12 @@ public class MapActivityActions implements DialogProvider {
|
|||
}
|
||||
}
|
||||
|
||||
public AlertDialog stopNavigationActionConfirm() {
|
||||
return stopNavigationActionConfirm(null);
|
||||
public void stopNavigationActionConfirm(@Nullable OnDismissListener listener) {
|
||||
stopNavigationActionConfirm(listener, null);
|
||||
}
|
||||
|
||||
public AlertDialog stopNavigationActionConfirm(final Runnable onStopAction) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mapActivity);
|
||||
// Stop the navigation
|
||||
builder.setTitle(getString(R.string.cancel_route));
|
||||
builder.setMessage(getString(R.string.stop_routing_confirm));
|
||||
builder.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
stopNavigationWithoutConfirm();
|
||||
if (onStopAction != null) {
|
||||
onStopAction.run();
|
||||
}
|
||||
}
|
||||
});
|
||||
builder.setNegativeButton(R.string.shared_string_no, null);
|
||||
return builder.show();
|
||||
public void stopNavigationActionConfirm(@Nullable OnDismissListener listener, @Nullable Runnable onStopAction) {
|
||||
DismissRouteBottomSheetFragment.showInstance(mapActivity.getSupportFragmentManager(), listener, onStopAction);
|
||||
}
|
||||
|
||||
public void whereAmIDialog() {
|
||||
|
|
|
@ -42,6 +42,8 @@ import net.osmand.plus.settings.fragments.BaseSettingsFragment.SettingsScreenTyp
|
|||
import org.apache.commons.logging.Log;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
public class PluginsFragment extends BaseOsmAndFragment implements PluginStateListener {
|
||||
|
||||
|
@ -138,6 +140,10 @@ public class PluginsFragment extends BaseOsmAndFragment implements PluginStateLi
|
|||
|
||||
private void switchEnabled(@NonNull ConnectedApp connectedApp) {
|
||||
app.getAidlApi().switchEnabled(connectedApp);
|
||||
OsmandPlugin plugin = OsmandPlugin.getPlugin(connectedApp.getPack());
|
||||
if (plugin != null) {
|
||||
OsmandPlugin.enablePlugin(getActivity(), app, plugin, connectedApp.isEnabled());
|
||||
}
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
|
@ -150,8 +156,26 @@ public class PluginsFragment extends BaseOsmAndFragment implements PluginStateLi
|
|||
|
||||
PluginsListAdapter(Context context) {
|
||||
super(context, R.layout.plugins_list_item, new ArrayList<>());
|
||||
addAll(app.getAidlApi().getConnectedApps());
|
||||
addAll(OsmandPlugin.getVisiblePlugins());
|
||||
addAll(getFilteredPluginsAndApps());
|
||||
}
|
||||
|
||||
private List<Object> getFilteredPluginsAndApps() {
|
||||
List<ConnectedApp> connectedApps = app.getAidlApi().getConnectedApps();
|
||||
List<OsmandPlugin> visiblePlugins = OsmandPlugin.getVisiblePlugins();
|
||||
|
||||
for (Iterator<OsmandPlugin> iterator = visiblePlugins.iterator(); iterator.hasNext(); ) {
|
||||
OsmandPlugin plugin = iterator.next();
|
||||
for (ConnectedApp app : connectedApps) {
|
||||
if (plugin.getId().equals(app.getPack())) {
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
List<Object> list = new ArrayList<>();
|
||||
list.addAll(connectedApps);
|
||||
list.addAll(visiblePlugins);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
|
|
|
@ -187,18 +187,27 @@ public abstract class MenuBottomSheetDialogFragment extends BottomSheetDialogFra
|
|||
|
||||
// 8dp is the shadow height
|
||||
boolean showTopShadow = screenHeight - statusBarHeight - mainView.getHeight() >= AndroidUtils.dpToPx(activity, 8);
|
||||
if (AndroidUiHelper.isOrientationPortrait(activity)) {
|
||||
AndroidUtils.setBackground(mainView, showTopShadow ? getPortraitBg(activity) : getColoredBg(activity));
|
||||
if (!showTopShadow) {
|
||||
mainView.setPadding(0, 0, 0, 0);
|
||||
}
|
||||
} else {
|
||||
AndroidUtils.setBackground(mainView, showTopShadow ? getLandscapeTopsidesBg(activity) : getLandscapeSidesBg(activity));
|
||||
}
|
||||
drawTopShadow(showTopShadow);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
protected void drawTopShadow(boolean showTopShadow) {
|
||||
final Activity activity = getActivity();
|
||||
View mainView = getView();
|
||||
if (activity == null || mainView == null) {
|
||||
return;
|
||||
}
|
||||
if (AndroidUiHelper.isOrientationPortrait(activity)) {
|
||||
AndroidUtils.setBackground(mainView, showTopShadow ? getPortraitBg(activity) : getColoredBg(activity));
|
||||
if (!showTopShadow) {
|
||||
mainView.setPadding(0, 0, 0, 0);
|
||||
}
|
||||
} else {
|
||||
AndroidUtils.setBackground(mainView, showTopShadow ? getLandscapeTopsidesBg(activity) : getLandscapeSidesBg(activity));
|
||||
}
|
||||
}
|
||||
|
||||
private int getContentHeight(int availableScreenHeight) {
|
||||
int customHeight = getCustomHeight();
|
||||
int buttonsHeight;
|
||||
|
@ -306,7 +315,7 @@ public abstract class MenuBottomSheetDialogFragment extends BottomSheetDialogFra
|
|||
}
|
||||
}
|
||||
|
||||
boolean useVerticalButtons() {
|
||||
protected boolean useVerticalButtons() {
|
||||
Activity activity = requireActivity();
|
||||
int rightBottomButtonTextId = getRightBottomButtonTextId();
|
||||
if (getDismissButtonTextId() != DEFAULT_VALUE && rightBottomButtonTextId != DEFAULT_VALUE) {
|
||||
|
|
|
@ -11,7 +11,6 @@ import android.widget.LinearLayout;
|
|||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
|
||||
import net.osmand.plus.R;
|
||||
|
@ -85,14 +84,13 @@ public class DashNavigationFragment extends DashBaseFragment {
|
|||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
AlertDialog dlg = map.getMapActions().stopNavigationActionConfirm();
|
||||
dlg.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
||||
|
||||
map.getMapActions().stopNavigationActionConfirm(new DialogInterface.OnDismissListener() {
|
||||
|
||||
@Override
|
||||
public void onDismiss(DialogInterface dialog) {
|
||||
setupNavigation();
|
||||
DashWaypointsFragment f = dashboard.getFragmentByClass(DashWaypointsFragment.class);
|
||||
if(f != null) {
|
||||
if (f != null) {
|
||||
f.onOpenDash();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,6 @@ import android.os.ParcelFileDescriptor;
|
|||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
@ -31,8 +30,6 @@ import net.osmand.data.PointDescription;
|
|||
import net.osmand.plus.FavouritesDbHelper;
|
||||
import net.osmand.plus.GpxSelectionHelper;
|
||||
import net.osmand.plus.GpxSelectionHelper.SelectedGpxFile;
|
||||
import net.osmand.plus.mapmarkers.MapMarkersHelper;
|
||||
import net.osmand.plus.mapmarkers.MapMarker;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.OsmandPlugin;
|
||||
import net.osmand.plus.R;
|
||||
|
@ -41,6 +38,8 @@ import net.osmand.plus.activities.MapActivity;
|
|||
import net.osmand.plus.activities.MapActivity.ShowQuickSearchMode;
|
||||
import net.osmand.plus.audionotes.AudioVideoNotesPlugin;
|
||||
import net.osmand.plus.mapcontextmenu.MapContextMenu;
|
||||
import net.osmand.plus.mapmarkers.MapMarker;
|
||||
import net.osmand.plus.mapmarkers.MapMarkersHelper;
|
||||
import net.osmand.plus.monitoring.OsmandMonitoringPlugin;
|
||||
import net.osmand.plus.quickaction.QuickAction;
|
||||
import net.osmand.plus.quickaction.QuickActionRegistry;
|
||||
|
@ -160,14 +159,6 @@ public class ExternalApiHelper {
|
|||
public static final String PARAM_QUICK_ACTION_PARAMS = "quick_action_params";
|
||||
public static final String PARAM_QUICK_ACTION_NUMBER = "quick_action_number";
|
||||
|
||||
public static final ApplicationMode[] VALID_PROFILES = new ApplicationMode[]{
|
||||
ApplicationMode.CAR,
|
||||
ApplicationMode.BICYCLE,
|
||||
ApplicationMode.PEDESTRIAN
|
||||
};
|
||||
|
||||
public static final ApplicationMode DEFAULT_PROFILE = ApplicationMode.CAR;
|
||||
|
||||
// RESULT_OK == -1
|
||||
// RESULT_CANCELED == 0
|
||||
// RESULT_FIRST_USER == 1
|
||||
|
@ -258,15 +249,8 @@ public class ExternalApiHelper {
|
|||
|
||||
} else if (API_CMD_NAVIGATE.equals(cmd)) {
|
||||
String profileStr = uri.getQueryParameter(PARAM_PROFILE);
|
||||
final ApplicationMode profile = ApplicationMode.valueOfStringKey(profileStr, DEFAULT_PROFILE);
|
||||
boolean validProfile = false;
|
||||
for (ApplicationMode mode : VALID_PROFILES) {
|
||||
if (mode == profile) {
|
||||
validProfile = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!validProfile) {
|
||||
final ApplicationMode profile = findNavigationProfile(app, profileStr);
|
||||
if (profile == null) {
|
||||
resultCode = RESULT_CODE_ERROR_INVALID_PROFILE;
|
||||
} else {
|
||||
String startName = uri.getQueryParameter(PARAM_START_NAME);
|
||||
|
@ -308,8 +292,7 @@ public class ExternalApiHelper {
|
|||
|
||||
final RoutingHelper routingHelper = app.getRoutingHelper();
|
||||
if (routingHelper.isFollowingMode() && !force) {
|
||||
AlertDialog dlg = mapActivity.getMapActions().stopNavigationActionConfirm();
|
||||
dlg.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
||||
mapActivity.getMapActions().stopNavigationActionConfirm(new DialogInterface.OnDismissListener() {
|
||||
|
||||
@Override
|
||||
public void onDismiss(DialogInterface dialog) {
|
||||
|
@ -325,19 +308,12 @@ public class ExternalApiHelper {
|
|||
|
||||
} else if (API_CMD_NAVIGATE_SEARCH.equals(cmd)) {
|
||||
String profileStr = uri.getQueryParameter(PARAM_PROFILE);
|
||||
final ApplicationMode profile = ApplicationMode.valueOfStringKey(profileStr, DEFAULT_PROFILE);
|
||||
boolean validProfile = false;
|
||||
for (ApplicationMode mode : VALID_PROFILES) {
|
||||
if (mode == profile) {
|
||||
validProfile = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
final ApplicationMode profile = findNavigationProfile(app, profileStr);
|
||||
final boolean showSearchResults = uri.getBooleanQueryParameter(PARAM_SHOW_SEARCH_RESULTS, false);
|
||||
final String searchQuery = uri.getQueryParameter(PARAM_DEST_SEARCH_QUERY);
|
||||
if (Algorithms.isEmpty(searchQuery)) {
|
||||
resultCode = RESULT_CODE_ERROR_EMPTY_SEARCH_QUERY;
|
||||
} else if (!validProfile) {
|
||||
} else if (profile == null) {
|
||||
resultCode = RESULT_CODE_ERROR_INVALID_PROFILE;
|
||||
} else {
|
||||
String startName = uri.getQueryParameter(PARAM_START_NAME);
|
||||
|
@ -375,8 +351,7 @@ public class ExternalApiHelper {
|
|||
|
||||
final RoutingHelper routingHelper = app.getRoutingHelper();
|
||||
if (routingHelper.isFollowingMode() && !force) {
|
||||
AlertDialog dlg = mapActivity.getMapActions().stopNavigationActionConfirm();
|
||||
dlg.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
||||
mapActivity.getMapActions().stopNavigationActionConfirm(new DialogInterface.OnDismissListener() {
|
||||
|
||||
@Override
|
||||
public void onDismiss(DialogInterface dialog) {
|
||||
|
@ -642,6 +617,18 @@ public class ExternalApiHelper {
|
|||
return result;
|
||||
}
|
||||
|
||||
private ApplicationMode findNavigationProfile(@NonNull OsmandApplication app, @Nullable String profileStr) {
|
||||
if (!ApplicationMode.DEFAULT.getStringKey().equals(profileStr)) {
|
||||
ApplicationMode profile = ApplicationMode.valueOfStringKey(profileStr, ApplicationMode.CAR);
|
||||
for (ApplicationMode mode : ApplicationMode.values(app)) {
|
||||
if (mode == profile && !Algorithms.isEmpty(mode.getRoutingProfile())) {
|
||||
return mode;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void saveAndNavigateGpx(MapActivity mapActivity, final GPXFile gpxFile, final boolean force) {
|
||||
final WeakReference<MapActivity> mapActivityRef = new WeakReference<>(mapActivity);
|
||||
|
||||
|
@ -657,7 +644,7 @@ public class ExternalApiHelper {
|
|||
gpxFile.path = destFile.getAbsolutePath();
|
||||
}
|
||||
|
||||
new SaveGpxAsyncTask(gpxFile, new SaveGpxListener() {
|
||||
new SaveGpxAsyncTask(new File(gpxFile.path), gpxFile, new SaveGpxListener() {
|
||||
@Override
|
||||
public void gpxSavingStarted() {
|
||||
|
||||
|
@ -677,8 +664,7 @@ public class ExternalApiHelper {
|
|||
}
|
||||
final RoutingHelper routingHelper = app.getRoutingHelper();
|
||||
if (routingHelper.isFollowingMode() && !force) {
|
||||
AlertDialog dlg = mapActivity.getMapActions().stopNavigationActionConfirm();
|
||||
dlg.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
||||
mapActivity.getMapActions().stopNavigationActionConfirm(new DialogInterface.OnDismissListener() {
|
||||
|
||||
@Override
|
||||
public void onDismiss(DialogInterface dialog) {
|
||||
|
@ -732,10 +718,10 @@ public class ExternalApiHelper {
|
|||
}
|
||||
|
||||
static private void startNavigation(MapActivity mapActivity,
|
||||
GPXFile gpx,
|
||||
LatLon from, PointDescription fromDesc,
|
||||
LatLon to, PointDescription toDesc,
|
||||
ApplicationMode mode) {
|
||||
GPXFile gpx,
|
||||
LatLon from, PointDescription fromDesc,
|
||||
LatLon to, PointDescription toDesc,
|
||||
ApplicationMode mode) {
|
||||
OsmandApplication app = mapActivity.getMyApplication();
|
||||
RoutingHelper routingHelper = app.getRoutingHelper();
|
||||
if (gpx == null) {
|
||||
|
|
|
@ -12,6 +12,7 @@ import android.content.Intent;
|
|||
import android.graphics.Typeface;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.text.SpannableString;
|
||||
|
@ -63,6 +64,7 @@ import com.github.mikephil.charting.utils.MPPointF;
|
|||
|
||||
import net.osmand.AndroidUtils;
|
||||
import net.osmand.CallbackWithObject;
|
||||
import net.osmand.FileUtils;
|
||||
import net.osmand.GPXUtilities;
|
||||
import net.osmand.GPXUtilities.Elevation;
|
||||
import net.osmand.GPXUtilities.GPXFile;
|
||||
|
@ -76,29 +78,33 @@ import net.osmand.plus.ContextMenuAdapter;
|
|||
import net.osmand.plus.ContextMenuItem;
|
||||
import net.osmand.plus.GPXDatabase.GpxDataItem;
|
||||
import net.osmand.plus.GpxDbHelper.GpxDataItemCallback;
|
||||
import net.osmand.plus.GpxSelectionHelper.GpxDisplayItem;
|
||||
import net.osmand.plus.GpxSelectionHelper.GpxDisplayGroup;
|
||||
import net.osmand.plus.GpxSelectionHelper.GpxDisplayItem;
|
||||
import net.osmand.plus.GpxSelectionHelper.SelectedGpxFile;
|
||||
import net.osmand.plus.OsmAndConstants;
|
||||
import net.osmand.plus.OsmAndFormatter;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.OsmandPlugin;
|
||||
import net.osmand.plus.activities.PluginsFragment;
|
||||
import net.osmand.plus.helpers.enums.MetricsConstants;
|
||||
import net.osmand.plus.helpers.enums.SpeedConstants;
|
||||
import net.osmand.plus.settings.backend.CommonPreference;
|
||||
import net.osmand.plus.settings.backend.OsmandSettings;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.UiUtilities;
|
||||
import net.osmand.plus.Version;
|
||||
import net.osmand.plus.activities.ActivityResultListener;
|
||||
import net.osmand.plus.activities.ActivityResultListener.OnActivityResultListener;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.activities.PluginsFragment;
|
||||
import net.osmand.plus.dialogs.ConfigureMapMenu;
|
||||
import net.osmand.plus.dialogs.GpxAppearanceAdapter;
|
||||
import net.osmand.plus.dialogs.GpxAppearanceAdapter.AppearanceListItem;
|
||||
import net.osmand.plus.helpers.enums.MetricsConstants;
|
||||
import net.osmand.plus.helpers.enums.SpeedConstants;
|
||||
import net.osmand.plus.monitoring.OsmandMonitoringPlugin;
|
||||
import net.osmand.plus.routing.RouteCalculationResult;
|
||||
import net.osmand.plus.settings.backend.CommonPreference;
|
||||
import net.osmand.plus.settings.backend.OsmandSettings;
|
||||
import net.osmand.plus.track.GpxSplitType;
|
||||
import net.osmand.plus.track.GradientScaleType;
|
||||
import net.osmand.plus.track.SaveGpxAsyncTask;
|
||||
import net.osmand.plus.track.SaveGpxAsyncTask.SaveGpxListener;
|
||||
import net.osmand.render.RenderingRuleProperty;
|
||||
import net.osmand.render.RenderingRulesStorage;
|
||||
import net.osmand.router.RouteStatisticsHelper;
|
||||
|
@ -245,7 +251,7 @@ public class GpxUiHelper {
|
|||
}
|
||||
|
||||
public static AlertDialog selectGPXFile(final Activity activity,
|
||||
final boolean showCurrentGpx, final boolean multipleChoice,
|
||||
final boolean showCurrentGpx, final boolean multipleChoice,
|
||||
final CallbackWithObject<GPXFile[]> callbackWithObject, boolean nightMode) {
|
||||
int dialogThemeRes = nightMode ? R.style.OsmandDarkTheme : R.style.OsmandLightTheme;
|
||||
OsmandApplication app = (OsmandApplication) activity.getApplication();
|
||||
|
@ -808,11 +814,9 @@ public class GpxUiHelper {
|
|||
View apprTitleView,
|
||||
String prefWidthValue,
|
||||
String prefColorValue) {
|
||||
TextView widthTextView = (TextView) apprTitleView.findViewById(R.id.widthTitle);
|
||||
ImageView colorImageView = (ImageView) apprTitleView.findViewById(R.id.colorImage);
|
||||
if (Algorithms.isEmpty(prefWidthValue)) {
|
||||
widthTextView.setText(AndroidUtils.getRenderingStringPropertyValue(activity, trackWidthProp.getDefaultValueDescription()));
|
||||
} else {
|
||||
TextView widthTextView = apprTitleView.findViewById(R.id.widthTitle);
|
||||
ImageView colorImageView = apprTitleView.findViewById(R.id.colorImage);
|
||||
if (!Algorithms.isEmpty(prefWidthValue)) {
|
||||
widthTextView.setText(AndroidUtils.getRenderingStringPropertyValue(activity, prefWidthValue));
|
||||
}
|
||||
int color = GpxAppearanceAdapter.parseTrackColor(renderer, prefColorValue);
|
||||
|
@ -2133,6 +2137,90 @@ public class GpxUiHelper {
|
|||
return gpxItem;
|
||||
}
|
||||
|
||||
public static void saveAndShareGpx(@NonNull final Context context, @NonNull final GPXFile gpxFile) {
|
||||
OsmandApplication app = (OsmandApplication) context.getApplicationContext();
|
||||
File tempDir = FileUtils.getTempDir(app);
|
||||
String fileName = Algorithms.getFileWithoutDirs(gpxFile.path);
|
||||
final File file = new File(tempDir, fileName);
|
||||
SaveGpxListener listener = new SaveGpxListener() {
|
||||
@Override
|
||||
public void gpxSavingStarted() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void gpxSavingFinished(Exception errorMessage) {
|
||||
if (errorMessage == null) {
|
||||
shareGpx(context, file);
|
||||
}
|
||||
}
|
||||
};
|
||||
new SaveGpxAsyncTask(file, gpxFile, listener).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||
}
|
||||
|
||||
public static void saveAndShareGpxWithAppearance(@NonNull final Context context, @NonNull final GPXFile gpxFile) {
|
||||
OsmandApplication app = (OsmandApplication) context.getApplicationContext();
|
||||
GpxDataItem dataItem = getDataItem(app, gpxFile);
|
||||
if (dataItem != null) {
|
||||
addAppearanceToGpx(gpxFile, dataItem);
|
||||
saveAndShareGpx(app, gpxFile);
|
||||
}
|
||||
}
|
||||
|
||||
private static GpxDataItem getDataItem(@NonNull final OsmandApplication app, @NonNull final GPXFile gpxFile) {
|
||||
GpxDataItemCallback itemCallback = new GpxDataItemCallback() {
|
||||
@Override
|
||||
public boolean isCancelled() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGpxDataItemReady(GpxDataItem item) {
|
||||
addAppearanceToGpx(gpxFile, item);
|
||||
saveAndShareGpx(app, gpxFile);
|
||||
}
|
||||
};
|
||||
return app.getGpxDbHelper().getItem(new File(gpxFile.path), itemCallback);
|
||||
}
|
||||
|
||||
private static void addAppearanceToGpx(@NonNull GPXFile gpxFile, @NonNull GpxDataItem dataItem) {
|
||||
gpxFile.setShowArrows(dataItem.isShowArrows());
|
||||
gpxFile.setShowStartFinish(dataItem.isShowStartFinish());
|
||||
gpxFile.setSplitInterval(dataItem.getSplitInterval());
|
||||
gpxFile.setSplitType(GpxSplitType.getSplitTypeByTypeId(dataItem.getSplitType()).getTypeName());
|
||||
if (dataItem.getColor() != 0) {
|
||||
gpxFile.setColor(dataItem.getColor());
|
||||
}
|
||||
if (dataItem.getWidth() != null) {
|
||||
gpxFile.setWidth(dataItem.getWidth());
|
||||
}
|
||||
if (dataItem.getGradientSpeedColor() != 0) {
|
||||
gpxFile.setGradientScaleColor(GradientScaleType.SPEED.getColorTypeName(), dataItem.getGradientSpeedColor());
|
||||
}
|
||||
if (dataItem.getGradientSlopeColor() != 0) {
|
||||
gpxFile.setGradientScaleColor(GradientScaleType.SLOPE.getColorTypeName(), dataItem.getGradientSlopeColor());
|
||||
}
|
||||
if (dataItem.getGradientAltitudeColor() != 0) {
|
||||
gpxFile.setGradientScaleColor(GradientScaleType.ALTITUDE.getColorTypeName(), dataItem.getGradientAltitudeColor());
|
||||
}
|
||||
if (dataItem.getGradientScaleType() != null) {
|
||||
gpxFile.setGradientScaleType(dataItem.getGradientScaleType().name());
|
||||
}
|
||||
}
|
||||
|
||||
public static void shareGpx(@NonNull Context context, @NonNull File file) {
|
||||
Uri fileUri = AndroidUtils.getUriForFile(context, file);
|
||||
Intent sendIntent = new Intent(Intent.ACTION_SEND);
|
||||
sendIntent.putExtra(Intent.EXTRA_STREAM, fileUri);
|
||||
sendIntent.setType("application/gpx+xml");
|
||||
sendIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
if (context instanceof OsmandApplication) {
|
||||
sendIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
}
|
||||
if (AndroidUtils.isIntentSafe(context, sendIntent)) {
|
||||
context.startActivity(sendIntent);
|
||||
}
|
||||
}
|
||||
|
||||
public static class GPXInfo {
|
||||
private String fileName;
|
||||
|
|
|
@ -70,6 +70,7 @@ import static net.osmand.plus.myplaces.FavoritesActivity.GPX_TAB;
|
|||
import static net.osmand.plus.myplaces.FavoritesActivity.TAB_ID;
|
||||
import static net.osmand.plus.settings.backend.backup.SettingsHelper.REPLACE_KEY;
|
||||
import static net.osmand.plus.settings.backend.backup.SettingsHelper.SETTINGS_TYPE_LIST_KEY;
|
||||
import static net.osmand.plus.settings.backend.backup.SettingsHelper.SILENT_IMPORT_KEY;
|
||||
|
||||
/**
|
||||
* @author Koen Rabaey
|
||||
|
@ -210,7 +211,7 @@ public class ImportHelper {
|
|||
public static String getNameFromContentUri(OsmandApplication app, Uri contentUri) {
|
||||
try {
|
||||
String name;
|
||||
Cursor returnCursor = app.getContentResolver().query(contentUri, new String[]{OpenableColumns.DISPLAY_NAME}, null, null, null);
|
||||
Cursor returnCursor = app.getContentResolver().query(contentUri, new String[] {OpenableColumns.DISPLAY_NAME}, null, null, null);
|
||||
if (returnCursor != null && returnCursor.moveToFirst()) {
|
||||
int columnIndex = returnCursor.getColumnIndex(OpenableColumns.DISPLAY_NAME);
|
||||
if (columnIndex != -1) {
|
||||
|
@ -267,6 +268,7 @@ public class ImportHelper {
|
|||
int version = extras.getInt(SettingsHelper.SETTINGS_VERSION_KEY, -1);
|
||||
String latestChanges = extras.getString(SettingsHelper.SETTINGS_LATEST_CHANGES_KEY);
|
||||
boolean replace = extras.getBoolean(REPLACE_KEY);
|
||||
boolean silentImport = extras.getBoolean(SILENT_IMPORT_KEY);
|
||||
ArrayList<String> settingsTypeKeys = extras.getStringArrayList(SETTINGS_TYPE_LIST_KEY);
|
||||
List<ExportSettingsType> settingsTypes = null;
|
||||
if (settingsTypeKeys != null) {
|
||||
|
@ -275,18 +277,18 @@ public class ImportHelper {
|
|||
settingsTypes.add(ExportSettingsType.valueOf(key));
|
||||
}
|
||||
}
|
||||
handleOsmAndSettingsImport(intentUri, fileName, settingsTypes, replace, latestChanges, version, callback);
|
||||
handleOsmAndSettingsImport(intentUri, fileName, settingsTypes, replace, silentImport, latestChanges, version, callback);
|
||||
} else {
|
||||
handleOsmAndSettingsImport(intentUri, fileName, null, false, null, -1,
|
||||
handleOsmAndSettingsImport(intentUri, fileName, null, false, false, null, -1,
|
||||
callback);
|
||||
}
|
||||
}
|
||||
|
||||
protected void handleOsmAndSettingsImport(Uri uri, String name, final List<ExportSettingsType> settingsTypes,
|
||||
final boolean replace, String latestChanges, int version,
|
||||
CallbackWithObject<List<SettingsItem>> callback) {
|
||||
executeImportTask(new SettingsImportTask(activity, uri, name, settingsTypes, replace, latestChanges, version,
|
||||
callback));
|
||||
final boolean replace, boolean silentImport, String latestChanges, int version,
|
||||
CallbackWithObject<List<SettingsItem>> callback) {
|
||||
executeImportTask(new SettingsImportTask(activity, uri, name, settingsTypes, replace, silentImport,
|
||||
latestChanges, version, callback));
|
||||
}
|
||||
|
||||
protected void handleXmlFileImport(Uri intentUri, String fileName, CallbackWithObject routingCallback) {
|
||||
|
|
|
@ -17,10 +17,9 @@ import net.osmand.plus.R;
|
|||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.base.BaseLoadAsyncTask;
|
||||
import net.osmand.plus.settings.backend.ExportSettingsType;
|
||||
import net.osmand.plus.settings.backend.backup.PluginSettingsItem;
|
||||
import net.osmand.plus.settings.backend.backup.SettingsHelper;
|
||||
import net.osmand.plus.settings.backend.backup.SettingsHelper.CheckDuplicatesListener;
|
||||
import net.osmand.plus.settings.backend.backup.PluginSettingsItem;
|
||||
import net.osmand.plus.settings.backend.backup.ProfileSettingsItem;
|
||||
import net.osmand.plus.settings.backend.backup.SettingsHelper.SettingsCollectListener;
|
||||
import net.osmand.plus.settings.backend.backup.SettingsHelper.SettingsImportListener;
|
||||
import net.osmand.plus.settings.backend.backup.SettingsItem;
|
||||
|
@ -42,19 +41,21 @@ class SettingsImportTask extends BaseLoadAsyncTask<Void, Void, String> {
|
|||
private String name;
|
||||
private List<ExportSettingsType> settingsTypes;
|
||||
private boolean replace;
|
||||
private boolean silentImport;
|
||||
private String latestChanges;
|
||||
private int version;
|
||||
private CallbackWithObject<List<SettingsItem>> callback;
|
||||
|
||||
public SettingsImportTask(@NonNull FragmentActivity activity, @NonNull Uri uri,
|
||||
@NonNull String name, List<ExportSettingsType> settingsTypes,
|
||||
boolean replace, String latestChanges, int version,
|
||||
CallbackWithObject<List<SettingsItem>> callback) {
|
||||
@NonNull String name, List<ExportSettingsType> settingsTypes,
|
||||
boolean replace, boolean silentImport, String latestChanges, int version,
|
||||
CallbackWithObject<List<SettingsItem>> callback) {
|
||||
super(activity);
|
||||
this.uri = uri;
|
||||
this.name = name;
|
||||
this.settingsTypes = settingsTypes;
|
||||
this.replace = replace;
|
||||
this.silentImport = silentImport;
|
||||
this.latestChanges = latestChanges;
|
||||
this.version = version;
|
||||
this.callback = callback;
|
||||
|
@ -93,7 +94,7 @@ class SettingsImportTask extends BaseLoadAsyncTask<Void, Void, String> {
|
|||
if (!pluginIndependentItems.isEmpty()) {
|
||||
if (settingsTypes == null) {
|
||||
FragmentActivity activity = activityRef.get();
|
||||
if (activity != null) {
|
||||
if (!silentImport && activity != null) {
|
||||
FragmentManager fragmentManager = activity.getSupportFragmentManager();
|
||||
ImportSettingsFragment.showInstance(fragmentManager, pluginIndependentItems, file);
|
||||
}
|
||||
|
@ -141,7 +142,7 @@ class SettingsImportTask extends BaseLoadAsyncTask<Void, Void, String> {
|
|||
((MapActivity) activity).getMapLayers().getMapWidgetRegistry().updateVisibleWidgets();
|
||||
((MapActivity) activity).updateApplicationModeSettings();
|
||||
}
|
||||
if (file != null && activity != null) {
|
||||
if (!silentImport && file != null && activity != null) {
|
||||
FragmentManager fm = activity.getSupportFragmentManager();
|
||||
ImportCompleteFragment.showInstance(fm, items, file.getName());
|
||||
}
|
||||
|
@ -174,11 +175,6 @@ class SettingsImportTask extends BaseLoadAsyncTask<Void, Void, String> {
|
|||
CustomOsmandPlugin plugin = pluginItem.getPlugin();
|
||||
plugin.loadResources();
|
||||
|
||||
for (SettingsItem item : items) {
|
||||
if (item instanceof ProfileSettingsItem) {
|
||||
((ProfileSettingsItem) item).applyAdditionalPrefs();
|
||||
}
|
||||
}
|
||||
if (!Algorithms.isEmpty(plugin.getDownloadMaps())) {
|
||||
app.getDownloadThread().runReloadIndexFilesSilent();
|
||||
}
|
||||
|
@ -188,11 +184,14 @@ class SettingsImportTask extends BaseLoadAsyncTask<Void, Void, String> {
|
|||
if (!Algorithms.isEmpty(plugin.getRouterNames())) {
|
||||
loadRoutingFiles(app, null);
|
||||
}
|
||||
if (activity != null) {
|
||||
if (!silentImport && activity != null) {
|
||||
plugin.onInstall(app, activity);
|
||||
}
|
||||
String pluginId = pluginItem.getPluginId();
|
||||
File pluginDir = new File(app.getAppPath(null), IndexConstants.PLUGINS_DIR + pluginId);
|
||||
File pluginDir = app.getAppPath(IndexConstants.PLUGINS_DIR + pluginId);
|
||||
if (!pluginDir.exists()) {
|
||||
pluginDir.mkdirs();
|
||||
}
|
||||
app.getSettingsHelper().exportSettings(pluginDir, "items", null, items, false);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -86,7 +86,7 @@ public class ZipImportTask extends BaseLoadAsyncTask<Void, Void, ImportType> {
|
|||
} else if (importType == ImportType.SETTINGS) {
|
||||
String name = createUniqueFileName(app, "settings", TEMP_DIR, OSMAND_SETTINGS_FILE_EXT);
|
||||
importHelper.handleOsmAndSettingsImport(uri, name + OSMAND_SETTINGS_FILE_EXT,
|
||||
null, false, null, -1, null);
|
||||
null, false, false, null, -1, null);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,10 +1,8 @@
|
|||
package net.osmand.plus.mapcontextmenu.controllers;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
@ -39,7 +37,7 @@ public class SelectedGpxMenuController extends MenuController {
|
|||
private SelectedGpxPoint selectedGpxPoint;
|
||||
|
||||
public SelectedGpxMenuController(@NonNull final MapActivity mapActivity, @NonNull PointDescription pointDescription,
|
||||
@NonNull final SelectedGpxPoint selectedGpxPoint) {
|
||||
@NonNull final SelectedGpxPoint selectedGpxPoint) {
|
||||
super(new SelectedGpxMenuBuilder(mapActivity, selectedGpxPoint), pointDescription, mapActivity);
|
||||
this.selectedGpxPoint = selectedGpxPoint;
|
||||
builder.setShowOnlinePhotos(false);
|
||||
|
@ -209,24 +207,11 @@ public class SelectedGpxMenuController extends MenuController {
|
|||
if (mapActivity != null && selectedGpxPoint != null) {
|
||||
final GPXFile gpxFile = selectedGpxPoint.getSelectedGpxFile().getGpxFile();
|
||||
if (gpxFile != null) {
|
||||
OsmandApplication app = mapActivity.getMyApplication();
|
||||
if (Algorithms.isEmpty(gpxFile.path)) {
|
||||
SaveGpxListener saveGpxListener = new SaveGpxListener() {
|
||||
@Override
|
||||
public void gpxSavingStarted() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void gpxSavingFinished(Exception errorMessage) {
|
||||
MapActivity mapActivity = getMapActivity();
|
||||
if (mapActivity != null) {
|
||||
shareGpx(mapActivity, gpxFile.path);
|
||||
}
|
||||
}
|
||||
};
|
||||
new SaveCurrentTrackTask(mapActivity.getMyApplication(), gpxFile, saveGpxListener).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||
saveAndShareCurrentGpx(app, gpxFile);
|
||||
} else {
|
||||
shareGpx(mapActivity, gpxFile.path);
|
||||
GpxUiHelper.saveAndShareGpxWithAppearance(app, gpxFile);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -234,15 +219,21 @@ public class SelectedGpxMenuController extends MenuController {
|
|||
}
|
||||
}
|
||||
|
||||
private void shareGpx(@NonNull Context context, @NonNull String path) {
|
||||
final Uri fileUri = AndroidUtils.getUriForFile(context, new File(path));
|
||||
final Intent sendIntent = new Intent(Intent.ACTION_SEND);
|
||||
sendIntent.putExtra(Intent.EXTRA_STREAM, fileUri);
|
||||
sendIntent.setType("application/gpx+xml");
|
||||
sendIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
if (AndroidUtils.isIntentSafe(context, sendIntent)) {
|
||||
context.startActivity(sendIntent);
|
||||
}
|
||||
public void saveAndShareCurrentGpx(@NonNull final OsmandApplication app, @NonNull final GPXFile gpxFile) {
|
||||
SaveGpxListener saveGpxListener = new SaveGpxListener() {
|
||||
@Override
|
||||
public void gpxSavingStarted() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void gpxSavingFinished(Exception errorMessage) {
|
||||
if (errorMessage == null) {
|
||||
GpxUiHelper.shareGpx(app, new File(gpxFile.path));
|
||||
}
|
||||
}
|
||||
};
|
||||
new SaveCurrentTrackTask(app, gpxFile, saveGpxListener).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||
}
|
||||
|
||||
public static class SelectedGpxPoint {
|
||||
|
|
|
@ -30,6 +30,7 @@ import net.osmand.plus.track.SaveGpxAsyncTask;
|
|||
import net.osmand.plus.track.SaveGpxAsyncTask.SaveGpxListener;
|
||||
import net.osmand.util.Algorithms;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Map;
|
||||
|
||||
public class WptPtEditorFragment extends PointEditorFragment {
|
||||
|
@ -379,7 +380,7 @@ public class WptPtEditorFragment extends PointEditorFragment {
|
|||
}
|
||||
|
||||
private void saveGpx(final OsmandApplication app, final GPXFile gpxFile, final boolean gpxSelected) {
|
||||
new SaveGpxAsyncTask(gpxFile, new SaveGpxListener() {
|
||||
new SaveGpxAsyncTask(new File(gpxFile.path), gpxFile, new SaveGpxListener() {
|
||||
@Override
|
||||
public void gpxSavingStarted() {
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ import net.osmand.plus.track.SaveGpxAsyncTask;
|
|||
import net.osmand.plus.track.SaveGpxAsyncTask.SaveGpxListener;
|
||||
import net.osmand.util.Algorithms;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
@ -482,7 +483,7 @@ public class WptPtEditorFragmentNew extends PointEditorFragmentNew {
|
|||
}
|
||||
|
||||
private void saveGpx(final OsmandApplication app, final GPXFile gpxFile, final boolean gpxSelected) {
|
||||
new SaveGpxAsyncTask(gpxFile, new SaveGpxListener() {
|
||||
new SaveGpxAsyncTask(new File(gpxFile.path), gpxFile, new SaveGpxListener() {
|
||||
@Override
|
||||
public void gpxSavingStarted() {
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ public class LoginBottomSheetFragment extends MenuBottomSheetDialogFragment impl
|
|||
if (!(getActivity() instanceof MapActivity) && fragment instanceof OsmAuthorizationListener) {
|
||||
osmOAuthHelper.addListener((OsmAuthorizationListener) fragment);
|
||||
}
|
||||
osmOAuthHelper.startOAuth((ViewGroup) view);
|
||||
osmOAuthHelper.startOAuth((ViewGroup) view, nightMode);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -281,46 +281,23 @@ public class MeasurementEditingContext {
|
|||
}
|
||||
|
||||
public boolean isApproximationNeeded() {
|
||||
boolean hasDefaultPoints = false;
|
||||
boolean hasDefaultPointsOnly = false;
|
||||
boolean newData = isNewData();
|
||||
if (!newData) {
|
||||
List<WptPt> points = getPoints();
|
||||
WptPt prevPoint = null;
|
||||
hasDefaultPointsOnly = true;
|
||||
for (WptPt point : points) {
|
||||
if (!point.hasProfile() && (prevPoint == null || !prevPoint.hasProfile())) {
|
||||
hasDefaultPoints = true;
|
||||
if (point.hasProfile()) {
|
||||
hasDefaultPointsOnly = false;
|
||||
break;
|
||||
}
|
||||
prevPoint = point;
|
||||
}
|
||||
}
|
||||
return !newData && hasDefaultPoints && getPoints().size() > 2;
|
||||
return !newData && hasDefaultPointsOnly && getPoints().size() > 2;
|
||||
}
|
||||
|
||||
public boolean isSelectionNeedApproximation() {
|
||||
boolean hasDefaultPoints = false;
|
||||
boolean newData = isNewData();
|
||||
if (!newData && selectedPointPosition != -1) {
|
||||
WptPt selectedPoint = getPoints().get(selectedPointPosition);
|
||||
List<TrkSegment> segments = getBeforeSegments();
|
||||
List<WptPt> points = null;
|
||||
for (TrkSegment segment : segments) {
|
||||
if (segment.points.contains(selectedPoint)) {
|
||||
points = segment.points;
|
||||
}
|
||||
}
|
||||
WptPt prevPoint = null;
|
||||
if (points != null) {
|
||||
for (WptPt point : points) {
|
||||
if (!point.hasProfile() && (prevPoint == null || !prevPoint.hasProfile())) {
|
||||
hasDefaultPoints = true;
|
||||
break;
|
||||
}
|
||||
prevPoint = point;
|
||||
}
|
||||
}
|
||||
}
|
||||
return !newData && hasDefaultPoints && getPoints().size() > 2;
|
||||
public boolean isAddNewSegmentAllowed() {
|
||||
return beforeSegments.size() > 0 && beforeSegments.get(beforeSegments.size() - 1).points.size() >= 2;
|
||||
}
|
||||
|
||||
public void clearSnappedToRoadPoints() {
|
||||
|
@ -432,13 +409,19 @@ public class MeasurementEditingContext {
|
|||
if (position > 0 && position <= points.size()) {
|
||||
WptPt prevPt = points.get(position - 1);
|
||||
if (prevPt.isGap()) {
|
||||
point.setGap();
|
||||
if (position > 1) {
|
||||
WptPt pt = points.get(position - 2);
|
||||
if (pt.hasProfile()) {
|
||||
prevPt.setProfileType(pt.getProfileType());
|
||||
} else {
|
||||
prevPt.removeProfileType();
|
||||
if (position == points.size() && getAfterPoints().size() == 0) {
|
||||
if (appMode != MeasurementEditingContext.DEFAULT_APP_MODE) {
|
||||
point.setProfileType(appMode.getStringKey());
|
||||
}
|
||||
} else {
|
||||
point.setGap();
|
||||
if (position > 1) {
|
||||
WptPt pt = points.get(position - 2);
|
||||
if (pt.hasProfile()) {
|
||||
prevPt.setProfileType(pt.getProfileType());
|
||||
} else {
|
||||
prevPt.removeProfileType();
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (prevPt.hasProfile()) {
|
||||
|
@ -542,6 +525,45 @@ public class MeasurementEditingContext {
|
|||
clearAfterSegments();
|
||||
}
|
||||
|
||||
public void splitPoints(int selectedPointPosition, boolean after) {
|
||||
int pointIndex = after ? selectedPointPosition : selectedPointPosition - 1;
|
||||
if (pointIndex >= 0 && pointIndex < before.points.size()) {
|
||||
WptPt point = before.points.get(pointIndex);
|
||||
WptPt nextPoint = before.points.size() > pointIndex + 1 ? before.points.get(pointIndex + 1) : null;
|
||||
WptPt newPoint = new WptPt(point);
|
||||
newPoint.copyExtensions(point);
|
||||
newPoint.setGap();
|
||||
before.points.remove(pointIndex);
|
||||
before.points.add(pointIndex, newPoint);
|
||||
if (newPoint != null) {
|
||||
roadSegmentData.remove(new Pair<>(point, nextPoint));
|
||||
}
|
||||
updateSegmentsForSnap(false);
|
||||
}
|
||||
}
|
||||
|
||||
public void joinPoints(int selectedPointPosition) {
|
||||
WptPt gapPoint = null;
|
||||
int gapIndex = -1;
|
||||
if (isFirstPointSelected(selectedPointPosition, false)) {
|
||||
if (selectedPointPosition - 1 >= 0) {
|
||||
gapPoint = before.points.get(selectedPointPosition - 1);
|
||||
gapIndex = selectedPointPosition - 1;
|
||||
}
|
||||
} else if (isLastPointSelected(selectedPointPosition, false)) {
|
||||
gapPoint = before.points.get(selectedPointPosition);
|
||||
gapIndex = selectedPointPosition;
|
||||
}
|
||||
if (gapPoint != null) {
|
||||
WptPt newPoint = new WptPt(gapPoint);
|
||||
newPoint.copyExtensions(gapPoint);
|
||||
newPoint.removeProfileType();
|
||||
before.points.remove(gapIndex);
|
||||
before.points.add(gapIndex, newPoint);
|
||||
updateSegmentsForSnap(false);
|
||||
}
|
||||
}
|
||||
|
||||
public void clearSegments() {
|
||||
clearBeforeSegments();
|
||||
clearAfterSegments();
|
||||
|
@ -562,15 +584,43 @@ public class MeasurementEditingContext {
|
|||
}
|
||||
}
|
||||
|
||||
public boolean isFirstPointSelected() {
|
||||
return isBorderPointSelected(true);
|
||||
public boolean canSplit(boolean after) {
|
||||
WptPt selectedPoint = getPoints().get(selectedPointPosition);
|
||||
List<TrkSegment> segments = getBeforeSegments();
|
||||
for (TrkSegment segment : segments) {
|
||||
int i = segment.points.indexOf(selectedPoint);
|
||||
if (i != -1) {
|
||||
return after ? i < segment.points.size() - 2 : i > 1;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isLastPointSelected() {
|
||||
return isBorderPointSelected(false);
|
||||
public boolean isFirstPointSelected(boolean outer) {
|
||||
return isFirstPointSelected(selectedPointPosition, outer);
|
||||
}
|
||||
|
||||
private boolean isBorderPointSelected(boolean first) {
|
||||
public boolean isFirstPointSelected(int selectedPointPosition, boolean outer) {
|
||||
if (outer) {
|
||||
return selectedPointPosition == 0;
|
||||
} else {
|
||||
return isBorderPointSelected(selectedPointPosition, true);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isLastPointSelected(boolean outer) {
|
||||
return isLastPointSelected(selectedPointPosition, outer);
|
||||
}
|
||||
|
||||
public boolean isLastPointSelected(int selectedPointPosition, boolean outer) {
|
||||
if (outer) {
|
||||
return selectedPointPosition == getPoints().size() - 1;
|
||||
} else {
|
||||
return isBorderPointSelected(selectedPointPosition, false);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isBorderPointSelected(int selectedPointPosition, boolean first) {
|
||||
WptPt selectedPoint = getPoints().get(selectedPointPosition);
|
||||
List<TrkSegment> segments = getBeforeSegments();
|
||||
int count = 0;
|
||||
|
@ -625,7 +675,7 @@ public class MeasurementEditingContext {
|
|||
WptPt startPoint = points.get(i);
|
||||
WptPt endPoint = points.get(i + 1);
|
||||
Pair<WptPt, WptPt> pair = new Pair<>(startPoint, endPoint);
|
||||
if (roadSegmentData.get(pair) == null && startPoint.hasProfile()) {
|
||||
if (roadSegmentData.get(pair) == null && (startPoint.hasProfile() || hasRoute())) {
|
||||
res.add(pair);
|
||||
}
|
||||
}
|
||||
|
@ -740,7 +790,7 @@ public class MeasurementEditingContext {
|
|||
pairPoints.add(points.get(j));
|
||||
prevPointIndex = j;
|
||||
}
|
||||
if (points.size() > prevPointIndex + 1) {
|
||||
if (points.size() > prevPointIndex + 1 && i == routePoints.size() - 2) {
|
||||
pairPoints.add(points.get(prevPointIndex + 1));
|
||||
}
|
||||
Iterator<RouteSegmentResult> it = routeSegments.iterator();
|
||||
|
|
|
@ -65,11 +65,13 @@ import net.osmand.plus.measurementtool.command.ApplyGpxApproximationCommand;
|
|||
import net.osmand.plus.measurementtool.command.ChangeRouteModeCommand;
|
||||
import net.osmand.plus.measurementtool.command.ChangeRouteModeCommand.ChangeRouteType;
|
||||
import net.osmand.plus.measurementtool.command.ClearPointsCommand;
|
||||
import net.osmand.plus.measurementtool.command.JoinPointsCommand;
|
||||
import net.osmand.plus.measurementtool.command.MovePointCommand;
|
||||
import net.osmand.plus.measurementtool.command.RemovePointCommand;
|
||||
import net.osmand.plus.measurementtool.command.ReorderPointCommand;
|
||||
import net.osmand.plus.measurementtool.command.ReversePointsCommand;
|
||||
import net.osmand.plus.routepreparationmenu.RouteOptionsBottomSheet;
|
||||
import net.osmand.plus.measurementtool.command.SplitPointsCommand;
|
||||
import net.osmand.plus.routepreparationmenu.cards.BaseCard;
|
||||
import net.osmand.plus.settings.backend.ApplicationMode;
|
||||
import net.osmand.plus.settings.backend.OsmandSettings;
|
||||
|
@ -78,8 +80,8 @@ import net.osmand.plus.views.mapwidgets.MapInfoWidgetsFactory.TopToolbarControll
|
|||
import net.osmand.plus.views.mapwidgets.MapInfoWidgetsFactory.TopToolbarControllerType;
|
||||
import net.osmand.plus.views.mapwidgets.MapInfoWidgetsFactory.TopToolbarView;
|
||||
import net.osmand.plus.widgets.MultiStateToggleButton;
|
||||
import net.osmand.plus.widgets.MultiStateToggleButton.RadioItem;
|
||||
import net.osmand.plus.widgets.MultiStateToggleButton.OnRadioItemClickListener;
|
||||
import net.osmand.plus.widgets.MultiStateToggleButton.RadioItem;
|
||||
import net.osmand.router.RoutePlannerFrontEnd.GpxRouteApproximation;
|
||||
import net.osmand.util.Algorithms;
|
||||
|
||||
|
@ -370,9 +372,10 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
|
|||
@Override
|
||||
public void onClick(View view) {
|
||||
boolean trackSnappedToRoad = !editingCtx.isApproximationNeeded();
|
||||
boolean addNewSegmentAllowed = editingCtx.isAddNewSegmentAllowed();
|
||||
OptionsBottomSheetDialogFragment.showInstance(mapActivity.getSupportFragmentManager(),
|
||||
MeasurementToolFragment.this,
|
||||
trackSnappedToRoad,
|
||||
trackSnappedToRoad, addNewSegmentAllowed,
|
||||
editingCtx.getAppMode().getStringKey()
|
||||
);
|
||||
}
|
||||
|
@ -856,6 +859,11 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
|
|||
startSnapToRoad(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addNewSegmentOnClick() {
|
||||
onSplitPointsAfter();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void directionsOnClick() {
|
||||
MapActivity mapActivity = getMapActivity();
|
||||
|
@ -913,7 +921,7 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
|
|||
app.getTargetPointsHelper().updateRouteAndRefresh(true);
|
||||
app.getRoutingHelper().recalculateRouteDueToSettingsChange();
|
||||
} else {
|
||||
mapActivity.getMapActions().stopNavigationActionConfirm(new Runnable() {
|
||||
mapActivity.getMapActions().stopNavigationActionConfirm(null , new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
MapActivity mapActivity = getMapActivity();
|
||||
|
@ -1039,6 +1047,39 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
|
|||
trimRoute(AFTER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSplitPointsAfter() {
|
||||
MeasurementToolLayer measurementLayer = getMeasurementLayer();
|
||||
editingCtx.getCommandManager().execute(new SplitPointsCommand(measurementLayer, true));
|
||||
collapseInfoViewIfExpanded();
|
||||
editingCtx.setSelectedPointPosition(-1);
|
||||
updateUndoRedoButton(false, redoBtn);
|
||||
updateUndoRedoButton(true, undoBtn);
|
||||
updateDistancePointsText();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSplitPointsBefore() {
|
||||
MeasurementToolLayer measurementLayer = getMeasurementLayer();
|
||||
editingCtx.getCommandManager().execute(new SplitPointsCommand(measurementLayer, false));
|
||||
collapseInfoViewIfExpanded();
|
||||
editingCtx.setSelectedPointPosition(-1);
|
||||
updateUndoRedoButton(false, redoBtn);
|
||||
updateUndoRedoButton(true, undoBtn);
|
||||
updateDistancePointsText();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onJoinPoints() {
|
||||
MeasurementToolLayer measurementLayer = getMeasurementLayer();
|
||||
editingCtx.getCommandManager().execute(new JoinPointsCommand(measurementLayer));
|
||||
collapseInfoViewIfExpanded();
|
||||
editingCtx.setSelectedPointPosition(-1);
|
||||
updateUndoRedoButton(false, redoBtn);
|
||||
updateUndoRedoButton(true, undoBtn);
|
||||
updateDistancePointsText();
|
||||
}
|
||||
|
||||
private void trimRoute(ClearCommandMode before) {
|
||||
MeasurementToolLayer measurementLayer = getMeasurementLayer();
|
||||
editingCtx.getCommandManager().execute(new ClearPointsCommand(measurementLayer, before));
|
||||
|
|
|
@ -328,7 +328,7 @@ public class MeasurementToolLayer extends OsmandMapLayer implements ContextMenuL
|
|||
hasPointsBefore = true;
|
||||
WptPt pt = segment.points.get(segment.points.size() - 1);
|
||||
hasGapBefore = pt.isGap();
|
||||
if (!pt.isGap() || !editingCtx.isInAddPointBeforeMode()) {
|
||||
if (!pt.isGap() || (editingCtx.isInAddPointMode() && !editingCtx.isInAddPointBeforeMode())) {
|
||||
float locX = tb.getPixXFromLatLon(pt.lat, pt.lon);
|
||||
float locY = tb.getPixYFromLatLon(pt.lat, pt.lon);
|
||||
tx.add(locX);
|
||||
|
@ -345,7 +345,7 @@ public class MeasurementToolLayer extends OsmandMapLayer implements ContextMenuL
|
|||
tx.add((float) tb.getCenterPixelX());
|
||||
ty.add((float) tb.getCenterPixelY());
|
||||
}
|
||||
if (!hasGapBefore || editingCtx.isInAddPointBeforeMode()) {
|
||||
if (!hasGapBefore || (editingCtx.isInAddPointMode() && editingCtx.isInAddPointBeforeMode())) {
|
||||
WptPt pt = segment.points.get(0);
|
||||
float locX = tb.getPixXFromLatLon(pt.lat, pt.lon);
|
||||
float locY = tb.getPixYFromLatLon(pt.lat, pt.lon);
|
||||
|
|
|
@ -15,6 +15,7 @@ import net.osmand.PlatformUtil;
|
|||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.base.MenuBottomSheetDialogFragment;
|
||||
import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem;
|
||||
import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemWithDescription;
|
||||
import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemWithDescriptionDifHeight;
|
||||
import net.osmand.plus.base.bottomsheetmenu.SimpleBottomSheetItem;
|
||||
import net.osmand.plus.base.bottomsheetmenu.simpleitems.TitleItem;
|
||||
|
@ -29,6 +30,7 @@ public class OptionsBottomSheetDialogFragment extends MenuBottomSheetDialogFragm
|
|||
|
||||
public static final String TRACK_SNAPPED_TO_ROAD_KEY = "track_snapped_to_road";
|
||||
public static final String SNAP_TO_ROAD_APP_MODE_KEY = "snap_to_road_app_mode";
|
||||
public static final String ADD_NEW_SEGMENT_ALLOWED_KEY = "add_new_segment_allowed";
|
||||
|
||||
private ApplicationMode routeAppMode;
|
||||
|
||||
|
@ -36,8 +38,10 @@ public class OptionsBottomSheetDialogFragment extends MenuBottomSheetDialogFragm
|
|||
public void createMenuItems(Bundle savedInstanceState) {
|
||||
Bundle args = getArguments();
|
||||
boolean trackSnappedToRoad = false;
|
||||
boolean addNewSegmentAllowed = false;
|
||||
if (args != null) {
|
||||
trackSnappedToRoad = args.getBoolean(TRACK_SNAPPED_TO_ROAD_KEY);
|
||||
addNewSegmentAllowed = args.getBoolean(ADD_NEW_SEGMENT_ALLOWED_KEY);
|
||||
routeAppMode = ApplicationMode.valueOfStringKey(args.getString(SNAP_TO_ROAD_APP_MODE_KEY), null);
|
||||
}
|
||||
|
||||
|
@ -78,6 +82,25 @@ public class OptionsBottomSheetDialogFragment extends MenuBottomSheetDialogFragm
|
|||
|
||||
items.add(snapToRoadItem);
|
||||
|
||||
if (addNewSegmentAllowed) {
|
||||
BaseBottomSheetItem addNewSegment = new BottomSheetItemWithDescription.Builder()
|
||||
//.setIcon(getContentIcon(R.drawable.ic_action_trim_right))
|
||||
.setTitle(getString(R.string.plan_route_add_new_segment))
|
||||
.setLayoutId(R.layout.bottom_sheet_item_with_descr_pad_32dp)
|
||||
.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Fragment fragment = getTargetFragment();
|
||||
if (fragment instanceof OptionsFragmentListener) {
|
||||
((OptionsFragmentListener) fragment).addNewSegmentOnClick();
|
||||
}
|
||||
dismiss();
|
||||
}
|
||||
})
|
||||
.create();
|
||||
items.add(addNewSegment);
|
||||
}
|
||||
|
||||
items.add(new OptionsDividerItem(getContext()));
|
||||
|
||||
BaseBottomSheetItem saveAsNewSegmentItem = new SimpleBottomSheetItem.Builder()
|
||||
|
@ -200,12 +223,13 @@ public class OptionsBottomSheetDialogFragment extends MenuBottomSheetDialogFragm
|
|||
}
|
||||
|
||||
public static void showInstance(@NonNull FragmentManager fm, Fragment targetFragment,
|
||||
boolean trackSnappedToRoad, String routeAppModeStringKey) {
|
||||
boolean trackSnappedToRoad, boolean addNewSegmentAllowed, String routeAppModeStringKey) {
|
||||
try {
|
||||
if (!fm.isStateSaved()) {
|
||||
OptionsBottomSheetDialogFragment fragment = new OptionsBottomSheetDialogFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putBoolean(TRACK_SNAPPED_TO_ROAD_KEY, trackSnappedToRoad);
|
||||
args.putBoolean(ADD_NEW_SEGMENT_ALLOWED_KEY, addNewSegmentAllowed);
|
||||
args.putString(SNAP_TO_ROAD_APP_MODE_KEY, routeAppModeStringKey);
|
||||
fragment.setArguments(args);
|
||||
fragment.setTargetFragment(targetFragment,0);
|
||||
|
@ -225,6 +249,8 @@ public class OptionsBottomSheetDialogFragment extends MenuBottomSheetDialogFragm
|
|||
|
||||
void snapToRoadOnCLick();
|
||||
|
||||
void addNewSegmentOnClick();
|
||||
|
||||
void saveChangesOnClick();
|
||||
|
||||
void saveAsNewTrackOnClick();
|
||||
|
|
|
@ -2,7 +2,6 @@ package net.osmand.plus.measurementtool;
|
|||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
@ -11,7 +10,6 @@ import androidx.annotation.NonNull;
|
|||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
|
||||
import net.osmand.AndroidUtils;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.UiUtilities;
|
||||
|
@ -21,6 +19,7 @@ import net.osmand.plus.base.MenuBottomSheetDialogFragment;
|
|||
import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemButton;
|
||||
import net.osmand.plus.base.bottomsheetmenu.SimpleBottomSheetItem;
|
||||
import net.osmand.plus.base.bottomsheetmenu.simpleitems.DividerItem;
|
||||
import net.osmand.plus.helpers.GpxUiHelper;
|
||||
import net.osmand.util.Algorithms;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -80,13 +79,10 @@ public class SavedTrackBottomSheetDialogFragment extends MenuBottomSheetDialogFr
|
|||
|
||||
@Override
|
||||
protected void onThirdBottomButtonClick() {
|
||||
final Intent sendIntent = new Intent();
|
||||
sendIntent.setAction(Intent.ACTION_SEND);
|
||||
final Uri fileUri = AndroidUtils.getUriForFile(getMyApplication(), new File(fileName));
|
||||
sendIntent.putExtra(Intent.EXTRA_STREAM, fileUri);
|
||||
sendIntent.setType("application/gpx+xml");
|
||||
sendIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
startActivity(sendIntent);
|
||||
FragmentActivity activity = getActivity();
|
||||
if (activity != null) {
|
||||
GpxUiHelper.shareGpx(activity, new File(fileName));
|
||||
}
|
||||
dismiss();
|
||||
}
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ public class SelectedPointBottomSheetDialogFragment extends MenuBottomSheetDialo
|
|||
dismiss();
|
||||
}
|
||||
})
|
||||
.setDisabled(editingCtx.isFirstPointSelected())
|
||||
.setDisabled(editingCtx.isFirstPointSelected(false))
|
||||
.create();
|
||||
items.add(trimRouteBefore);
|
||||
|
||||
|
@ -152,10 +152,93 @@ public class SelectedPointBottomSheetDialogFragment extends MenuBottomSheetDialo
|
|||
dismiss();
|
||||
}
|
||||
})
|
||||
.setDisabled(editingCtx.isLastPointSelected())
|
||||
.setDisabled(editingCtx.isLastPointSelected(false))
|
||||
.create();
|
||||
items.add(trimRouteAfter);
|
||||
|
||||
if (editingCtx.isFirstPointSelected(true)) {
|
||||
// skip
|
||||
} else if (editingCtx.isLastPointSelected(true)) {
|
||||
items.add(new OptionsDividerItem(getContext()));
|
||||
|
||||
// new segment
|
||||
BaseBottomSheetItem addNewSegment = new BottomSheetItemWithDescription.Builder()
|
||||
//.setIcon(getContentIcon(R.drawable.ic_action_trim_right))
|
||||
.setTitle(getString(R.string.plan_route_add_new_segment))
|
||||
.setLayoutId(R.layout.bottom_sheet_item_with_descr_pad_32dp)
|
||||
.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Fragment targetFragment = getTargetFragment();
|
||||
if (targetFragment instanceof SelectedPointFragmentListener) {
|
||||
((SelectedPointFragmentListener) targetFragment).onSplitPointsAfter();
|
||||
}
|
||||
dismiss();
|
||||
}
|
||||
})
|
||||
.create();
|
||||
items.add(addNewSegment);
|
||||
} else if (editingCtx.isFirstPointSelected(false) || editingCtx.isLastPointSelected(false)) {
|
||||
items.add(new OptionsDividerItem(getContext()));
|
||||
|
||||
// join
|
||||
BaseBottomSheetItem joinSegments = new BottomSheetItemWithDescription.Builder()
|
||||
//.setIcon(getContentIcon(R.drawable.ic_action_trim_right))
|
||||
.setTitle(getString(R.string.plan_route_join_segments))
|
||||
.setLayoutId(R.layout.bottom_sheet_item_with_descr_pad_32dp)
|
||||
.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Fragment targetFragment = getTargetFragment();
|
||||
if (targetFragment instanceof SelectedPointFragmentListener) {
|
||||
((SelectedPointFragmentListener) targetFragment).onJoinPoints();
|
||||
}
|
||||
dismiss();
|
||||
}
|
||||
})
|
||||
.create();
|
||||
items.add(joinSegments);
|
||||
} else {
|
||||
items.add(new OptionsDividerItem(getContext()));
|
||||
|
||||
// split
|
||||
BaseBottomSheetItem splitAfter = new BottomSheetItemWithDescription.Builder()
|
||||
//.setIcon(getContentIcon(R.drawable.ic_action_trim_right))
|
||||
.setTitle(getString(R.string.plan_route_split_after))
|
||||
.setLayoutId(R.layout.bottom_sheet_item_with_descr_pad_32dp)
|
||||
.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Fragment targetFragment = getTargetFragment();
|
||||
if (targetFragment instanceof SelectedPointFragmentListener) {
|
||||
((SelectedPointFragmentListener) targetFragment).onSplitPointsAfter();
|
||||
}
|
||||
dismiss();
|
||||
}
|
||||
})
|
||||
.setDisabled(!editingCtx.canSplit(true))
|
||||
.create();
|
||||
items.add(splitAfter);
|
||||
|
||||
BaseBottomSheetItem splitBefore = new BottomSheetItemWithDescription.Builder()
|
||||
//.setIcon(getContentIcon(R.drawable.ic_action_trim_right))
|
||||
.setTitle(getString(R.string.plan_route_split_before))
|
||||
.setLayoutId(R.layout.bottom_sheet_item_with_descr_pad_32dp)
|
||||
.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Fragment targetFragment = getTargetFragment();
|
||||
if (targetFragment instanceof SelectedPointFragmentListener) {
|
||||
((SelectedPointFragmentListener) targetFragment).onSplitPointsBefore();
|
||||
}
|
||||
dismiss();
|
||||
}
|
||||
})
|
||||
.setDisabled(!editingCtx.canSplit(false))
|
||||
.create();
|
||||
items.add(splitBefore);
|
||||
}
|
||||
|
||||
items.add(new OptionsDividerItem(getContext()));
|
||||
|
||||
BaseBottomSheetItem changeRouteTypeBefore = new BottomSheetItemWithDescription.Builder()
|
||||
|
@ -172,7 +255,7 @@ public class SelectedPointBottomSheetDialogFragment extends MenuBottomSheetDialo
|
|||
dismiss();
|
||||
}
|
||||
})
|
||||
.setDisabled(editingCtx.isFirstPointSelected() || editingCtx.isSelectionNeedApproximation())
|
||||
.setDisabled(editingCtx.isFirstPointSelected(false) || editingCtx.isApproximationNeeded())
|
||||
.create();
|
||||
items.add(changeRouteTypeBefore);
|
||||
|
||||
|
@ -190,7 +273,7 @@ public class SelectedPointBottomSheetDialogFragment extends MenuBottomSheetDialo
|
|||
dismiss();
|
||||
}
|
||||
})
|
||||
.setDisabled(editingCtx.isLastPointSelected() || editingCtx.isSelectionNeedApproximation())
|
||||
.setDisabled(editingCtx.isLastPointSelected(false) || editingCtx.isApproximationNeeded())
|
||||
.create();
|
||||
items.add(changeRouteTypeAfter);
|
||||
|
||||
|
@ -352,6 +435,12 @@ public class SelectedPointBottomSheetDialogFragment extends MenuBottomSheetDialo
|
|||
|
||||
void onTrimRouteAfter();
|
||||
|
||||
void onSplitPointsAfter();
|
||||
|
||||
void onSplitPointsBefore();
|
||||
|
||||
void onJoinPoints();
|
||||
|
||||
void onChangeRouteTypeBefore();
|
||||
|
||||
void onChangeRouteTypeAfter();
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
package net.osmand.plus.measurementtool.command;
|
||||
|
||||
import android.util.Pair;
|
||||
|
||||
import net.osmand.GPXUtilities.WptPt;
|
||||
import net.osmand.plus.measurementtool.MeasurementEditingContext;
|
||||
import net.osmand.plus.measurementtool.MeasurementEditingContext.RoadSegmentData;
|
||||
import net.osmand.plus.measurementtool.MeasurementToolLayer;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class JoinPointsCommand extends MeasurementModeCommand {
|
||||
|
||||
private List<WptPt> points;
|
||||
private Map<Pair<WptPt, WptPt>, RoadSegmentData> roadSegmentData;
|
||||
private int pointPosition;
|
||||
|
||||
public JoinPointsCommand(MeasurementToolLayer measurementLayer) {
|
||||
super(measurementLayer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute() {
|
||||
pointPosition = getEditingCtx().getSelectedPointPosition();
|
||||
executeCommand();
|
||||
return true;
|
||||
}
|
||||
|
||||
private void executeCommand() {
|
||||
MeasurementEditingContext ctx = getEditingCtx();
|
||||
List<WptPt> pts = ctx.getPoints();
|
||||
points = new ArrayList<>(pts);
|
||||
roadSegmentData = ctx.getRoadSegmentData();
|
||||
ctx.joinPoints(pointPosition);
|
||||
refreshMap();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undo() {
|
||||
MeasurementEditingContext ctx = getEditingCtx();
|
||||
ctx.clearSegments();
|
||||
ctx.setRoadSegmentData(roadSegmentData);
|
||||
ctx.addPoints(points);
|
||||
refreshMap();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void redo() {
|
||||
executeCommand();
|
||||
}
|
||||
|
||||
@Override
|
||||
public MeasurementCommandType getType() {
|
||||
return MeasurementCommandType.JOIN_POINTS;
|
||||
}
|
||||
}
|
|
@ -41,6 +41,8 @@ public abstract class MeasurementModeCommand implements Command {
|
|||
SNAP_TO_ROAD,
|
||||
CHANGE_ROUTE_MODE,
|
||||
APPROXIMATE_POINTS,
|
||||
REVERSE_POINTS
|
||||
REVERSE_POINTS,
|
||||
SPLIT_POINTS,
|
||||
JOIN_POINTS
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
package net.osmand.plus.measurementtool.command;
|
||||
|
||||
import android.util.Pair;
|
||||
|
||||
import net.osmand.GPXUtilities;
|
||||
import net.osmand.GPXUtilities.TrkSegment;
|
||||
import net.osmand.GPXUtilities.WptPt;
|
||||
import net.osmand.plus.measurementtool.MeasurementEditingContext;
|
||||
import net.osmand.plus.measurementtool.MeasurementEditingContext.RoadSegmentData;
|
||||
import net.osmand.plus.measurementtool.MeasurementToolLayer;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class SplitPointsCommand extends MeasurementModeCommand {
|
||||
|
||||
private boolean after;
|
||||
private List<WptPt> points;
|
||||
private Map<Pair<WptPt, WptPt>, RoadSegmentData> roadSegmentData;
|
||||
private int pointPosition;
|
||||
|
||||
public SplitPointsCommand(MeasurementToolLayer measurementLayer, boolean after) {
|
||||
super(measurementLayer);
|
||||
this.after = after;
|
||||
MeasurementEditingContext editingCtx = getEditingCtx();
|
||||
this.pointPosition = editingCtx.getSelectedPointPosition();
|
||||
if (this.pointPosition == -1) {
|
||||
this.after = true;
|
||||
this.pointPosition = editingCtx.getPoints().size() - 1;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute() {
|
||||
executeCommand();
|
||||
return true;
|
||||
}
|
||||
|
||||
private void executeCommand() {
|
||||
MeasurementEditingContext ctx = getEditingCtx();
|
||||
List<WptPt> pts = ctx.getPoints();
|
||||
points = new ArrayList<>(pts);
|
||||
roadSegmentData = ctx.getRoadSegmentData();
|
||||
ctx.splitPoints(pointPosition, after);
|
||||
refreshMap();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undo() {
|
||||
MeasurementEditingContext ctx = getEditingCtx();
|
||||
ctx.clearSegments();
|
||||
ctx.setRoadSegmentData(roadSegmentData);
|
||||
ctx.addPoints(points);
|
||||
refreshMap();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void redo() {
|
||||
executeCommand();
|
||||
}
|
||||
|
||||
@Override
|
||||
public MeasurementCommandType getType() {
|
||||
return MeasurementCommandType.SPLIT_POINTS;
|
||||
}
|
||||
}
|
|
@ -4,7 +4,6 @@ import android.app.Activity;
|
|||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
|
@ -54,8 +53,6 @@ import net.osmand.plus.GPXDatabase.GpxDataItem;
|
|||
import net.osmand.plus.GpxSelectionHelper.GpxDisplayGroup;
|
||||
import net.osmand.plus.GpxSelectionHelper.GpxDisplayItem;
|
||||
import net.osmand.plus.GpxSelectionHelper.GpxDisplayItemType;
|
||||
import net.osmand.plus.mapmarkers.MapMarkersHelper;
|
||||
import net.osmand.plus.mapmarkers.MapMarkersGroup;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.UiUtilities;
|
||||
|
@ -66,7 +63,10 @@ import net.osmand.plus.activities.SavingTrackHelper;
|
|||
import net.osmand.plus.activities.TrackActivity;
|
||||
import net.osmand.plus.base.OsmandExpandableListFragment;
|
||||
import net.osmand.plus.base.PointImageDrawable;
|
||||
import net.osmand.plus.helpers.GpxUiHelper;
|
||||
import net.osmand.plus.mapmarkers.CoordinateInputDialogFragment;
|
||||
import net.osmand.plus.mapmarkers.MapMarkersGroup;
|
||||
import net.osmand.plus.mapmarkers.MapMarkersHelper;
|
||||
import net.osmand.plus.myplaces.TrackBitmapDrawer.TrackBitmapDrawerListener;
|
||||
import net.osmand.plus.settings.backend.OsmandSettings;
|
||||
import net.osmand.plus.track.SaveGpxAsyncTask.SaveGpxListener;
|
||||
|
@ -303,7 +303,8 @@ public class TrackPointFragment extends OsmandExpandableListFragment implements
|
|||
|
||||
private void shareItems() {
|
||||
final GPXFile gpxFile = getGpx();
|
||||
if (gpxFile != null && getTrackActivity() != null) {
|
||||
FragmentActivity activity = getActivity();
|
||||
if (gpxFile != null && activity != null) {
|
||||
if (Algorithms.isEmpty(gpxFile.path)) {
|
||||
SaveGpxListener saveGpxListener = new SaveGpxListener() {
|
||||
@Override
|
||||
|
@ -315,26 +316,20 @@ public class TrackPointFragment extends OsmandExpandableListFragment implements
|
|||
public void gpxSavingFinished(Exception errorMessage) {
|
||||
if (isResumed()) {
|
||||
hideProgressBar();
|
||||
shareGpx(gpxFile.path);
|
||||
FragmentActivity activity = getActivity();
|
||||
if (activity != null) {
|
||||
GpxUiHelper.shareGpx(activity, new File(gpxFile.path));
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
new SaveCurrentTrackTask(app, gpxFile, saveGpxListener).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||
} else {
|
||||
shareGpx(gpxFile.path);
|
||||
GpxUiHelper.saveAndShareGpxWithAppearance(activity, gpxFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void shareGpx(String path) {
|
||||
final Uri fileUri = AndroidUtils.getUriForFile(getMyApplication(), new File(path));
|
||||
final Intent sendIntent = new Intent(Intent.ACTION_SEND);
|
||||
sendIntent.putExtra(Intent.EXTRA_STREAM, fileUri);
|
||||
sendIntent.setType("application/gpx+xml");
|
||||
sendIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
startActivity(sendIntent);
|
||||
}
|
||||
|
||||
private void openCoordinatesInput() {
|
||||
FragmentManager fm = getFragmentManager();
|
||||
if (fm != null) {
|
||||
|
@ -412,7 +407,7 @@ public class TrackPointFragment extends OsmandExpandableListFragment implements
|
|||
final MapMarkersHelper markersHelper = app.getMapMarkersHelper();
|
||||
final boolean synced = markersHelper.getMarkersGroup(getGpx()) != null;
|
||||
createMenuItem(menu, SELECT_MAP_MARKERS_ID, synced ? R.string.remove_from_map_markers
|
||||
: R.string.shared_string_add_to_map_markers, R.drawable.ic_action_flag, MenuItem.SHOW_AS_ACTION_NEVER);
|
||||
: R.string.shared_string_add_to_map_markers, R.drawable.ic_action_flag, MenuItem.SHOW_AS_ACTION_NEVER);
|
||||
}
|
||||
createMenuItem(menu, SELECT_FAVORITES_ID, R.string.shared_string_add_to_favorites, R.drawable.ic_action_favorite, MenuItem.SHOW_AS_ACTION_NEVER);
|
||||
createMenuItem(menu, DELETE_ID, R.string.shared_string_delete, R.drawable.ic_action_delete_dark, MenuItem.SHOW_AS_ACTION_NEVER);
|
||||
|
|
|
@ -3,11 +3,9 @@ package net.osmand.plus.myplaces;
|
|||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Matrix;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.util.SparseArray;
|
||||
|
@ -28,6 +26,7 @@ import androidx.annotation.Nullable;
|
|||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.widget.SwitchCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.viewpager.widget.PagerAdapter;
|
||||
|
||||
import com.github.mikephil.charting.charts.LineChart;
|
||||
|
@ -62,9 +61,9 @@ import net.osmand.plus.activities.TrackActivity;
|
|||
import net.osmand.plus.base.OsmAndListFragment;
|
||||
import net.osmand.plus.helpers.AndroidUiHelper;
|
||||
import net.osmand.plus.helpers.GpxUiHelper;
|
||||
import net.osmand.plus.helpers.GpxUiHelper.LineGraphType;
|
||||
import net.osmand.plus.helpers.GpxUiHelper.GPXDataSetAxisType;
|
||||
import net.osmand.plus.helpers.GpxUiHelper.GPXDataSetType;
|
||||
import net.osmand.plus.helpers.GpxUiHelper.LineGraphType;
|
||||
import net.osmand.plus.helpers.GpxUiHelper.OrderedLineDataSet;
|
||||
import net.osmand.plus.myplaces.TrackBitmapDrawer.TrackBitmapDrawerListener;
|
||||
import net.osmand.plus.settings.backend.OsmandSettings;
|
||||
|
@ -163,12 +162,11 @@ public class TrackSegmentFragment extends OsmAndListFragment implements TrackBit
|
|||
.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
||||
@Override
|
||||
public boolean onMenuItemClick(MenuItem item) {
|
||||
final Uri fileUri = AndroidUtils.getUriForFile(getMyApplication(), new File(getGpx().path));
|
||||
final Intent sendIntent = new Intent(Intent.ACTION_SEND);
|
||||
sendIntent.putExtra(Intent.EXTRA_STREAM, fileUri);
|
||||
sendIntent.setType("application/gpx+xml");
|
||||
sendIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
startActivity(sendIntent);
|
||||
GPXFile gpx = getGpx();
|
||||
FragmentActivity activity = getActivity();
|
||||
if (activity != null && gpx != null) {
|
||||
GpxUiHelper.shareGpx(activity, new File(gpx.path));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
@ -1209,7 +1207,7 @@ public class TrackSegmentFragment extends OsmAndListFragment implements TrackBit
|
|||
}
|
||||
|
||||
private void saveGpx(final SelectedGpxFile selectedGpxFile, GPXFile gpxFile) {
|
||||
new SaveGpxAsyncTask(gpxFile, new SaveGpxListener() {
|
||||
new SaveGpxAsyncTask(new File(gpxFile.path), gpxFile, new SaveGpxListener() {
|
||||
@Override
|
||||
public void gpxSavingStarted() {
|
||||
TrackActivity activity = getTrackActivity();
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package net.osmand.plus.osmedit;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
|
@ -12,8 +11,6 @@ import android.widget.ImageButton;
|
|||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
|
||||
import net.osmand.data.PointDescription;
|
||||
import net.osmand.plus.OsmandPlugin;
|
||||
import net.osmand.plus.R;
|
||||
|
@ -22,19 +19,23 @@ import net.osmand.plus.dashboard.DashBaseFragment;
|
|||
import net.osmand.plus.dashboard.DashboardOnMap;
|
||||
import net.osmand.plus.dashboard.tools.DashFragmentData;
|
||||
import net.osmand.plus.dialogs.ProgressDialogFragment;
|
||||
import net.osmand.plus.osmedit.dialogs.SendPoiDialogFragment;
|
||||
import net.osmand.plus.osmedit.dialogs.SendPoiDialogFragment.PoiUploaderType;
|
||||
import net.osmand.plus.measurementtool.LoginBottomSheetFragment;
|
||||
import net.osmand.plus.osmedit.dialogs.ProgressDialogPoiUploader;
|
||||
import net.osmand.plus.osmedit.dialogs.SendOsmNoteBottomSheetFragment;
|
||||
import net.osmand.plus.osmedit.dialogs.SendPoiBottomSheetFragment;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static net.osmand.plus.osmedit.oauth.OsmOAuthHelper.*;
|
||||
|
||||
/**
|
||||
* Created by Denis
|
||||
* on 20.01.2015.
|
||||
*/
|
||||
public class DashOsmEditsFragment extends DashBaseFragment
|
||||
implements SendPoiDialogFragment.ProgressDialogPoiUploader {
|
||||
implements ProgressDialogPoiUploader, OsmAuthorizationListener {
|
||||
public static final String TAG = "DASH_OSM_EDITS_FRAGMENT";
|
||||
public static final int TITLE_ID = R.string.osm_settings;
|
||||
|
||||
|
@ -51,6 +52,7 @@ public class DashOsmEditsFragment extends DashBaseFragment
|
|||
new DashFragmentData(TAG, DashOsmEditsFragment.class, SHOULD_SHOW_FUNCTION, 130, ROW_NUMBER_TAG);
|
||||
|
||||
OsmEditingPlugin plugin;
|
||||
private OsmPoint selectedPoint;
|
||||
|
||||
@Override
|
||||
public View initView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
|
@ -72,7 +74,6 @@ public class DashOsmEditsFragment extends DashBaseFragment
|
|||
return view;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onOpenDash() {
|
||||
if (plugin == null) {
|
||||
|
@ -114,10 +115,15 @@ public class DashOsmEditsFragment extends DashBaseFragment
|
|||
@Override
|
||||
public void onClick(View v) {
|
||||
if (point.getGroup() == OsmPoint.Group.POI) {
|
||||
SendPoiDialogFragment.createInstance(new OsmPoint[] {point}, PoiUploaderType.FRAGMENT)
|
||||
.show(getChildFragmentManager(), "SendPoiDialogFragment");
|
||||
selectedPoint = point;
|
||||
if (getMyApplication().getOsmOAuthHelper().isLogged()) {
|
||||
SendPoiBottomSheetFragment.showInstance(getChildFragmentManager(), new OsmPoint[]{point});
|
||||
} else {
|
||||
LoginBottomSheetFragment.showInstance(getActivity().getSupportFragmentManager(),
|
||||
DashOsmEditsFragment.this);
|
||||
}
|
||||
} else {
|
||||
uploadItem(point);
|
||||
SendOsmNoteBottomSheetFragment.showInstance(getChildFragmentManager(), new OsmPoint[]{point});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -141,18 +147,9 @@ public class DashOsmEditsFragment extends DashBaseFragment
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: 9/7/15 Redesign osm notes.
|
||||
private void uploadItem(final OsmPoint point) {
|
||||
AlertDialog.Builder b = new AlertDialog.Builder(getActivity());
|
||||
b.setMessage(getString(R.string.local_osm_changes_upload_all_confirm, 1));
|
||||
b.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
showProgressDialog(new OsmPoint[] {point}, false, false);
|
||||
}
|
||||
});
|
||||
b.setNegativeButton(R.string.shared_string_cancel, null);
|
||||
b.show();
|
||||
@Override
|
||||
public void authorizationCompleted() {
|
||||
SendPoiBottomSheetFragment.showInstance(getChildFragmentManager(), new OsmPoint[]{selectedPoint});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -215,5 +212,4 @@ public class DashOsmEditsFragment extends DashBaseFragment
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -35,11 +35,11 @@ public class HandleOsmNoteAsyncTask extends AsyncTask<Void, Void, OsmBugResult>
|
|||
@Override
|
||||
protected OsmBugResult doInBackground(Void... params) {
|
||||
if (bug != null) {
|
||||
OsmNotesPoint pnt = new OsmNotesPoint();
|
||||
pnt.setId(bug.getId());
|
||||
pnt.setLatitude(bug.getLatitude());
|
||||
pnt.setLongitude(bug.getLongitude());
|
||||
return osmbugsUtil.commit(pnt, text, action);
|
||||
OsmNotesPoint point = new OsmNotesPoint();
|
||||
point.setId(bug.getId());
|
||||
point.setLatitude(bug.getLatitude());
|
||||
point.setLongitude(bug.getLongitude());
|
||||
return osmbugsUtil.commit(point, text, action);
|
||||
} else if (point != null) {
|
||||
osmbugsUtil = local;
|
||||
return osmbugsUtil.modify(point, text);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package net.osmand.plus.osmedit;
|
||||
|
||||
import net.osmand.data.LatLon;
|
||||
import net.osmand.osm.edit.Entity;
|
||||
import net.osmand.osm.edit.OSMSettings.OSMTagKey;
|
||||
import net.osmand.util.Algorithms;
|
||||
|
@ -97,4 +98,43 @@ public class OpenstreetmapPoint extends OsmPoint {
|
|||
.append(" (").append(this.getLatitude()).append(", ").append(this.getLongitude())
|
||||
.append(")]").toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
if (other == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(other instanceof OpenstreetmapPoint)) {
|
||||
return false;
|
||||
}
|
||||
OpenstreetmapPoint otherPoint = (OpenstreetmapPoint) other;
|
||||
boolean res = this.getName() != null && this.getName().equals(otherPoint.getName());
|
||||
LatLon thisLatLon = new LatLon(this.getLatitude(), this.getLongitude());
|
||||
LatLon otherLatLon = new LatLon(otherPoint.getLatitude(), otherPoint.getLongitude());
|
||||
res = res || thisLatLon.equals(otherLatLon);
|
||||
if (getType() != null)
|
||||
res = res || getType().equals(otherPoint.getType());
|
||||
if (getSubtype() != null)
|
||||
res = res || getSubtype().equals(otherPoint.getSubtype());
|
||||
if (getTagsString() != null)
|
||||
res = res || getTagsString().equals(otherPoint.getTagsString());
|
||||
res = res || getId() == otherPoint.getId();
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 0;
|
||||
int temp;
|
||||
temp = (int) Math.floor(getLatitude() * 10000);
|
||||
result = prime * result + temp;
|
||||
temp = (int) Math.floor(getLongitude() * 10000);
|
||||
result = prime * result + temp;
|
||||
result = prime * result + (getType() != null ? getType().hashCode() : 0);
|
||||
result = prime * result + (getSubtype() != null ? getSubtype().hashCode() : 0);
|
||||
result = prime * result + (getTagsString() != null ? getTagsString().hashCode() : 0);
|
||||
result = prime * result + Long.valueOf(getId()).hashCode();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,19 +1,14 @@
|
|||
package net.osmand.plus.osmedit;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.DialogInterface;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.PointF;
|
||||
import android.util.Xml;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import net.osmand.AndroidUtils;
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.data.FavouritePoint.BackgroundType;
|
||||
import net.osmand.data.LatLon;
|
||||
|
@ -25,6 +20,7 @@ import net.osmand.osm.io.NetworkUtils;
|
|||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.base.PointImageDrawable;
|
||||
import net.osmand.plus.osmedit.dialogs.BugBottomSheetDialog;
|
||||
import net.osmand.plus.osmedit.dialogs.SendOsmNoteBottomSheetFragment;
|
||||
import net.osmand.plus.settings.backend.OsmandSettings;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
|
@ -32,7 +28,6 @@ import net.osmand.plus.osmedit.OsmPoint.Action;
|
|||
import net.osmand.plus.views.layers.ContextMenuLayer.IContextMenuProvider;
|
||||
import net.osmand.plus.views.OsmandMapLayer;
|
||||
import net.osmand.plus.views.OsmandMapTileView;
|
||||
import net.osmand.util.Algorithms;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
@ -362,43 +357,18 @@ public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider
|
|||
}
|
||||
|
||||
private void createBugDialog(final boolean offline, String text, int titleTextId, int posButtonTextId,
|
||||
final Action action, final OpenStreetNote bug, final OsmNotesPoint point) {
|
||||
@SuppressLint("InflateParams") final View view = LayoutInflater.from(activity).inflate(R.layout.open_bug, null);
|
||||
final Action action, final OpenStreetNote bug, OsmNotesPoint point) {
|
||||
if (offline) {
|
||||
activity.getContextMenu().close();
|
||||
BugBottomSheetDialog.showInstance(activity.getSupportFragmentManager(), getOsmbugsUtil(bug), local, text,
|
||||
titleTextId, posButtonTextId, action, bug, point, getHandleBugListener());
|
||||
return;
|
||||
} else {
|
||||
((EditText) view.findViewById(R.id.user_name_field)).setText(getUserName());
|
||||
((EditText) view.findViewById(R.id.password_field)).setText(
|
||||
activity.getMyApplication().getSettings().USER_PASSWORD.get());
|
||||
}
|
||||
if (!Algorithms.isEmpty(text)) {
|
||||
((EditText) view.findViewById(R.id.message_field)).setText(text);
|
||||
}
|
||||
view.findViewById(R.id.message_field).requestFocus();
|
||||
AndroidUtils.softKeyboardDelayed(activity, view.findViewById(R.id.message_field));
|
||||
|
||||
final AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
||||
builder.setTitle(R.string.shared_string_commit);
|
||||
builder.setView(view);
|
||||
builder.setPositiveButton(posButtonTextId, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
String text = offline ? getMessageText(view) : getTextAndUpdateUserPwd(view);
|
||||
activity.getContextMenu().close();
|
||||
handleBug(text, bug, action, point);
|
||||
}
|
||||
});
|
||||
builder.setNegativeButton(R.string.shared_string_cancel, null);
|
||||
builder.create().show();
|
||||
}
|
||||
|
||||
private void handleBug(String text, OpenStreetNote bug, Action action, OsmNotesPoint point) {
|
||||
if (bug != null || point != null) {
|
||||
executeTaskInBackground(new HandleOsmNoteAsyncTask(getOsmbugsUtil(bug), local, bug, point, text, action,
|
||||
getHandleBugListener()));
|
||||
OsmNotesPoint notesPoint = new OsmNotesPoint();
|
||||
notesPoint.setAction(action);
|
||||
notesPoint.setId(bug.getId());
|
||||
notesPoint.setLatitude(bug.getLatitude());
|
||||
notesPoint.setLongitude(bug.getLongitude());
|
||||
SendOsmNoteBottomSheetFragment.showInstance(activity.getSupportFragmentManager(), new OsmPoint[]{notesPoint});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -453,19 +423,6 @@ public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider
|
|||
};
|
||||
}
|
||||
|
||||
private String getUserName() {
|
||||
return ((OsmandApplication) activity.getApplication()).getSettings().USER_NAME.get();
|
||||
}
|
||||
|
||||
private String getTextAndUpdateUserPwd(final View view) {
|
||||
String text = getMessageText(view);
|
||||
String author = ((EditText) view.findViewById(R.id.user_name_field)).getText().toString();
|
||||
String pwd = ((EditText) view.findViewById(R.id.password_field)).getText().toString();
|
||||
((OsmandApplication) OsmBugsLayer.this.activity.getApplication()).getSettings().USER_NAME.set(author);
|
||||
((OsmandApplication) OsmBugsLayer.this.activity.getApplication()).getSettings().USER_PASSWORD.set(pwd);
|
||||
return text;
|
||||
}
|
||||
|
||||
private String getMessageText(final View view) {
|
||||
return ((EditText) view.findViewById(R.id.message_field)).getText().toString();
|
||||
}
|
||||
|
|
|
@ -58,10 +58,9 @@ import net.osmand.plus.osmedit.FileTypeBottomSheetDialogFragment.FileTypeFragmen
|
|||
import net.osmand.plus.osmedit.OpenstreetmapLocalUtil.OnNodeCommittedListener;
|
||||
import net.osmand.plus.osmedit.OsmEditOptionsBottomSheetDialogFragment.OsmEditOptionsFragmentListener;
|
||||
import net.osmand.plus.osmedit.OsmPoint.Group;
|
||||
import net.osmand.plus.osmedit.dialogs.ProgressDialogPoiUploader;
|
||||
import net.osmand.plus.osmedit.dialogs.SendOsmNoteBottomSheetFragment;
|
||||
import net.osmand.plus.osmedit.dialogs.SendPoiBottomSheetFragment;
|
||||
import net.osmand.plus.osmedit.dialogs.SendPoiDialogFragment.ProgressDialogPoiUploader;
|
||||
import net.osmand.plus.osmedit.oauth.OsmOAuthAuthorizationAdapter;
|
||||
import net.osmand.plus.osmedit.oauth.OsmOAuthHelper.OsmAuthorizationListener;
|
||||
import net.osmand.plus.settings.backend.OsmandSettings;
|
||||
import net.osmand.util.Algorithms;
|
||||
|
@ -633,14 +632,8 @@ public class OsmEditsFragment extends OsmAndListFragment implements ProgressDial
|
|||
private void uploadItems(final OsmPoint[] points) {
|
||||
FragmentActivity activity = getActivity();
|
||||
if (activity != null) {
|
||||
OsmandApplication app = getMyApplication();
|
||||
OsmandSettings settings = app.getSettings();
|
||||
OsmOAuthAuthorizationAdapter authorizationAdapter = app.getOsmOAuthHelper().getAuthorizationAdapter();
|
||||
boolean isLogged = authorizationAdapter.isValidToken()
|
||||
|| !Algorithms.isEmpty(settings.USER_NAME.get())
|
||||
&& !Algorithms.isEmpty(settings.USER_PASSWORD.get());
|
||||
if (hasPoiGroup(points)) {
|
||||
if (isLogged) {
|
||||
if (getMyApplication().getOsmOAuthHelper().isLogged()) {
|
||||
SendPoiBottomSheetFragment.showInstance(getChildFragmentManager(), points);
|
||||
} else {
|
||||
LoginBottomSheetFragment.showInstance(activity.getSupportFragmentManager(), this);
|
||||
|
|
|
@ -28,10 +28,8 @@ import net.osmand.plus.OsmandApplication;
|
|||
import net.osmand.plus.OsmandPlugin;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.UiUtilities;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.dialogs.ProgressDialogFragment;
|
||||
import net.osmand.plus.osmedit.dialogs.SendPoiDialogFragment;
|
||||
import net.osmand.plus.osmedit.dialogs.SendPoiDialogFragment.PoiUploaderType;
|
||||
import net.osmand.plus.measurementtool.LoginBottomSheetFragment;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.ArrayList;
|
||||
|
@ -74,13 +72,7 @@ public class OsmEditsUploadListenerHelper implements OsmEditsUploadListener {
|
|||
OsmPoint point = loadErrorsMap.keySet().iterator().next();
|
||||
String message = loadErrorsMap.get(point);
|
||||
if (message.equals(activity.getString(R.string.auth_failed))) {
|
||||
SendPoiDialogFragment dialogFragment;
|
||||
if (activity instanceof MapActivity) {
|
||||
dialogFragment = SendPoiDialogFragment.createInstance(new OsmPoint[]{point}, PoiUploaderType.SIMPLE);
|
||||
} else {
|
||||
dialogFragment = SendPoiDialogFragment.createInstance(new OsmPoint[]{point}, PoiUploaderType.FRAGMENT);
|
||||
}
|
||||
dialogFragment.show(activity.getSupportFragmentManager(), "error_loading");
|
||||
LoginBottomSheetFragment.showInstance(activity.getSupportFragmentManager(), null);
|
||||
} else {
|
||||
DialogFragment dialogFragment =
|
||||
UploadingErrorDialogFragment.getInstance(message, point);
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package net.osmand.plus.osmedit;
|
||||
|
||||
import net.osmand.data.LatLon;
|
||||
|
||||
public class OsmNotesPoint extends OsmPoint {
|
||||
private static final long serialVersionUID = 729654300829771468L;
|
||||
|
||||
|
@ -68,4 +70,29 @@ public class OsmNotesPoint extends OsmPoint {
|
|||
.append(" (").append(this.getLatitude()).append(", ").append(this.getLongitude())
|
||||
.append(")]").toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (!(o instanceof OsmNotesPoint)) return false;
|
||||
OsmNotesPoint that = (OsmNotesPoint) o;
|
||||
LatLon thisPos = new LatLon(latitude, longitude);
|
||||
LatLon thatPos = new LatLon(that.latitude, that.longitude);
|
||||
boolean res = thisPos.equals(thatPos);
|
||||
res = res || text != null && text.equals(that.text);
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 0;
|
||||
int temp;
|
||||
temp = (int) Math.floor(latitude * 10000);
|
||||
result = prime * result + temp;
|
||||
temp = (int) Math.floor(longitude * 10000);
|
||||
result = prime * result + temp;
|
||||
result = prime * result + (text != null ? text.hashCode() : 0);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,8 +57,6 @@ public class BugBottomSheetDialog extends MenuBottomSheetDialogFragment {
|
|||
View osmNoteView = View.inflate(UiUtilities.getThemedContext(app, nightMode),
|
||||
R.layout.open_osm_note_text, null);
|
||||
TextInputLayout textBox = osmNoteView.findViewById(R.id.name_text_box);
|
||||
int highlightColorId = nightMode ? R.color.list_background_color_dark : R.color.activity_background_color_light;
|
||||
textBox.setBoxBackgroundColorResource(highlightColorId);
|
||||
textBox.setHint(AndroidUtils.addColon(app, R.string.osn_bug_name));
|
||||
ColorStateList colorStateList = ColorStateList.valueOf(ContextCompat
|
||||
.getColor(app, nightMode ? R.color.text_color_secondary_dark : R.color.text_color_secondary_light));
|
||||
|
@ -86,11 +84,6 @@ public class BugBottomSheetDialog extends MenuBottomSheetDialogFragment {
|
|||
dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getBgColorId() {
|
||||
return nightMode ? R.color.activity_background_color_dark : R.color.list_background_color_light;
|
||||
}
|
||||
|
||||
public static void showInstance(@NonNull FragmentManager fm, OsmBugsUtil osmBugsUtil, OsmBugsUtil local,
|
||||
String text, int titleTextId, int posButtonTextId, final OsmPoint.Action action,
|
||||
final OsmBugsLayer.OpenStreetNote bug, final OsmNotesPoint point,
|
||||
|
|
|
@ -0,0 +1,106 @@
|
|||
package net.osmand.plus.osmedit.dialogs;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnDismissListener;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.UiUtilities.DialogButtonType;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.base.MenuBottomSheetDialogFragment;
|
||||
import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem;
|
||||
import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemWithDescription;
|
||||
import net.osmand.plus.base.bottomsheetmenu.simpleitems.DividerSpaceItem;
|
||||
|
||||
public class DismissRouteBottomSheetFragment extends MenuBottomSheetDialogFragment {
|
||||
|
||||
public static final String TAG = DismissRouteBottomSheetFragment.class.getSimpleName();
|
||||
|
||||
private Runnable onStopAction;
|
||||
private OnDismissListener dismissListener;
|
||||
|
||||
@Override
|
||||
public void createMenuItems(Bundle savedInstanceState) {
|
||||
BaseBottomSheetItem descriptionItem = new BottomSheetItemWithDescription.Builder()
|
||||
.setDescription(getString(R.string.stop_routing_confirm))
|
||||
.setTitle(getString(R.string.cancel_route))
|
||||
.setLayoutId(R.layout.bottom_sheet_item_list_title_with_descr)
|
||||
.create();
|
||||
|
||||
items.add(descriptionItem);
|
||||
|
||||
int padding = getResources().getDimensionPixelSize(R.dimen.content_padding_small);
|
||||
items.add(new DividerSpaceItem(requireContext(), padding));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean useVerticalButtons() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getDismissButtonTextId() {
|
||||
return R.string.shared_string_cancel;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getRightBottomButtonTextId() {
|
||||
return R.string.shared_string_dismiss;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected DialogButtonType getRightBottomButtonType() {
|
||||
return DialogButtonType.PRIMARY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSecondDividerHeight() {
|
||||
return getResources().getDimensionPixelSize(R.dimen.bottom_sheet_icon_margin);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onRightBottomButtonClick() {
|
||||
MapActivity mapActivity = getMapActivity();
|
||||
if (mapActivity != null) {
|
||||
mapActivity.getMapActions().stopNavigationWithoutConfirm();
|
||||
}
|
||||
if (onStopAction != null) {
|
||||
onStopAction.run();
|
||||
}
|
||||
dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDismiss(@NonNull DialogInterface dialog) {
|
||||
super.onDismiss(dialog);
|
||||
FragmentActivity activity = getActivity();
|
||||
if (activity != null && !activity.isChangingConfigurations() && dismissListener != null) {
|
||||
dismissListener.onDismiss(dialog);
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public MapActivity getMapActivity() {
|
||||
Activity activity = getActivity();
|
||||
if (activity instanceof MapActivity) {
|
||||
return (MapActivity) activity;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void showInstance(@NonNull FragmentManager fragmentManager, @Nullable OnDismissListener listener, @Nullable Runnable onStopAction) {
|
||||
if (!fragmentManager.isStateSaved()) {
|
||||
DismissRouteBottomSheetFragment fragment = new DismissRouteBottomSheetFragment();
|
||||
fragment.dismissListener = listener;
|
||||
fragment.onStopAction = onStopAction;
|
||||
fragment.setRetainInstance(true);
|
||||
fragment.show(fragmentManager, TAG);
|
||||
}
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue