From edb329e3363cb447be5a6c41f0686a73a140dbfd Mon Sep 17 00:00:00 2001
From: androiddevkotlin <64539346+androiddevkotlin@users.noreply.github.com>
Date: Wed, 24 Mar 2021 23:08:09 +0200
Subject: [PATCH 01/42] RTL issue - Menu misalignment
https://github.com/osmandapp/OsmAnd/issues/11198
---
OsmAnd/res/layout/abc_list_menu_item_icon.xml | 29 +++++++++++++++++++
1 file changed, 29 insertions(+)
create mode 100644 OsmAnd/res/layout/abc_list_menu_item_icon.xml
diff --git a/OsmAnd/res/layout/abc_list_menu_item_icon.xml b/OsmAnd/res/layout/abc_list_menu_item_icon.xml
new file mode 100644
index 0000000000..542a19ab1f
--- /dev/null
+++ b/OsmAnd/res/layout/abc_list_menu_item_icon.xml
@@ -0,0 +1,29 @@
+
+
+
+
From 67a2a447e7363607aeeddf195c6645725e3fc8b6 Mon Sep 17 00:00:00 2001
From: androiddevkotlin <64539346+androiddevkotlin@users.noreply.github.com>
Date: Thu, 25 Mar 2021 00:36:40 +0200
Subject: [PATCH 02/42] =?UTF-8?q?Revert=20change:=20Edit=20action=20screen?=
=?UTF-8?q?,=20if=20the=20action=20name=20is=20available=20for=20editing,?=
=?UTF-8?q?=20we=20should=20not=20show=20the=20"Show/hide=20=E2=80=93=20"?=
=?UTF-8?q?=20part,=20because=20after=20deleting=20or=20changing=20this=20?=
=?UTF-8?q?part=20it=20appears=20on=20the=20quick=20action=20bar=20anyway.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
https://github.com/osmandapp/OsmAnd/issues/10196
---
.../plus/quickaction/CreateEditActionDialog.java | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/quickaction/CreateEditActionDialog.java b/OsmAnd/src/net/osmand/plus/quickaction/CreateEditActionDialog.java
index 819c0b9b77..0a7b95f216 100644
--- a/OsmAnd/src/net/osmand/plus/quickaction/CreateEditActionDialog.java
+++ b/OsmAnd/src/net/osmand/plus/quickaction/CreateEditActionDialog.java
@@ -220,17 +220,9 @@ public class CreateEditActionDialog extends DialogFragment
nameEditText.setEnabled(action.isActionEditable());
action.setAutoGeneratedTitle(nameEditText);
- if (savedInstanceState == null) {
- String name = action.getName(getContext());
- if (action.getActionNameRes() != 0) {
- String actionName = getString(action.getActionNameRes());
- nameEditText.setText(getString(R.string.ltr_or_rtl_combine_via_dash, actionName, name));
- } else {
- nameEditText.setText(name);
- }
- } else {
- action.setName(nameEditText.getText().toString());
- }
+ if (savedInstanceState == null) nameEditText.setText(action.getName(getContext()));
+ else action.setName(nameEditText.getText().toString());
+
image.setImageResource(action.getIconRes(getApplication()));
}
From 3dd74265fe54466e83a91928def2d3ac7a801dfd Mon Sep 17 00:00:00 2001
From: Skalii
Date: Thu, 25 Mar 2021 00:56:34 +0200
Subject: [PATCH 03/42] fix "Start" button appearance
---
.../monitoring/TripRecordingBottomSheet.java | 38 +++++++++++++++++++
.../TripRecordingStartingBottomSheet.java | 3 +-
2 files changed, 40 insertions(+), 1 deletion(-)
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java
index 8db1508454..c7f4316848 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java
@@ -453,6 +453,21 @@ public class TripRecordingBottomSheet extends MenuBottomSheetDialogFragment impl
setItemBackground(context, nightMode, view, enabled);
}
+ public static void createItemActive(Context context, boolean nightMode, View view, ItemType type) {
+ view.setTag(type);
+ AppCompatImageView icon = view.findViewById(R.id.icon);
+ if (icon != null) {
+ setTintedIconActive(context, icon, nightMode, type);
+ }
+ TextView title = view.findViewById(R.id.button_text);
+ Integer titleId = type.getTitleId();
+ if (title != null && titleId != null) {
+ title.setText(titleId);
+ setTextColorActive(context, title, nightMode, type);
+ }
+ setItemBackgroundActive(context, nightMode, view);
+ }
+
public static void setItemBackground(Context context, boolean nightMode, View view, boolean enabled) {
if (view instanceof CardView) {
int colorId = enabled ? getActiveTransparentColorId(nightMode) : getInactiveButtonColorId(nightMode);
@@ -472,6 +487,12 @@ public class TripRecordingBottomSheet extends MenuBottomSheetDialogFragment impl
view.setBackgroundDrawable(background);
}
+ public static void setItemBackgroundActive(Context context, boolean nightMode, View view) {
+ if (view instanceof CardView) {
+ ((CardView) view).setCardBackgroundColor(ContextCompat.getColor(context, getActiveTextColorId(nightMode)));
+ }
+ }
+
public enum ItemType {
SHOW_TRACK(R.string.shared_string_show_on_map, null),
APPEARANCE(null, null),
@@ -528,6 +549,12 @@ public class TripRecordingBottomSheet extends MenuBottomSheetDialogFragment impl
}
}
+ protected static void setTextColorActive(Context context, TextView tv, boolean nightMode, ItemType type) {
+ if (tv != null) {
+ tv.setTextColor(ContextCompat.getColor(context, getPressedColorId(nightMode)));
+ }
+ }
+
protected static void setTintedIcon(Context context, AppCompatImageView iv, boolean enabled, boolean nightMode, ItemType type) {
Integer iconId = type.getIconId();
if (iv != null && iconId != null) {
@@ -550,6 +577,17 @@ public class TripRecordingBottomSheet extends MenuBottomSheetDialogFragment impl
}
}
+ protected static void setTintedIconActive(Context context, AppCompatImageView iv, boolean nightMode, ItemType type) {
+ Integer iconId = type.getIconId();
+ if (iv != null && iconId != null) {
+ Drawable icon = AppCompatResources.getDrawable(context, iconId);
+ if (icon != null) {
+ DrawableCompat.setTint(icon, ContextCompat.getColor(context, getPressedColorId(nightMode)));
+ }
+ iv.setImageDrawable(icon);
+ }
+ }
+
@Override
public void onPointSelected(TrkSegment segment, double lat, double lon) {
if (trackChartPoints == null) {
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingStartingBottomSheet.java b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingStartingBottomSheet.java
index e45f792514..17d472a489 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingStartingBottomSheet.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingStartingBottomSheet.java
@@ -35,6 +35,7 @@ import net.osmand.plus.settings.fragments.BaseSettingsFragment.SettingsScreenTyp
import static net.osmand.plus.monitoring.OsmandMonitoringPlugin.MINUTES;
import static net.osmand.plus.monitoring.OsmandMonitoringPlugin.SECONDS;
+import static net.osmand.plus.monitoring.TripRecordingBottomSheet.createItemActive;
import static net.osmand.plus.monitoring.TripRecordingBottomSheet.createItem;
import static net.osmand.plus.monitoring.TripRecordingBottomSheet.createShowTrackItem;
import static net.osmand.plus.monitoring.TripRecordingBottomSheet.updateTrackIcon;
@@ -123,7 +124,7 @@ public class TripRecordingStartingBottomSheet extends MenuBottomSheetDialogFragm
});
CardView cardCenter = itemView.findViewById(R.id.button_center);
- createItem(app, nightMode, cardCenter, ItemType.START_RECORDING, true, null);
+ createItemActive(app, nightMode, cardCenter, ItemType.START_RECORDING);
cardCenter.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
From 2c43cf8b936fbba4e257bc630865896c2ba99053 Mon Sep 17 00:00:00 2001
From: androiddevkotlin <64539346+androiddevkotlin@users.noreply.github.com>
Date: Thu, 25 Mar 2021 00:59:57 +0200
Subject: [PATCH 04/42] =?UTF-8?q?if=20the=20action=20name=20is=20available?=
=?UTF-8?q?=20for=20editing,=20we=20should=20not=20show=20the=20"Show/hide?=
=?UTF-8?q?=20=E2=80=93=20"?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../quickaction/CreateEditActionDialog.java | 20 ++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/quickaction/CreateEditActionDialog.java b/OsmAnd/src/net/osmand/plus/quickaction/CreateEditActionDialog.java
index 0a7b95f216..0ab34884e2 100644
--- a/OsmAnd/src/net/osmand/plus/quickaction/CreateEditActionDialog.java
+++ b/OsmAnd/src/net/osmand/plus/quickaction/CreateEditActionDialog.java
@@ -220,9 +220,23 @@ public class CreateEditActionDialog extends DialogFragment
nameEditText.setEnabled(action.isActionEditable());
action.setAutoGeneratedTitle(nameEditText);
- if (savedInstanceState == null) nameEditText.setText(action.getName(getContext()));
- else action.setName(nameEditText.getText().toString());
-
+ if (savedInstanceState == null) {
+ String name = action.getName(getContext());
+ if (action.getActionNameRes() != 0 && !action.isActionEditable()) {
+ String actionName;
+ if (getString(action.getActionNameRes()).contains("Show/hide")) {
+ actionName = getString(action.getActionNameRes());
+ nameEditText.setText(getString(R.string.ltr_or_rtl_combine_via_dash, actionName, name));
+ } else {
+ actionName = "";
+ nameEditText.setText(getString(R.string.ltr_or_rtl_combine_via_space, actionName, name));
+ }
+ } else {
+ nameEditText.setText(name);
+ }
+ } else {
+ action.setName(nameEditText.getText().toString());
+ }
image.setImageResource(action.getIconRes(getApplication()));
}
From 5a68b91b0c823ff45b483a22441d339b36d7145a Mon Sep 17 00:00:00 2001
From: Skalii
Date: Thu, 25 Mar 2021 03:51:02 +0200
Subject: [PATCH 05/42] fix close button in main dialog; fix divider between
toggle buttons;
---
.../plus/monitoring/TripRecordingBottomSheet.java | 5 +++--
.../net/osmand/plus/myplaces/SegmentGPXAdapter.java | 10 ++++++++--
OsmAnd/src/net/osmand/plus/track/SegmentsCard.java | 2 +-
.../plus/views/controls/PagerSlidingTabStrip.java | 2 +-
4 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java
index c7f4316848..97a56b6c68 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java
@@ -163,7 +163,7 @@ public class TripRecordingBottomSheet extends MenuBottomSheetDialogFragment impl
ContextCompat.getColor(app, getActiveTextColorId(nightMode)));
CardView cardLeft = itemView.findViewById(R.id.button_left);
- createItem(cardLeft, ItemType.CANCEL);
+ createItem(cardLeft, ItemType.CLOSE);
cardLeft.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@@ -296,7 +296,7 @@ public class TripRecordingBottomSheet extends MenuBottomSheetDialogFragment impl
viewGroup.removeAllViews();
setupDisplayHelper();
- View segmentView = SegmentGPXAdapter.createGpxTabsView(displayHelper, viewGroup, this, nightMode);
+ View segmentView = SegmentGPXAdapter.createGpxTabsView(displayHelper, viewGroup, this, nightMode, true);
AndroidUiHelper.setVisibility(View.GONE, segmentView.findViewById(R.id.list_item_divider));
WrapContentHeightViewPager pager = segmentView.findViewById(R.id.pager);
PagerSlidingTabStrip tabLayout = segmentView.findViewById(R.id.sliding_tabs);
@@ -509,6 +509,7 @@ public class TripRecordingBottomSheet extends MenuBottomSheetDialogFragment impl
STOP_AND_SAVE(R.string.track_recording_save_and_stop, R.drawable.ic_action_save_to_file),
STOP_ONLINE(R.string.live_monitoring_stop, R.drawable.ic_world_globe_dark),
CANCEL(R.string.shared_string_cancel, R.drawable.ic_action_close),
+ CLOSE(R.string.shared_string_close, R.drawable.ic_action_close),
START_RECORDING(R.string.shared_string_control_start, R.drawable.ic_action_direction_movement),
SETTINGS(R.string.shared_string_settings, R.drawable.ic_action_settings),
FINISH(R.string.shared_string_finish, R.drawable.ic_action_point_destination),
diff --git a/OsmAnd/src/net/osmand/plus/myplaces/SegmentGPXAdapter.java b/OsmAnd/src/net/osmand/plus/myplaces/SegmentGPXAdapter.java
index ac45fc1294..9891c6ef5f 100644
--- a/OsmAnd/src/net/osmand/plus/myplaces/SegmentGPXAdapter.java
+++ b/OsmAnd/src/net/osmand/plus/myplaces/SegmentGPXAdapter.java
@@ -6,6 +6,7 @@ import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import androidx.annotation.NonNull;
+import androidx.core.content.ContextCompat;
import net.osmand.AndroidUtils;
import net.osmand.plus.GpxSelectionHelper.GpxDisplayItem;
@@ -48,7 +49,7 @@ public class SegmentGPXAdapter extends ArrayAdapter {
boolean create = false;
if (row == null) {
create = true;
- row = createGpxTabsView(displayHelper, parent, listener, nightMode);
+ row = createGpxTabsView(displayHelper, parent, listener, nightMode, false);
}
GpxDisplayItem item = getItem(position);
if (item != null) {
@@ -66,7 +67,7 @@ public class SegmentGPXAdapter extends ArrayAdapter {
}
public static View createGpxTabsView(TrackDisplayHelper displayHelper, ViewGroup root,
- SegmentActionsListener listener, boolean nightMode) {
+ SegmentActionsListener listener, boolean nightMode, boolean withDivider) {
Context context = root.getContext();
View row = UiUtilities.getInflater(context, nightMode).inflate(R.layout.gpx_list_item_tab_content, root, false);
@@ -74,6 +75,11 @@ public class SegmentGPXAdapter extends ArrayAdapter {
tabLayout.setTabBackground(AndroidUtils.resolveAttribute(context, R.attr.btn_bg_border_inactive));
tabLayout.setIndicatorHeight(0);
tabLayout.setShouldExpand(true);
+ if (withDivider) {
+ tabLayout.setDividerWidth(AndroidUtils.dpToPx(context, 1.0f));
+ tabLayout.setDividerColor(ContextCompat.getColor(context, nightMode ?
+ R.color.stroked_buttons_and_links_outline_dark : R.color.stroked_buttons_and_links_outline_light));
+ }
WrapContentHeightViewPager pager = row.findViewById(R.id.pager);
pager.setSwipeable(false);
pager.setOffscreenPageLimit(2);
diff --git a/OsmAnd/src/net/osmand/plus/track/SegmentsCard.java b/OsmAnd/src/net/osmand/plus/track/SegmentsCard.java
index a3ed324543..8a49438bc6 100644
--- a/OsmAnd/src/net/osmand/plus/track/SegmentsCard.java
+++ b/OsmAnd/src/net/osmand/plus/track/SegmentsCard.java
@@ -42,7 +42,7 @@ public class SegmentsCard extends BaseCard {
container.removeAllViews();
List items = TrackDisplayHelper.flatten(displayHelper.getOriginalGroups(filterTypes));
for (GpxDisplayItem displayItem : items) {
- View segmentView = SegmentGPXAdapter.createGpxTabsView(displayHelper, container, listener, nightMode);
+ View segmentView = SegmentGPXAdapter.createGpxTabsView(displayHelper, container, listener, nightMode, false);
WrapContentHeightViewPager pager = segmentView.findViewById(R.id.pager);
PagerSlidingTabStrip tabLayout = segmentView.findViewById(R.id.sliding_tabs);
diff --git a/OsmAnd/src/net/osmand/plus/views/controls/PagerSlidingTabStrip.java b/OsmAnd/src/net/osmand/plus/views/controls/PagerSlidingTabStrip.java
index f79ac0c6b5..7eade8f2ba 100644
--- a/OsmAnd/src/net/osmand/plus/views/controls/PagerSlidingTabStrip.java
+++ b/OsmAnd/src/net/osmand/plus/views/controls/PagerSlidingTabStrip.java
@@ -485,7 +485,7 @@ public class PagerSlidingTabStrip extends HorizontalScrollView {
dividerPaint.setColor(dividerColor);
for (int i = 0; i < tabCount - 1; i++) {
View tab = tabsContainer.getChildAt(i);
- canvas.drawLine(tab.getRight(), dividerPadding, tab.getRight(), height - dividerPadding, dividerPaint);
+ canvas.drawLine(tab.getRight(), tabsContainer.getTop(), tab.getRight(), tabsContainer.getBottom(), dividerPaint);
}
}
}
From eff2d35a7f9f1ddeb4be2aa1f18e34aba8332eda Mon Sep 17 00:00:00 2001
From: Skalii
Date: Thu, 25 Mar 2021 04:14:47 +0200
Subject: [PATCH 06/42] fix header height in main dialog; fix header title and
stop button title in discard dialog;
---
OsmAnd/res/layout/trip_recording_fragment.xml | 1 +
.../net/osmand/plus/monitoring/TripRecordingBottomSheet.java | 2 +-
.../plus/monitoring/TripRecordingDiscardBottomSheet.java | 4 ++--
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/OsmAnd/res/layout/trip_recording_fragment.xml b/OsmAnd/res/layout/trip_recording_fragment.xml
index 449ae3dd5d..d3f1cd81ca 100644
--- a/OsmAnd/res/layout/trip_recording_fragment.xml
+++ b/OsmAnd/res/layout/trip_recording_fragment.xml
@@ -18,6 +18,7 @@
android:paddingEnd="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:paddingBottom="@dimen/content_padding"
+ android:minHeight="@dimen/bottom_sheet_selected_item_title_height"
android:weightSum="2">
negative = Arrays.asList(CLEAR_DATA, STOP_AND_DISCARD);
+ private static final List negative = Arrays.asList(CLEAR_DATA, STOP, STOP_AND_DISCARD);
ItemType(@Nullable @StringRes Integer titleId, @Nullable @DrawableRes Integer iconId) {
this.titleId = titleId;
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingDiscardBottomSheet.java b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingDiscardBottomSheet.java
index 70414eab5e..cff99d9daa 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingDiscardBottomSheet.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingDiscardBottomSheet.java
@@ -42,13 +42,13 @@ public class TripRecordingDiscardBottomSheet extends MenuBottomSheetDialogFragme
LayoutInflater inflater = UiUtilities.getInflater(app, nightMode);
int verticalBig = getResources().getDimensionPixelSize(R.dimen.dialog_content_margin);
int verticalNormal = getResources().getDimensionPixelSize(R.dimen.content_padding);
- final View buttonDiscard = createItem(inflater, ItemType.STOP_AND_DISCARD);
+ final View buttonDiscard = createItem(inflater, ItemType.STOP);
final View buttonCancel = createItem(inflater, ItemType.CANCEL);
items.add(new BottomSheetItemWithDescription.Builder()
.setDescription(getString(R.string.track_recording_description))
.setDescriptionColorId(getPrimaryTextColorId(nightMode))
- .setTitle(app.getString(R.string.track_recording_title))
+ .setTitle(app.getString(R.string.track_recording_stop_without_saving))
.setLayoutId(R.layout.bottom_sheet_item_title_with_description)
.create());
From e292cfc030ea707d130d8e36b35bd87b3f9343db Mon Sep 17 00:00:00 2001
From: Evgenii Martynenko
Date: Thu, 25 Mar 2021 07:07:56 +0000
Subject: [PATCH 07/42] Translated using Weblate (Russian)
Currently translated at 100.0% (3690 of 3690 strings)
---
OsmAnd/res/values-ru/strings.xml | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/OsmAnd/res/values-ru/strings.xml b/OsmAnd/res/values-ru/strings.xml
index 1b8e013301..564504ae5d 100644
--- a/OsmAnd/res/values-ru/strings.xml
+++ b/OsmAnd/res/values-ru/strings.xml
@@ -3893,7 +3893,7 @@
Профиль пользователя
Профиль OsmAnd
Выберите профиль, который будет использоваться при запуске приложения.
- Последний раз использовалось
+ Последний используемый
Разрешить прерывистые водные пути
Разрешить прерывистые водные пути
• Добавлена возможность экспорта и импорта всех данных, включая настройки, ресурсы, мои места.
@@ -4043,4 +4043,8 @@
«Частный» означает, что трек не будет виден в любых общедоступных списках, но точки из него будут доступны через public GPS API без отметок времени.
Выберите цель, чтобы проложить к ней короткий, быстрый или безопасный маршрут
Удалить %1$d файлов\?
+ Сохранить и продолжить
+ Все несохраненные данные будут потеряны.
+ Показывать начальный диалог
+ Если выключено, запись начнется сразу после нажатия на виджет или пункт меню, пропуская диалоговое окно подтверждения.
\ No newline at end of file
From 3e6d65d08aa6483ef13badf67ede61a6288cbb71 Mon Sep 17 00:00:00 2001
From: solokot
Date: Thu, 25 Mar 2021 07:02:58 +0000
Subject: [PATCH 08/42] Translated using Weblate (Russian)
Currently translated at 100.0% (3690 of 3690 strings)
---
OsmAnd/res/values-ru/strings.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/OsmAnd/res/values-ru/strings.xml b/OsmAnd/res/values-ru/strings.xml
index 564504ae5d..a638ceda23 100644
--- a/OsmAnd/res/values-ru/strings.xml
+++ b/OsmAnd/res/values-ru/strings.xml
@@ -4047,4 +4047,5 @@
Все несохраненные данные будут потеряны.
Показывать начальный диалог
Если выключено, запись начнется сразу после нажатия на виджет или пункт меню, пропуская диалоговое окно подтверждения.
+ Интервал записи трека указывает период времени, через которое OsmAnd будет запрашивать данные о текущем местоположении.
\ No newline at end of file
From 8ee704312318b3bcb85f6d0fda5d4f2a075f09a3 Mon Sep 17 00:00:00 2001
From: Hinagiku Zeppeki
Date: Thu, 25 Mar 2021 05:45:05 +0000
Subject: [PATCH 09/42] Translated using Weblate (Japanese)
Currently translated at 97.1% (3586 of 3690 strings)
---
OsmAnd/res/values-ja/strings.xml | 81 ++++++++++++++++++++++++++++++++
1 file changed, 81 insertions(+)
diff --git a/OsmAnd/res/values-ja/strings.xml b/OsmAnd/res/values-ja/strings.xml
index cc3465ea61..9820354ce7 100644
--- a/OsmAnd/res/values-ja/strings.xml
+++ b/OsmAnd/res/values-ja/strings.xml
@@ -3953,4 +3953,85 @@ POIの更新は利用できません
ログ記録間隔は、OsmAndが現在の位置データを要求する期間を設定します。
保存して続行
保存されていないデータはすべて失われます。
+ OSMメモを閉じる
+ OSMメモへのコメント
+ 安全なOAuth方式を使用してログインするか、アプリから直接ログインする方法を選べます。
+ 写真の追加
+ OpenPlaceReviews.orgに登録
+ 写真はOpenPlaceReviews.orgオープンデータプロジェクトを介して提供されています。そのため写真をアップロードするためには前述のウェブサイトにログインする必要があります。
+ 新しいアカウントを作成
+ 私はすでにアカウントを持っています
+ 検索履歴
+ カヤック
+ モーターボート
+ 画像をアップロードできません。しばらくしてからもう一度お試しください
+ 写真を選択
+ リソース
+ おおよそのファイルサイズ
+ ファイルとしてエクスポートしたいデータを選択します。
+ インポートに必要
+ お使いの端末には%1$sしか容量がありません。空き容量を確保するか、エクスポートするアイテムの選択を減らしてください。
+ 十分な空き容量がありません
+ インポートするグループを選択します。
+ インポートするアイテムを選択します。
+ Mapillaryに追加
+ OpenPlaceReviewsに追加
+ OsmAndは、いくつかのソースからの写真を表示します:
+\nOpenPlaceReviewsはPOIの写真;
+\nMapillaryは投稿されたストリート画像;
+\nWeb / WikimediaはOpenStreetMapデータのPOIの写真を利用しています。
+ この前で分割
+ この後で分割
+ %1$s * %2$s
+ 軽飛行機
+ セグメントの結合
+ 新規セグメントの追加
+ OsmAndプロファイル
+ ユーザープロファイル
+ • 設定、リソース、お気に入りを含むすべてのデータをエクスポートおよびインポートするオプションを追加
+\n
+\n• ルートの計画:ルートを含むトラックセグメントのグラフ、および複数のトラックセグメントを作成および編集する機能を追加
+\n
+\n• OpenStreetMapのOAuth認証方法を追加し、OSMダイアログのUIを改善
+\n
+\n• お気に入りのカスタムカラーのサポート、経由地点の追跡など
+\n
+\n
+ すべての地点を逆転
+ アプリ起動時に適用されるプロファイルを選択します。
+ 最後に利用
+ ハイキング向けのルートを選択します
+ ハイキングコースを優先
+ 小川と排水溝も水路とみなします
+ 小川と排水溝も許可
+ 常に水が流れているわけではない水路も許可
+ 常に水の流れがあるわけではない場所も水路として見なします
+ オンラインルーティングエンジンの追加
+ オンラインルーティングエンジンの編集
+ サブタイプ
+ 車両
+ APIキー
+ サーバーURL
+ パラメーターの入力
+ APIキーがない場合は空白のままにします
+ パラメータを含むURLは次のようになります:
+ ルート計算のテスト
+ ドライブ
+ 徒歩
+ 自転車
+ 車
+ 住所をコピー
+ オンラインルーティングエンジン
+ オンラインルーティングエンジン
+ フォルダー
+ フォルダーを選択、または新しいフォルダを追加します
+ フォルダーの選択
+ 空
+ 分割間隔を分析評価する
+ OpenStreetMapにアップロード
+ 経路の編集
+ 経路名の変更
+ フォルダーの変更
+ 開始ダイアログを表示
+ 無効にした場合、ウィジェットまたはメニュー項目をタップするとすぐに記録が始まり、確認のダイアログは表示されません。
\ No newline at end of file
From 17334eb2cd4a2f8e19b7c0d72f6364f82dc1f655 Mon Sep 17 00:00:00 2001
From: Ldm Public
Date: Wed, 24 Mar 2021 08:04:26 +0000
Subject: [PATCH 10/42] Translated using Weblate (French)
Currently translated at 100.0% (3690 of 3690 strings)
---
OsmAnd/res/values-fr/strings.xml | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/OsmAnd/res/values-fr/strings.xml b/OsmAnd/res/values-fr/strings.xml
index 702b8f37e1..5dc5f5fc88 100644
--- a/OsmAnd/res/values-fr/strings.xml
+++ b/OsmAnd/res/values-fr/strings.xml
@@ -4030,12 +4030,14 @@
Itinéraire court optimisé (plus économe en énergie)
Masquer les limites des réserves naturelles, des zones protégées et des parcs nationaux
Limites naturelles
- %1$s contient plus d\'un segment, vous devez sélectionner le tronçon nécessaire à la navigation.
- Sélectionnez le mode de conduite pour avoir l\'itinéraire le plus court, le plus rapide, ou le plus sûr
- Appuyer pour afficher ou cacher le widget Coordonnées sur la carte.
- L’icône de localisation va se déplacer sur le trajet en cours.
- Veuillez sélectionner un autre type de colorisation.
+ %1$s contient plusieurs segments, vous devez sélectionner un tronçon pour la navigation.
+ Sélectionnez un mode de conduite pour calculer l\'itinéraire le plus court, le plus rapide ou le plus sûr.
+ Appuyez pour afficher ou masquer le gadget Coordonnées sur la carte.
+ L’icône de positionnement se déplacera sur le trajet en cours.
+ Veuillez sélectionner une autre coloration.
L\'intervalle d’enregistrement définit la fréquence à laquelle OsmAnd récupérera les données de localisation.
Enregistrer et continuer
Toutes les données non enregistrées seront perdues.
+ Afficher la boîte de dialogue de démarrage
+ Si désactivé, l\'enregistrement débutera dès appui sur le gadget ou dans le menu (sans demande de confirmation).
\ No newline at end of file
From 036ab858ef85c1e26c9f8bc61a8f5ffb42b4f463 Mon Sep 17 00:00:00 2001
From: Oliver
Date: Wed, 24 Mar 2021 21:16:37 +0000
Subject: [PATCH 11/42] Translated using Weblate (German)
Currently translated at 99.9% (3689 of 3690 strings)
---
OsmAnd/res/values-de/strings.xml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/OsmAnd/res/values-de/strings.xml b/OsmAnd/res/values-de/strings.xml
index 0f36ffa3b1..4be82a75ce 100644
--- a/OsmAnd/res/values-de/strings.xml
+++ b/OsmAnd/res/values-de/strings.xml
@@ -4050,4 +4050,8 @@
Kategorie auswählen oder neue hinzufügen
Grenzen von Naturschutzgebieten, Schutzgebieten und Nationalparks ausblenden
Grenzen von Schutzgebieten
+ Speichern und fortfahren
+ Alle nicht gespeicherten Daten gehen verloren.
+ Startdialog anzeigen
+ Wenn deaktiviert, beginnt die Aufnahme direkt nach dem Tippen auf das Widget oder den Menüpunkt und überspringt den Bestätigungsdialog.
\ No newline at end of file
From f96118767d4c2031b5dab2a7ed10382124385462 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Babos=20G=C3=A1bor?=
Date: Tue, 23 Mar 2021 21:36:50 +0000
Subject: [PATCH 12/42] Translated using Weblate (Hungarian)
Currently translated at 100.0% (3690 of 3690 strings)
---
OsmAnd/res/values-hu/strings.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/OsmAnd/res/values-hu/strings.xml b/OsmAnd/res/values-hu/strings.xml
index f42791d9aa..e95128dd82 100644
--- a/OsmAnd/res/values-hu/strings.xml
+++ b/OsmAnd/res/values-hu/strings.xml
@@ -4042,4 +4042,6 @@
A naplózási intervallum az az időköz, amelyben az OsmAnd lekéri az aktuális helyadatokat.
Mentés és folytatás
Minden nem mentett adat törlődni fog.
+ Kezdő párbeszéd megjelenítése
+ Ha le van tiltva, akkor a felvétel közvetlenül a widget vagy a menüelem megérintése után elindul, kihagyva a megerősítő párbeszédpanelt.
\ No newline at end of file
From 9fc2fcf2bdcc9033d3b84f29a4d742471c25052f Mon Sep 17 00:00:00 2001
From: Ihor Hordiichuk
Date: Tue, 23 Mar 2021 23:48:17 +0000
Subject: [PATCH 13/42] Translated using Weblate (Ukrainian)
Currently translated at 100.0% (3690 of 3690 strings)
---
OsmAnd/res/values-uk/strings.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/OsmAnd/res/values-uk/strings.xml b/OsmAnd/res/values-uk/strings.xml
index 262ec98674..6e7fab1d5f 100644
--- a/OsmAnd/res/values-uk/strings.xml
+++ b/OsmAnd/res/values-uk/strings.xml
@@ -4047,4 +4047,6 @@
Інтервал журналювання встановлює проміжок часу, впродовж якого OsmAnd запитуватиме дані про поточне розташування.
Зберегти й продовжити
Усі незбережені дані буде втрачено.
+ Показати діалогове вікно запуску
+ Якщо вимкнено, запис почнеться відразу після торкання до віджета або пункту меню, пропускаючи діалогове вікно підтвердження.
\ No newline at end of file
From d02665032aec4152fe8dd7f1aa6305cb10c28f7e Mon Sep 17 00:00:00 2001
From: Mirco Zorzo
Date: Wed, 24 Mar 2021 15:16:04 +0000
Subject: [PATCH 14/42] Translated using Weblate (Italian)
Currently translated at 88.2% (3257 of 3690 strings)
---
OsmAnd/res/values-it/strings.xml | 109 ++++++++++++++++++++++++++++++-
1 file changed, 108 insertions(+), 1 deletion(-)
diff --git a/OsmAnd/res/values-it/strings.xml b/OsmAnd/res/values-it/strings.xml
index 0b578f99f3..240b7e3156 100644
--- a/OsmAnd/res/values-it/strings.xml
+++ b/OsmAnd/res/values-it/strings.xml
@@ -2163,7 +2163,6 @@
Tempo
Distanza totale
Utilizza dati altitudine
-
Intervallo di tempo
Massimo
Ora d\'inizio
@@ -3930,4 +3929,112 @@
OpenPlaceReviews
Usa test.openplacereviews.org
Accedi a OpenPlaceReviews
+ Inverti tutti i punti
+ Tempo degli avvisi vocali
+ Profilo OsmAnd
+ Profilo utente
+ Seleziona il profilo, sarà utilizzato all\'avvio dell\'app.
+ Ultimo utilizzato
+ Preferisci i percorsi escursionistici
+ Preferisci i percorsi escursionistici
+ Aggiungi un motore di navigazione online
+ Modifica il motore di navigazione online
+ Sottocategoria
+ Veicolo
+ Chiave API
+ URL del server
+ Immetti un parametro
+ "Mantienilo vuoto se non lo fosse"
+ URL con tutti i parametri saranno come questo:
+ Prova il calcolo del percorso
+ Driving
+ A piedi
+ Bici
+ Auto
+ Copia l\'indirizzo
+ Motori di navigazione online
+ Motori di navigazione online
+ Cartelle
+ Seleziona una cartella
+ Seleziona una cartella o aggiungine una nuova
+ Vuoto
+ Analizza per intervalli
+ Carica in OpenStreetMap
+ Modifica la traccia
+ Rinomina la traccia
+ Cambia cartella
+ sec
+ Passing
+ Approach
+ Long prepare
+ Preparazione
+ Fuoristrada
+ Intervalli di tempo e distanza
+ Il tempo dell\'annuncio per i diversi avvisi dipende dal tipo di avviso, la velocità attuale e la velocità preimpostata.
+ Tempo dell\'annuncio
+ Bici elettrica
+ Mountain cycling
+ Bici da corsa
+ Regular cycling
+ Piccolo furgone
+ Leggi tutto
+ Seleziona segmenti
+ %1$s contiene più di un segmento, devi selezionare la parte necessaria per la navigazione.
+ Segmento %1$d
+ Water
+ Winter
+ Gatto delle nevi
+ Riding
+ Racing
+ Mountainbike
+ Bici
+ Escursione
+ Corsa
+ A piedi
+ Fuoristrada
+ Moto
+ Auto
+ Utilizza le restrizioni stradali che sono attive attualmente sulla mappa
+ Percorso più breve ottimizzato (risparmio energia)
+ Scegli il tipo di guida per ottenere percorsi più brevi, veloci e sicuri
+ L\'icona della localizzazione attuale sarà incollata al percorso corrente
+ Non ruotare la visualizzazione della mappa se la velocità è inferiore a un valore
+ Riavvia
+ Tutte le regioni
+ Cancellare %1$d file\?
+ Ferma senza salvare
+ Salva e ferma la registrazione
+ Registrazione della traccia fermata
+ Confermi di volere fermare la registrazione\?
+\nTutti i dati non salvati saranno persi.
+ In pausa
+ Il riavvio dell\'app è richiesto per applicare alcune impostazioni.
+ Il calcolo del percorso può evitare le salite ripide.
+ Un interruttore per mostrare o nascondere il widget delle coordinate sulla mappa.
+ Distanza dal tocco
+ Ultimo aggiornamento OpenStreetMap disponibile:
+ Aggiornamento: %s
+ Ultimo controllo: %s
+ Frequenza di aggiornamento
+ Gli aggiornamenti della mappa saranno controllati ogni settimana. Il prossimo %1$s in %2$s.
+ Gli aggiornamenti della mappa saranno controllati ogni giorno. La prossima volta %1$s in %2$s.
+ Gli aggiornamenti alla mappa saranno controllati ogni ora. Il prossimo alle %1$s in %2$s.
+ Elimina aggiornamenti
+ Confermi di voler eliminare tutti %s gli aggiornamenti live\?
+ Acquisti
+ Seleziona la categoria o aggiungine una nuova
+ La registrazione sarà continuata.
+ Copia il nome del PDI
+ Mostra/nascondi
+ Intervallo
+ Nascondi i confini delle riserve naturali, delle aree protette e dei parchi naturali.
+ Confini naturali
+ La traccia non contiene i dati di altitudine.
+ La traccia non contiene i dati di velocità.
+ Prego selezionare un altro tipo di colorazione.
+ "L\'intervallo di registrazione imposta la frequenza con cui OsmAnd chiederà i dati della posizione attuale."
+ Salva e continua
+ Tutti i dati non salvati andranno persi.
+ Mostra la finestra di avvio
+ Se disabilitato, la registrazione inizierà appena tappato sul widget o sul menu, saltando la finestra di configurazione.
\ No newline at end of file
From 5694e4469a790e9f2ccfcf0fdfdcafb716846c81 Mon Sep 17 00:00:00 2001
From: ace shadow
Date: Wed, 24 Mar 2021 09:35:24 +0000
Subject: [PATCH 15/42] Translated using Weblate (Slovak)
Currently translated at 100.0% (3690 of 3690 strings)
---
OsmAnd/res/values-sk/strings.xml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/OsmAnd/res/values-sk/strings.xml b/OsmAnd/res/values-sk/strings.xml
index eacbe24df2..6c12a3f3b0 100644
--- a/OsmAnd/res/values-sk/strings.xml
+++ b/OsmAnd/res/values-sk/strings.xml
@@ -4040,4 +4040,9 @@
Optimalizovaná kratšia trasa (úspora energie)
Ikona aktuálnej polohy bude prichytená k navigačnej trase
Výpočet trasy sa môže vyhnúť strmým stúpaniam.
+ Interval zaznamenávania nastaví ako často bude OsmAnd zisťovať aktuálnu polohu.
+ Uložiť a pokračovať
+ Všetky neuložené údaje budú stratené.
+ Zobraziť úvodné okno
+ Ak je vypnuté, záznam začne hneď po stlačení nástroja alebo položky v menu a preskočí okno nastavenia.
\ No newline at end of file
From 832749696521d35abe18563dd4ac6d21f7c27e9b Mon Sep 17 00:00:00 2001
From: Yaron Shahrabani
Date: Thu, 25 Mar 2021 05:32:49 +0000
Subject: [PATCH 16/42] Translated using Weblate (Hebrew)
Currently translated at 99.9% (3689 of 3690 strings)
---
OsmAnd/res/values-iw/strings.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/OsmAnd/res/values-iw/strings.xml b/OsmAnd/res/values-iw/strings.xml
index 76006696f9..c320b44aa6 100644
--- a/OsmAnd/res/values-iw/strings.xml
+++ b/OsmAnd/res/values-iw/strings.xml
@@ -4051,4 +4051,6 @@
הגדרת הפרש קבוע בין הבקשות של OsmAnd לקבלת נתוני המיקום הנוכחיים.
לשמור ולהמשיך
כל הנתונים שלא נשמרו יאבדו.
+ להציג חלונית פתיחה
+ אם האפשרות מושבתת, ההקלטה תתחיל מיד לאחר הנגיעה בווידג׳ט או בפריט שבתפריט תוך דילוג על חלונית האישור.
\ No newline at end of file
From eb3584b79fa115a2f5772882b3b6e1bd549ee72a Mon Sep 17 00:00:00 2001
From: Softmap
Date: Wed, 24 Mar 2021 23:13:41 +0000
Subject: [PATCH 17/42] Translated using Weblate (Arabic)
Currently translated at 100.0% (3690 of 3690 strings)
---
OsmAnd/res/values-ar/strings.xml | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/OsmAnd/res/values-ar/strings.xml b/OsmAnd/res/values-ar/strings.xml
index 4be8c83219..475178ebc4 100644
--- a/OsmAnd/res/values-ar/strings.xml
+++ b/OsmAnd/res/values-ar/strings.xml
@@ -4074,7 +4074,7 @@
دراجة نارية
سيارة
نسخ اسم POI
- الرجاء اختيار أنواع أخرى من التلوين
+ الرجاء اختيار أنواع أخرى من التلوين.
سيتم التقاط الرمز إلى مسار التنقل الحالي
حدد الجزء
%1$s يحتوي على أكثر من مقطع ، تحتاج إلى تحديد الجزء المطلوب للتنقل.
@@ -4114,4 +4114,9 @@
لا يحتوي المسار على بيانات السرعة.
إخفاء المحميات الطبيعية والمناطق المحمية وحدود المتنزهات الوطنية
حدود الطبيعة
+ إذا تم تعطيله، فسيبدأ التسجيل مباشرة بعد النقر على الويدجيت أو عنصر القائمة ، متخطيا لمربع حوار التأكيد.
+ الفاصل الزمني للتسجيل يحدد الفترة الزمنية التي سيسأل فيها OsmAnd عن بيانات الموقع الحالي.
+ سيتم فقدان كافة البيانات غير المحفوظة.
+ إظهار مربع حوار البدء
+ حفظ ومتابعة
\ No newline at end of file
From 4f3e522424076c00aca523247ed84d306d9ff978 Mon Sep 17 00:00:00 2001
From: iman
Date: Tue, 23 Mar 2021 21:02:47 +0000
Subject: [PATCH 18/42] Translated using Weblate (Persian)
Currently translated at 99.8% (3686 of 3690 strings)
---
OsmAnd/res/values-fa/strings.xml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/OsmAnd/res/values-fa/strings.xml b/OsmAnd/res/values-fa/strings.xml
index 2d0bce8623..5196513604 100644
--- a/OsmAnd/res/values-fa/strings.xml
+++ b/OsmAnd/res/values-fa/strings.xml
@@ -4069,4 +4069,8 @@
دکمهای برای آشکار یا پنهان کردن ابزارک مختصات روی نقشه.
بازه
مسافت با لمس
+ ذخیره و ادامه
+ نمایش کادر آغاز
+ اگر غیرفعال باشد، بلافاصله پس از لمس ابزارک یا آیتم منو، ضبط آغاز میشود و کادر تأیید ظاهر نمیشود.
+ تمام دادهٔ ذخیرهنشده از دست خواهد رفت.
\ No newline at end of file
From 45672c2b4748fe9aa99a5476e3dab4307affc259 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20Kotr=C4=8D?=
Date: Wed, 24 Mar 2021 19:28:51 +0000
Subject: [PATCH 19/42] Translated using Weblate (Czech)
Currently translated at 100.0% (3690 of 3690 strings)
---
OsmAnd/res/values-cs/strings.xml | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/OsmAnd/res/values-cs/strings.xml b/OsmAnd/res/values-cs/strings.xml
index be9db73a65..7bfe9595bf 100644
--- a/OsmAnd/res/values-cs/strings.xml
+++ b/OsmAnd/res/values-cs/strings.xml
@@ -1195,7 +1195,7 @@
Oblíbené body sdílené přes OsmAnd
Neplatný formát: %s
Prázdný soubor GPX
- Všechny trasy
+ Stopy
Oblíbené
Moje místa
Načítání %1$s…
@@ -2174,7 +2174,7 @@
Vyberte složku pro soubor GPX
Soubor se nepodařilo přesunout.
Přesunout
- Trasy
+ Stopy
Doba pohybu
Časový rozsah
Maximum
@@ -2267,7 +2267,7 @@
Váš cíl se nachází v oblasti se soukromým přístupem. Povolit vstup na soukromé pozemky pro tuto cestu?
Spustit hledání znovu
Zvětšit okruh hledání
- Nic nalezeno
+ Nic nebylo nalezeno
Změňte vyhledávací dotaz nebo zvětšete okruh hledání.
Oprávnění
Nepodařilo se naimportovat soubor. Prosím zkontrolujte, zda má OsmAnd oprávnění ke čtení souboru.
@@ -2496,8 +2496,8 @@
Chyba při importu mapy
Mapa byla importována
Aktuální
- Přidá poslední mezizastávku
- Přidá první mezizastávku
+ Přidá poslední mezicíl
+ Přidá první mezicíl
Přesune cíl nahoru a vytvoří ho
OsmAnd (OSM Automated Navigation Directions) je mapová a navigační aplikace s přístupem k volným a kvalitním celosvětovým údajům z OpenStreetMap (OSM).
\n
@@ -2829,7 +2829,7 @@
Hladkost povrchu
Strmost
Ukázat více
- Zobrazené trasy
+ Zobrazené stopy
Denní doba
Krok za krokem
Typy silnic
@@ -3853,7 +3853,7 @@
Východ slunce v %1$s
Západ slunce v %1$s
%1$s/%2$s
- Všechna nastavení profilu obnovena do základního nastavení.
+ Všechna nastavení profilu obnovena do výchozího stavu.
Všechna nastavení modulů obnovena do výchozího stavu.
Zobrazit pouze v noci
Přidat vlastní kategorii
@@ -4045,4 +4045,9 @@
Vyberte prosím jiný typ obarvení.
Skrýt hranice přírodních rezervací, chráněných území a národních parků
Hranice přírody
+ Interval záznamu nastaví, jak často bude OsmAnd zjišťovat aktuální polohu.
+ Uložit a pokračovat
+ Všechna neuložená data budou ztracena.
+ Zobrazit úvodní okno
+ Pokud je vypnuto, záznam začne hned po klepnutí na nástroj nebo položku v menu, přeskočí tedy potvrzovací okno.
\ No newline at end of file
From 39630ab43b5203912cb1d50ab2f8be9cb60dfe5c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=9F=D0=BB=D0=B0=D0=BC=D0=B5=D0=BD?=
Date: Tue, 23 Mar 2021 22:32:43 +0000
Subject: [PATCH 20/42] Translated using Weblate (Bulgarian)
Currently translated at 46.3% (1711 of 3690 strings)
---
OsmAnd/res/values-bg/strings.xml | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/OsmAnd/res/values-bg/strings.xml b/OsmAnd/res/values-bg/strings.xml
index 215fbfee06..76af9d718e 100644
--- a/OsmAnd/res/values-bg/strings.xml
+++ b/OsmAnd/res/values-bg/strings.xml
@@ -2258,4 +2258,20 @@
Абонаментът позволява почасови, ежедневни, седмични актуализации и неограничено изтегляне за всички карти в световен мащаб.
Изберете езиците на които Уикипедия публикациите ще се появяват на картата. Можете да превключвате между наличните езици докато четете публикацията.
Допълнителни карти
+ Използване на test.openplacereviews.org
+ Вход в OpenPlaceПрегледи
+ OpenPlaceReviews
+ Вода
+ Зима
+ Моторни шейни
+ Езда
+ Състезание
+ Планинско колоездене
+ Колоездене
+ Туризъм
+ Бягане
+ Ходене
+ Офроуд
+ Мотор
+ Автомобил
\ No newline at end of file
From 109ae94c33871b593c2877ea81970b097f41730a Mon Sep 17 00:00:00 2001
From: Franco
Date: Wed, 24 Mar 2021 13:20:21 +0000
Subject: [PATCH 21/42] Translated using Weblate (Spanish (Argentina))
Currently translated at 100.0% (3690 of 3690 strings)
---
OsmAnd/res/values-es-rAR/strings.xml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/OsmAnd/res/values-es-rAR/strings.xml b/OsmAnd/res/values-es-rAR/strings.xml
index 08ecee8769..720dccf045 100644
--- a/OsmAnd/res/values-es-rAR/strings.xml
+++ b/OsmAnd/res/values-es-rAR/strings.xml
@@ -4047,4 +4047,9 @@
Elige otro tipo de color.
Fronteras naturales
Oculta fronteras de reservas naturales, áreas protegidas y parques nacionales
+ El intervalo de registro define el período de tiempo en el que OsmAnd pedirá los datos de la ubicación actual.
+ Guardar y continuar
+ Se perderán todos los datos no guardados.
+ Mostrar el diálogo inicial
+ Si se desactiva, la grabación será iniciada al pulsar el widget o el elemento del menú, saltándose el diálogo de confirmación.
\ No newline at end of file
From b5c5627b0535d8fb9739158c46aef80da4b86294 Mon Sep 17 00:00:00 2001
From: Eduardo Addad de Oliveira
Date: Thu, 25 Mar 2021 00:26:47 +0000
Subject: [PATCH 22/42] Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (3690 of 3690 strings)
---
OsmAnd/res/values-pt-rBR/strings.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/OsmAnd/res/values-pt-rBR/strings.xml b/OsmAnd/res/values-pt-rBR/strings.xml
index 1914ba1d48..0c4060b65a 100644
--- a/OsmAnd/res/values-pt-rBR/strings.xml
+++ b/OsmAnd/res/values-pt-rBR/strings.xml
@@ -4042,4 +4042,7 @@
Segmento %1$d
Salvar e continuar
Todos os dados não salvos serão perdidos.
+ O intervalo de registro define o período de tempo no qual OsmAnd solicitará os dados de posição de localização atual.
+ Mostrar caixa de diálogo inicial
+ Se desativado, a gravação começará logo após tocar no widget ou item de menu, pulando a caixa de diálogo de confirmação.
\ No newline at end of file
From c57c44cb0cba7b7155b596e9036b1f9d619417a5 Mon Sep 17 00:00:00 2001
From: Shjosan
Date: Wed, 24 Mar 2021 16:37:59 +0000
Subject: [PATCH 23/42] Translated using Weblate (Swedish)
Currently translated at 87.1% (3393 of 3894 strings)
---
OsmAnd/res/values-sv/phrases.xml | 76 +++++++++++++++++++++++++++++---
1 file changed, 70 insertions(+), 6 deletions(-)
diff --git a/OsmAnd/res/values-sv/phrases.xml b/OsmAnd/res/values-sv/phrases.xml
index 8546a555f5..e209110762 100644
--- a/OsmAnd/res/values-sv/phrases.xml
+++ b/OsmAnd/res/values-sv/phrases.xml
@@ -2518,7 +2518,7 @@
Skyddsobjekt: vatten
Explosion: land
Kärnvapenexplosionplats
- "Explosionstyp: underjord, schakcft "
+ Explosionstyp: underjord, schakt
Explosionstyp: underjord, tunnel
Explosionstyp: atmosfärisk
Explosionstyp: atmosfärisk, airdrop
@@ -2550,8 +2550,8 @@
Explosionshöjd
Nollnivå-punkt
Kroppsvågsmagnitud
- "Explosionssalva: första detonationen av ett salvtest"
- "Explosionssalva: andra eller senare detonation av ett salvtest"
+ Explosionssalva: första detonationen av ett salvtest
+ Explosionssalva: andra eller senare detonation av ett salvtest
Explosionssalva: kraterdiameter
Explosion: stridsspets
Explosion: enhet
@@ -2938,7 +2938,7 @@
Koreanskt
Medelhavs
Bayerskt
- "Libanesiskt "
+ Libanesiskt
Ryskt
Filippinskt
Portugisiskt
@@ -2977,12 +2977,12 @@
Afghanskt
Belgiskt
Baskiskt
- "Schweiziskt "
+ Schweiziskt
Kantonesiskt
Svenskt
Jamaicanskt
Armeniskt
- "Hawaiianskt "
+ Hawaiianskt
Engelskt
Pakistanskt
Taiwanesiskt
@@ -3329,4 +3329,68 @@
Plats: ute
Plats: tak
Plats: tak
+ Uttag: NEMA 5-15R
+ Blandad: nej
+ Blandad: ja
+ Is: nej
+ Is: ja
+ \"Multi-pitch\"-väg: nej
+ \"Multi-pitch\"-väg: ja
+ Traditionell: nej
+ Traditionell: ja
+ Topprep: nej
+ Topprep: ja
+ Boldering: nej
+ Bouldering: ja
+ Sport: nej
+ Sport: ja
+ Postnummer
+ Pengaöverföring
+ BEtalningscentral
+ PLatt
+ Husnummer
+ Gata
+ Brevlåda
+ Depå
+ Laddningsstation
+ Kartstorlek: region
+ Kartstorlek: stad
+ Kartstorlek: plats
+ Karttyp: toposkop
+ Karttyp: schema
+ Karttyp: gata
+ Karttyp: topo
+ Laddningsstations utgång
+ Strömstyrka
+ Parkeringsavgift
+ Parkeringsavgift: nej
+ Parkeringsavgift: ja
+ Lastbil: nej
+ Lastbil: ja
+ Scooter: nej
+ Scooter: ja
+ Cykel: nej
+ Cykel: ja
+ Bil: nej
+ Bil: ja
+ Uttag: AS/NZS 3112: utgång
+ Uttag: AS/NZS 3112: ström
+ Uttag: AS/NZS 3112
+ Uttag: BS 1363: utgång
+ Uttag: BS 1363: ström
+ Uttag: BS 1363
+ Uttag: Schuko: utgång
+ Uttag: Schuko: ström
+ Uttag: Schuko
+ Uttag: NEMA 14-50: utgång
+ Uttag: NEMA 14-50: ström
+ Uttag: NEMA 14-50
+ Uttag: NEMA 14-30: ugång
+ Uttag: NEMA 14-30: ström
+ Uttag: NEMA 14-30
+ Uttag: NEMA 5-20: utgående
+ Uttag: NEMA 5-20: ström
+ Uttag: NEMA 5-20
+ Uttag: NEMA 5-15R: utgång
+ Uttag: NEMA 5-15R: ström
\ No newline at end of file
From 4cf50ad804901a24f380c16f4a186d44b8428184 Mon Sep 17 00:00:00 2001
From: Franco
Date: Wed, 24 Mar 2021 13:23:52 +0000
Subject: [PATCH 24/42] Translated using Weblate (Spanish (American))
Currently translated at 100.0% (3690 of 3690 strings)
---
OsmAnd/res/values-es-rUS/strings.xml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/OsmAnd/res/values-es-rUS/strings.xml b/OsmAnd/res/values-es-rUS/strings.xml
index 1669ea5037..fad07e4c5d 100644
--- a/OsmAnd/res/values-es-rUS/strings.xml
+++ b/OsmAnd/res/values-es-rUS/strings.xml
@@ -4047,4 +4047,9 @@
La traza no contiene datos de altitud.
La traza no contiene datos de velocidad.
Elige otro tipo de color.
+ El intervalo de registro define el período de tiempo en el que OsmAnd pedirá los datos de la ubicación actual.
+ Guardar y continuar
+ Se perderán todos los datos no guardados.
+ Mostrar el diálogo inicial
+ Si se desactiva, la grabación será iniciada al pulsar el widget o el elemento del menú, saltándose el diálogo de confirmación.
\ No newline at end of file
From f72482e2c22fe1b6609fe9784b4ec35bef1e94db Mon Sep 17 00:00:00 2001
From: Franco
Date: Wed, 24 Mar 2021 19:37:27 +0000
Subject: [PATCH 25/42] Translated using Weblate (Spanish (American))
Currently translated at 100.0% (3894 of 3894 strings)
---
OsmAnd/res/values-es-rUS/phrases.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/OsmAnd/res/values-es-rUS/phrases.xml b/OsmAnd/res/values-es-rUS/phrases.xml
index 1eb2e19c0f..db9d0cc849 100644
--- a/OsmAnd/res/values-es-rUS/phrases.xml
+++ b/OsmAnd/res/values-es-rUS/phrases.xml
@@ -3145,7 +3145,7 @@
Reservación: no
Reservación: sólo miembros
Camas
- Barcos de alquiler
+ Barcos alquilados
Alquiler de barcos
Lanchas de motor: sí
Lanchas de motor: no
From 0f362fe5251a34aed31588b4bb0aeb24cb4423ce Mon Sep 17 00:00:00 2001
From: phlostically
Date: Wed, 24 Mar 2021 01:04:20 +0000
Subject: [PATCH 26/42] Translated using Weblate (Esperanto)
Currently translated at 100.0% (3690 of 3690 strings)
---
OsmAnd/res/values-eo/strings.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/OsmAnd/res/values-eo/strings.xml b/OsmAnd/res/values-eo/strings.xml
index 178af35973..0eb1180e72 100644
--- a/OsmAnd/res/values-eo/strings.xml
+++ b/OsmAnd/res/values-eo/strings.xml
@@ -4048,4 +4048,6 @@
Agordita periodo de intertempo de registrado, dum kiu OsmAnd petos la nunajn poziciajn datumojn.
Ĉiuj nekonservitaj datumoj perdiĝos.
Konservi kaj daŭrigi
+ Se malŝaltita, registrado komenciĝos tuj post frapeto sur la fenestraĵo aŭ menuero, preterlasante la konfirman dialogon.
+ Montri komencan dialogon
\ No newline at end of file
From bd835b0153ec81de4426befa27dc580732f5fffb Mon Sep 17 00:00:00 2001
From: Jeff Huang
Date: Wed, 24 Mar 2021 02:22:48 +0000
Subject: [PATCH 27/42] Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (3690 of 3690 strings)
---
OsmAnd/res/values-zh-rTW/strings.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/OsmAnd/res/values-zh-rTW/strings.xml b/OsmAnd/res/values-zh-rTW/strings.xml
index 4bef29c778..a40440e789 100644
--- a/OsmAnd/res/values-zh-rTW/strings.xml
+++ b/OsmAnd/res/values-zh-rTW/strings.xml
@@ -4041,4 +4041,6 @@
紀錄間隔設定的時段,OsmAnd 將會要求目前位置的位置資料。
儲存並繼續
所有未儲存的資料都將會遺失。
+ 顯示開始對話框
+ 若停用,則在點擊小工具或選單項目後將跳過確認對話框,立刻開始。
\ No newline at end of file
From 5e6c9a335efe0bd5cc8135a5329d65d2132626bd Mon Sep 17 00:00:00 2001
From: Remi
Date: Wed, 24 Mar 2021 12:39:06 +0000
Subject: [PATCH 28/42] Translated using Weblate (Dutch)
Currently translated at 98.3% (3629 of 3690 strings)
---
OsmAnd/res/values-nl/strings.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/OsmAnd/res/values-nl/strings.xml b/OsmAnd/res/values-nl/strings.xml
index e8767cf4cf..07c4aef6f7 100644
--- a/OsmAnd/res/values-nl/strings.xml
+++ b/OsmAnd/res/values-nl/strings.xml
@@ -4032,4 +4032,7 @@
De track bevat geen hoogtegegevens.
De track bevat geen snelheidsgegevens.
Selecteer een ander inkleuring.
+ Indien uitgeschakeld zal de opname starten na een tik op de widget of het menu-item, waarbij er geen bevestiging zal worden gevraagd.
+ Opslaan en doorgaan
+ Niet-opgeslagen gegevens zullen verloren gaan.
\ No newline at end of file
From ef59866913d88e1306fab23baa0be8f0757ac2ed Mon Sep 17 00:00:00 2001
From: Shjosan
Date: Wed, 24 Mar 2021 14:55:01 +0000
Subject: [PATCH 29/42] Translated using Weblate (Swedish)
Currently translated at 100.0% (271 of 271 strings)
Translation: OsmAnd/Telegram
Translate-URL: https://hosted.weblate.org/projects/osmand/telegram/sv/
---
OsmAnd-telegram/res/values-sv/strings.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/OsmAnd-telegram/res/values-sv/strings.xml b/OsmAnd-telegram/res/values-sv/strings.xml
index 7dac55e059..da00c6b618 100644
--- a/OsmAnd-telegram/res/values-sv/strings.xml
+++ b/OsmAnd-telegram/res/values-sv/strings.xml
@@ -22,7 +22,7 @@
mph
km/h
m/s
- di/h
+ M/h
min/km
min/mi
di
@@ -43,7 +43,7 @@
Delar plats
Dela plats
Avstånd
- OsmAnd Tracker körs i bakgrunden med skärmen av.
+ OsmAnd Tracker körs i bakgrunden medan skärmen är avstängd.
Bakgrundsläge
Välj en av platsleverantörerna för att dela din plats.
Aktivera \"Plats\" i systeminställningarna
From 83282f4b989d8b3d5dd1dbdc48e75c6a2370e023 Mon Sep 17 00:00:00 2001
From: Evgenii Martynenko
Date: Thu, 25 Mar 2021 07:15:00 +0000
Subject: [PATCH 30/42] Translated using Weblate (Russian)
Currently translated at 100.0% (3690 of 3690 strings)
---
OsmAnd/res/values-ru/strings.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/OsmAnd/res/values-ru/strings.xml b/OsmAnd/res/values-ru/strings.xml
index a638ceda23..8ed1ef86a1 100644
--- a/OsmAnd/res/values-ru/strings.xml
+++ b/OsmAnd/res/values-ru/strings.xml
@@ -4047,5 +4047,5 @@
Все несохраненные данные будут потеряны.
Показывать начальный диалог
Если выключено, запись начнется сразу после нажатия на виджет или пункт меню, пропуская диалоговое окно подтверждения.
- Интервал записи трека указывает период времени, через которое OsmAnd будет запрашивать данные о текущем местоположении.
+ Интервал записи трека указывает период времени, через который OsmAnd будет запрашивать данные о текущем местоположении.
\ No newline at end of file
From 27bf5e7809655e5da4ba38e61fb1515ee7a31bb1 Mon Sep 17 00:00:00 2001
From: Skalii
Date: Thu, 25 Mar 2021 12:56:50 +0200
Subject: [PATCH 31/42] fix display of the button "Start online monitoring"
---
.../monitoring/TripRecordingBottomSheet.java | 3 +-
.../TripRecordingOptionsBottomSheet.java | 42 ++++++++-----------
2 files changed, 20 insertions(+), 25 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java
index 1389e473c5..c11c452149 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java
@@ -507,7 +507,8 @@ public class TripRecordingBottomSheet extends MenuBottomSheetDialogFragment impl
STOP(R.string.shared_string_control_stop, R.drawable.ic_action_rec_stop),
STOP_AND_DISCARD(R.string.track_recording_stop_without_saving, R.drawable.ic_action_rec_stop),
STOP_AND_SAVE(R.string.track_recording_save_and_stop, R.drawable.ic_action_save_to_file),
- STOP_ONLINE(R.string.live_monitoring_stop, R.drawable.ic_world_globe_dark),
+ START_ONLINE(R.string.live_monitoring_start, R.drawable.ic_world_globe_dark),
+ STOP_ONLINE(R.string.live_monitoring_stop, R.drawable.ic_action_offline),
CANCEL(R.string.shared_string_cancel, R.drawable.ic_action_close),
CLOSE(R.string.shared_string_close, R.drawable.ic_action_close),
START_RECORDING(R.string.shared_string_control_start, R.drawable.ic_action_direction_movement),
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingOptionsBottomSheet.java b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingOptionsBottomSheet.java
index ac42775bd2..52f218190f 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingOptionsBottomSheet.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingOptionsBottomSheet.java
@@ -51,8 +51,6 @@ public class TripRecordingOptionsBottomSheet extends MenuBottomSheetDialogFragme
private SelectedGpxFile selectedGpxFile;
private final Handler handler = new Handler();
private Runnable updatingTimeTrackSaved;
- private int indexButtonOnline = -1;
- private int indexButtonOnlineDivider = -1;
private GPXFile getGPXFile() {
return selectedGpxFile.getGpxFile();
@@ -91,7 +89,8 @@ public class TripRecordingOptionsBottomSheet extends MenuBottomSheetDialogFragme
buttonClear = createItem(inflater, ItemType.CLEAR_DATA, hasDataToSave());
final View buttonDiscard = createItem(inflater, ItemType.STOP_AND_DISCARD);
- final View buttonOnline = createItem(inflater, ItemType.STOP_ONLINE, hasDataToSave());
+ final View buttonOnline = createItem(inflater, settings.LIVE_MONITORING.get()
+ ? ItemType.STOP_ONLINE : ItemType.START_ONLINE);
buttonSave = createItem(inflater, ItemType.SAVE, hasDataToSave());
final View buttonSegment = createItem(inflater, ItemType.START_NEW_SEGMENT, wasTrackMonitored());
@@ -131,27 +130,19 @@ public class TripRecordingOptionsBottomSheet extends MenuBottomSheetDialogFragme
items.add(new DividerSpaceItem(app, dp36));
- if (app.getLiveMonitoringHelper().isLiveMonitoringEnabled()) {
- items.add(new BaseBottomSheetItem.Builder()
- .setCustomView(buttonOnline)
- .setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- settings.LIVE_MONITORING.set(false);
- if (indexButtonOnline != -1) {
- AndroidUiHelper.updateVisibility(items.get(indexButtonOnline).getView(), false);
- }
- if (indexButtonOnlineDivider != -1) {
- AndroidUiHelper.updateVisibility(items.get(indexButtonOnlineDivider).getView(), false);
- }
- }
- })
- .create());
- indexButtonOnline = items.size() - 1;
+ items.add(new BaseBottomSheetItem.Builder()
+ .setCustomView(buttonOnline)
+ .setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ boolean wasOnlineMonitored = !settings.LIVE_MONITORING.get();
+ settings.LIVE_MONITORING.set(wasOnlineMonitored);
+ createItem(buttonOnline, wasOnlineMonitored ? ItemType.STOP_ONLINE : ItemType.START_ONLINE);
+ }
+ })
+ .create());
- items.add(new DividerSpaceItem(app, dp36));
- indexButtonOnlineDivider = items.size() - 1;
- }
+ items.add(new DividerSpaceItem(app, dp36));
items.add(new BaseBottomSheetItem.Builder()
.setCustomView(buttonSave)
@@ -181,7 +172,6 @@ public class TripRecordingOptionsBottomSheet extends MenuBottomSheetDialogFragme
.create());
items.add(new DividerSpaceItem(app, getResources().getDimensionPixelSize(R.dimen.content_padding_small)));
-
}
@Override
@@ -243,6 +233,10 @@ public class TripRecordingOptionsBottomSheet extends MenuBottomSheetDialogFragme
}
}
+ private void createItem(View view, ItemType type) {
+ TripRecordingBottomSheet.createItem(app, nightMode, view, type, true, null);
+ }
+
private View createItem(LayoutInflater inflater, ItemType type, boolean enabled) {
return TripRecordingBottomSheet.createItem(app, nightMode, inflater, type, enabled, null);
}
From d1fd273117ab2a8fdb4722e0cd20c975138a89db Mon Sep 17 00:00:00 2001
From: androiddevkotlin <64539346+androiddevkotlin@users.noreply.github.com>
Date: Thu, 25 Mar 2021 13:11:06 +0200
Subject: [PATCH 32/42] rtl refactor, dp, comments deleted
---
OsmAnd/res/layout/abc_list_menu_item_icon.xml | 26 +-
.../fragment_data_storage_place_dialog.xml | 391 +++++++++---------
2 files changed, 204 insertions(+), 213 deletions(-)
diff --git a/OsmAnd/res/layout/abc_list_menu_item_icon.xml b/OsmAnd/res/layout/abc_list_menu_item_icon.xml
index 542a19ab1f..9706565f6f 100644
--- a/OsmAnd/res/layout/abc_list_menu_item_icon.xml
+++ b/OsmAnd/res/layout/abc_list_menu_item_icon.xml
@@ -1,29 +1,15 @@
-
diff --git a/OsmAnd/res/layout/fragment_data_storage_place_dialog.xml b/OsmAnd/res/layout/fragment_data_storage_place_dialog.xml
index 76ed491f6c..407a8ad444 100644
--- a/OsmAnd/res/layout/fragment_data_storage_place_dialog.xml
+++ b/OsmAnd/res/layout/fragment_data_storage_place_dialog.xml
@@ -1,232 +1,237 @@
+ xmlns:osmand="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="bottom"
+ android:background="?attr/bottom_menu_view_bg"
+ android:orientation="horizontal"
+ tools:context="net.osmand.plus.download.ui.DataStoragePlaceDialogFragment">
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+ android:orientation="vertical">
-
+
-
-
+
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
\ No newline at end of file
From ffe15a976fc83b3d070d4295abe0d77aac5f1a76 Mon Sep 17 00:00:00 2001
From: Skalii
Date: Thu, 25 Mar 2021 13:23:16 +0200
Subject: [PATCH 33/42] add horizontal margins for graphs
---
.../plus/monitoring/TripRecordingBottomSheet.java | 1 +
.../net/osmand/plus/myplaces/GPXItemPagerAdapter.java | 10 +++++++++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java
index c11c452149..2b2e13d2c4 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java
@@ -314,6 +314,7 @@ public class TripRecordingBottomSheet extends MenuBottomSheetDialogFragment impl
graphsAdapter = new GPXItemPagerAdapter(app, GpxUiHelper.makeGpxDisplayItem(app,
displayHelper.getGpx()), displayHelper, nightMode, this, true);
+ graphsAdapter.setChartHMargin(getResources().getDimensionPixelSize(R.dimen.content_padding));
pager.setAdapter(graphsAdapter);
tabLayout.setViewPager(pager);
diff --git a/OsmAnd/src/net/osmand/plus/myplaces/GPXItemPagerAdapter.java b/OsmAnd/src/net/osmand/plus/myplaces/GPXItemPagerAdapter.java
index b8899dd9c7..34232a8c6d 100644
--- a/OsmAnd/src/net/osmand/plus/myplaces/GPXItemPagerAdapter.java
+++ b/OsmAnd/src/net/osmand/plus/myplaces/GPXItemPagerAdapter.java
@@ -24,6 +24,7 @@ import com.github.mikephil.charting.listener.ChartTouchListener.ChartGesture;
import com.github.mikephil.charting.listener.OnChartGestureListener;
import com.github.mikephil.charting.listener.OnChartValueSelectedListener;
+import net.osmand.AndroidUtils;
import net.osmand.GPXUtilities;
import net.osmand.GPXUtilities.GPXFile;
import net.osmand.GPXUtilities.GPXTrackAnalysis;
@@ -82,6 +83,11 @@ public class GPXItemPagerAdapter extends PagerAdapter implements CustomTabProvid
private boolean chartClicked;
private boolean nightMode;
private boolean onlyGraphs;
+ private int chartHMargin = 0;
+
+ public void setChartHMargin(int chartHMargin) {
+ this.chartHMargin = chartHMargin;
+ }
public GPXItemPagerAdapter(@NonNull OsmandApplication app,
@NonNull GpxDisplayItem gpxItem,
@@ -201,6 +207,8 @@ public class GPXItemPagerAdapter extends PagerAdapter implements CustomTabProvid
if (gpxFile != null && gpxItem != null) {
GPXTrackAnalysis analysis = gpxItem.analysis;
LineChart chart = view.findViewById(R.id.chart);
+ ViewGroup.MarginLayoutParams lp = (ViewGroup.MarginLayoutParams) chart.getLayoutParams();
+ AndroidUtils.setMargins(lp, chartHMargin, lp.topMargin, chartHMargin, lp.bottomMargin);
setupChart(view, chart);
switch (tabType) {
@@ -436,8 +444,8 @@ public class GPXItemPagerAdapter extends PagerAdapter implements CustomTabProvid
view.findViewById(R.id.list_divider).setVisibility(View.GONE);
view.findViewById(R.id.bottom_line_blocks).setVisibility(View.GONE);
}
- updateJoinGapsInfo(view, position);
if (!onlyGraphs) {
+ updateJoinGapsInfo(view, position);
view.findViewById(R.id.analyze_on_map).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
From 89db60fbc87f4fc7170317a4b8b401f7c5598ac6 Mon Sep 17 00:00:00 2001
From: androiddevkotlin <64539346+androiddevkotlin@users.noreply.github.com>
Date: Thu, 25 Mar 2021 13:26:08 +0200
Subject: [PATCH 34/42] rtl change storage text
---
OsmAnd/res/layout/fragment_data_storage_place_dialog.xml | 7 -------
1 file changed, 7 deletions(-)
diff --git a/OsmAnd/res/layout/fragment_data_storage_place_dialog.xml b/OsmAnd/res/layout/fragment_data_storage_place_dialog.xml
index 407a8ad444..fd88a16090 100644
--- a/OsmAnd/res/layout/fragment_data_storage_place_dialog.xml
+++ b/OsmAnd/res/layout/fragment_data_storage_place_dialog.xml
@@ -107,7 +107,6 @@
android:id="@+id/deviceMemoryTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="fill_horizontal"
android:gravity="center_vertical"
android:text="@string/storage_directory_external"
android:textColor="?android:attr/textColorPrimary" />
@@ -116,7 +115,6 @@
android:id="@+id/deviceMemoryDescription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="fill_horizontal"
android:textColor="?android:attr/textColorSecondary"
tools:text="Free: 568 Mb" />
@@ -154,14 +152,12 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
-
android:orientation="vertical">
@@ -169,7 +165,6 @@
android:id="@+id/sharedMemoryDescription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="fill_horizontal"
android:textColor="?android:attr/textColorSecondary"
tools:text="Free: 9 Gb" />
@@ -212,7 +207,6 @@
android:id="@+id/memoryStickTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="fill_horizontal"
android:text="@string/storage_directory_card"
android:textColor="?android:attr/textColorPrimary" />
@@ -220,7 +214,6 @@
android:id="@+id/memoryStickDescription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="fill_horizontal"
android:textColor="?android:attr/textColorSecondary"
tools:text="Free: 9 Gb" />
From 5d3e7fd0d246d76b2b71821c9f0d5d152735cbd7 Mon Sep 17 00:00:00 2001
From: androiddevkotlin <64539346+androiddevkotlin@users.noreply.github.com>
Date: Thu, 25 Mar 2021 14:02:30 +0200
Subject: [PATCH 35/42] Review
---
.../osmand/plus/quickaction/CreateEditActionDialog.java | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/quickaction/CreateEditActionDialog.java b/OsmAnd/src/net/osmand/plus/quickaction/CreateEditActionDialog.java
index 0ab34884e2..f083caec60 100644
--- a/OsmAnd/src/net/osmand/plus/quickaction/CreateEditActionDialog.java
+++ b/OsmAnd/src/net/osmand/plus/quickaction/CreateEditActionDialog.java
@@ -223,13 +223,11 @@ public class CreateEditActionDialog extends DialogFragment
if (savedInstanceState == null) {
String name = action.getName(getContext());
if (action.getActionNameRes() != 0 && !action.isActionEditable()) {
- String actionName;
- if (getString(action.getActionNameRes()).contains("Show/hide")) {
- actionName = getString(action.getActionNameRes());
+ if (!name.contains(getString(R.string.quick_action_show_hide_title))) {
+ String actionName = getString(action.getActionNameRes());
nameEditText.setText(getString(R.string.ltr_or_rtl_combine_via_dash, actionName, name));
} else {
- actionName = "";
- nameEditText.setText(getString(R.string.ltr_or_rtl_combine_via_space, actionName, name));
+ nameEditText.setText(name);
}
} else {
nameEditText.setText(name);
From 684b0cdeb511e00f5146e84999e26105a7f6e0b0 Mon Sep 17 00:00:00 2001
From: androiddevkotlin <64539346+androiddevkotlin@users.noreply.github.com>
Date: Thu, 25 Mar 2021 14:38:49 +0200
Subject: [PATCH 36/42] Review2
---
.../plus/quickaction/CreateEditActionDialog.java | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/quickaction/CreateEditActionDialog.java b/OsmAnd/src/net/osmand/plus/quickaction/CreateEditActionDialog.java
index f083caec60..84a3f7edbe 100644
--- a/OsmAnd/src/net/osmand/plus/quickaction/CreateEditActionDialog.java
+++ b/OsmAnd/src/net/osmand/plus/quickaction/CreateEditActionDialog.java
@@ -222,13 +222,10 @@ public class CreateEditActionDialog extends DialogFragment
if (savedInstanceState == null) {
String name = action.getName(getContext());
- if (action.getActionNameRes() != 0 && !action.isActionEditable()) {
- if (!name.contains(getString(R.string.quick_action_show_hide_title))) {
- String actionName = getString(action.getActionNameRes());
- nameEditText.setText(getString(R.string.ltr_or_rtl_combine_via_dash, actionName, name));
- } else {
- nameEditText.setText(name);
- }
+ if (!action.isActionEditable() && action.getActionNameRes() != 0
+ && !name.contains(getString(action.getActionNameRes()))) {
+ String actionName = getString(action.getActionNameRes());
+ nameEditText.setText(getString(R.string.ltr_or_rtl_combine_via_dash, actionName, name));
} else {
nameEditText.setText(name);
}
From d9a69dd154b7588f7cf55baf80676f451e6f4867 Mon Sep 17 00:00:00 2001
From: nazar-kutz
Date: Thu, 25 Mar 2021 16:17:14 +0200
Subject: [PATCH 37/42] Use different colors for route line appearance
---
.../plus/routing/RouteLineDrawInfo.java | 66 ++++++++++++++-----
.../routing/cards/RouteLineColorCard.java | 58 +++++++++++-----
.../routing/cards/RouteLineWidthCard.java | 15 ++---
.../plus/settings/backend/OsmandSettings.java | 2 +
.../fragments/ProfileAppearanceFragment.java | 30 ++++++---
.../RouteLineAppearanceFragment.java | 5 ++
.../src/net/osmand/plus/track/ColorsCard.java | 1 +
.../osmand/plus/views/layers/RouteLayer.java | 13 ++--
8 files changed, 137 insertions(+), 53 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteLineDrawInfo.java b/OsmAnd/src/net/osmand/plus/routing/RouteLineDrawInfo.java
index 92cb926fa1..838e553b5b 100644
--- a/OsmAnd/src/net/osmand/plus/routing/RouteLineDrawInfo.java
+++ b/OsmAnd/src/net/osmand/plus/routing/RouteLineDrawInfo.java
@@ -10,17 +10,20 @@ import net.osmand.util.Algorithms;
public class RouteLineDrawInfo {
- private static final String LINE_COLOR = "line_color";
+ private static final String LINE_COLOR_DAY = "line_color_day";
+ private static final String LINE_COLOR_NIGHT = "line_color_night";
private static final String LINE_WIDTH = "line_width";
private static final String NAVIGATION_ICON_ID = "navigation_icon_id";
private static final String NAVIGATION_ICON_COLOR = "navigation_icon_color";
private static final String CENTER_X = "center_x";
private static final String CENTER_Y = "center_y";
private static final String SCREEN_HEIGHT = "screen_height";
+ private static final String USE_DEFAULT_COLOR = "use_default_color";
// parameters to save
@ColorInt
- private Integer color;
+ private Integer colorDay;
+ private Integer colorNight;
private String width;
// temporally parameters to show in preview
@@ -30,10 +33,13 @@ public class RouteLineDrawInfo {
private int centerX;
private int centerY;
private int screenHeight;
+ private boolean useDefaultColor;
- public RouteLineDrawInfo(@Nullable @ColorInt Integer color,
+ public RouteLineDrawInfo(@Nullable @ColorInt Integer colorDay,
+ @Nullable @ColorInt Integer colorNight,
@Nullable String width) {
- this.color = color;
+ this.colorDay = colorDay;
+ this.colorNight = colorNight;
this.width = width;
}
@@ -42,17 +48,27 @@ public class RouteLineDrawInfo {
}
public RouteLineDrawInfo(@NonNull RouteLineDrawInfo existed) {
- this.color = existed.color;
+ this.colorDay = existed.colorDay;
+ this.colorNight = existed.colorNight;
this.width = existed.width;
this.iconId = existed.iconId;
this.iconColor = existed.iconColor;
this.centerX = existed.centerX;
this.centerY = existed.centerY;
this.screenHeight = existed.screenHeight;
+ this.useDefaultColor = existed.useDefaultColor;
}
- public void setColor(@Nullable Integer color) {
- this.color = color;
+ public void setColor(@ColorInt int color, boolean nightMode) {
+ if (nightMode) {
+ colorNight = color;
+ } else {
+ colorDay = color;
+ }
+ }
+
+ public void setUseDefaultColor(boolean useDefaultColor) {
+ this.useDefaultColor = useDefaultColor;
}
public void setWidth(@Nullable String width) {
@@ -80,8 +96,16 @@ public class RouteLineDrawInfo {
}
@Nullable
- public Integer getColor() {
- return color;
+ public Integer getColor(boolean nightMode) {
+ if (!useDefaultColor) {
+ return getColorIgnoreDefault(nightMode);
+ }
+ return null;
+ }
+
+ @Nullable
+ public Integer getColorIgnoreDefault(boolean nightMode) {
+ return nightMode ? colorNight : colorDay;
}
@Nullable
@@ -111,8 +135,11 @@ public class RouteLineDrawInfo {
}
private void readBundle(@NonNull Bundle bundle) {
- if (bundle.containsKey(LINE_COLOR)) {
- color = bundle.getInt(LINE_COLOR);
+ if (bundle.containsKey(LINE_COLOR_DAY)) {
+ colorDay = bundle.getInt(LINE_COLOR_DAY);
+ }
+ if (bundle.containsKey(LINE_COLOR_NIGHT)) {
+ colorNight = bundle.getInt(LINE_COLOR_NIGHT);
}
width = bundle.getString(LINE_WIDTH);
iconId = bundle.getInt(NAVIGATION_ICON_ID);
@@ -120,11 +147,15 @@ public class RouteLineDrawInfo {
centerX = bundle.getInt(CENTER_X);
centerY = bundle.getInt(CENTER_Y);
screenHeight = bundle.getInt(SCREEN_HEIGHT);
+ useDefaultColor = bundle.getBoolean(USE_DEFAULT_COLOR);
}
public void saveToBundle(@NonNull Bundle bundle) {
- if (color != null) {
- bundle.putInt(LINE_COLOR, color);
+ if (colorDay != null) {
+ bundle.putInt(LINE_COLOR_DAY, colorDay);
+ }
+ if (colorNight != null) {
+ bundle.putInt(LINE_COLOR_NIGHT, colorNight);
}
if (width != null) {
bundle.putString(LINE_WIDTH, width);
@@ -134,6 +165,7 @@ public class RouteLineDrawInfo {
bundle.putInt(CENTER_X, centerX);
bundle.putInt(CENTER_Y, centerY);
bundle.putInt(SCREEN_HEIGHT, screenHeight);
+ bundle.putBoolean(USE_DEFAULT_COLOR, useDefaultColor);
}
@Override
@@ -143,13 +175,15 @@ public class RouteLineDrawInfo {
RouteLineDrawInfo that = (RouteLineDrawInfo) o;
- if (!Algorithms.objectEquals(getColor(), that.getColor())) return false;
- return Algorithms.objectEquals(getWidth(), that.getWidth());
+ if (!Algorithms.objectEquals(colorDay, that.colorDay)) return false;
+ if (!Algorithms.objectEquals(colorNight, that.colorNight)) return false;
+ return Algorithms.objectEquals(width, that.width);
}
@Override
public int hashCode() {
- int result = color != null ? color.hashCode() : 0;
+ int result = colorDay != null ? colorDay.hashCode() : 0;
+ result = 31 * result + (colorNight != null ? colorNight.hashCode() : 0);
result = 31 * result + (width != null ? width.hashCode() : 0);
return result;
}
diff --git a/OsmAnd/src/net/osmand/plus/routing/cards/RouteLineColorCard.java b/OsmAnd/src/net/osmand/plus/routing/cards/RouteLineColorCard.java
index 3eabe283e3..d8abad16e4 100644
--- a/OsmAnd/src/net/osmand/plus/routing/cards/RouteLineColorCard.java
+++ b/OsmAnd/src/net/osmand/plus/routing/cards/RouteLineColorCard.java
@@ -10,6 +10,7 @@ import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
import androidx.appcompat.content.res.AppCompatResources;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;
@@ -22,7 +23,6 @@ import net.osmand.plus.UiUtilities;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.helpers.ColorDialogs;
import net.osmand.plus.helpers.enums.DayNightMode;
-import net.osmand.plus.render.RendererRegistry;
import net.osmand.plus.routepreparationmenu.cards.BaseCard;
import net.osmand.plus.routepreparationmenu.cards.BaseCard.CardListener;
import net.osmand.plus.routing.RouteLineDrawInfo;
@@ -110,7 +110,7 @@ public class RouteLineColorCard extends BaseCard implements CardListener, ColorP
}
private void initSelectedMode() {
- selectedMode = routeLineDrawInfo.getColor() == null ? ColorMode.DEFAULT : ColorMode.CUSTOM;
+ selectedMode = getRouteLineColor() == null ? ColorMode.DEFAULT : ColorMode.CUSTOM;
modeChanged();
}
@@ -118,13 +118,15 @@ public class RouteLineColorCard extends BaseCard implements CardListener, ColorP
if (selectedMode == ColorMode.DEFAULT) {
themeToggleContainer.setVisibility(View.GONE);
cardsContainer.setVisibility(View.GONE);
+ routeLineDrawInfo.setUseDefaultColor(true);
changeMapTheme(initMapTheme);
} else {
themeToggleContainer.setVisibility(View.VISIBLE);
cardsContainer.setVisibility(View.VISIBLE);
+ routeLineDrawInfo.setUseDefaultColor(false);
changeMapTheme(isNightMap() ? DayNightMode.NIGHT : DayNightMode.DAY);
}
- updateSelectedColor();
+ updateColorItems();
updateDescription();
}
@@ -156,6 +158,12 @@ public class RouteLineColorCard extends BaseCard implements CardListener, ColorP
if (targetFragment instanceof OnMapThemeUpdateListener) {
((OnMapThemeUpdateListener) targetFragment).onMapThemeUpdated(mapTheme);
}
+ if (selectedMode == ColorMode.CUSTOM) {
+ Integer color = getRouteLineColor();
+ if (color != null) {
+ colorsCard.setSelectedColor(color);
+ }
+ }
}
private void createColorSelector(ViewGroup container) {
@@ -165,14 +173,9 @@ public class RouteLineColorCard extends BaseCard implements CardListener, ColorP
for (int color : ColorDialogs.pallette) {
colors.add(color);
}
- Integer selectedColor = routeLineDrawInfo.getColor();
- if (selectedColor != null) {
- if (!ColorDialogs.isPaletteColor(selectedColor)) {
- colors.add(selectedColor);
- }
- } else {
- selectedColor = colors.get(0);
- }
+ int selectedColorDay = getSelectedColorForTheme(colors, false);
+ int selectedColorNight = getSelectedColorForTheme(colors, true);
+ int selectedColor = isNightMap() ? selectedColorNight : selectedColorDay;
ListStringPreference preference = app.getSettings().CUSTOM_ROUTE_LINE_COLORS;
colorsCard = new ColorsCard(mapActivity, selectedColor, targetFragment, colors, preference, null);
colorsCard.setListener(this);
@@ -180,26 +183,49 @@ public class RouteLineColorCard extends BaseCard implements CardListener, ColorP
}
}
+ private int getSelectedColorForTheme(List colors, boolean nightMode) {
+ Integer color = routeLineDrawInfo.getColorIgnoreDefault(nightMode);
+ if (color != null) {
+ if (!ColorDialogs.isPaletteColor(color)) {
+ colors.add(color);
+ }
+ } else {
+ color = colors.get(0);
+ routeLineDrawInfo.setUseDefaultColor(true);
+ routeLineDrawInfo.setColor(color, nightMode);
+ }
+ return color;
+ }
+
@Override
public void onColorSelected(Integer prevColor, int newColor) {
colorsCard.onColorSelected(prevColor, newColor);
updateSelectedColor();
}
+ @Nullable
+ private Integer getRouteLineColor() {
+ return routeLineDrawInfo.getColor(isNightMap());
+ }
+
private void updateSelectedColor() {
- Integer color = selectedMode == ColorMode.CUSTOM ? colorsCard.getSelectedColor() : null;
- routeLineDrawInfo.setColor(color);
- updateColorName();
+ int selectedColor = colorsCard.getSelectedColor();
+ routeLineDrawInfo.setColor(selectedColor, isNightMap());
+ updateColorItems();
+ }
+
+ private void updateColorItems() {
if (targetFragment instanceof OnSelectedColorChangeListener) {
((OnSelectedColorChangeListener) targetFragment).onSelectedColorChanged();
}
+ updateColorName();
}
private void updateColorName() {
if (selectedMode == ColorMode.DEFAULT) {
tvColorName.setText(app.getString(R.string.map_widget_renderer));
- } else if (routeLineDrawInfo.getColor() != null) {
- int colorNameId = ColorDialogs.getColorName(routeLineDrawInfo.getColor());
+ } else if (getRouteLineColor() != null) {
+ int colorNameId = ColorDialogs.getColorName(getRouteLineColor());
tvColorName.setText(app.getString(colorNameId));
}
}
diff --git a/OsmAnd/src/net/osmand/plus/routing/cards/RouteLineWidthCard.java b/OsmAnd/src/net/osmand/plus/routing/cards/RouteLineWidthCard.java
index 95c20783a4..72055da936 100644
--- a/OsmAnd/src/net/osmand/plus/routing/cards/RouteLineWidthCard.java
+++ b/OsmAnd/src/net/osmand/plus/routing/cards/RouteLineWidthCard.java
@@ -24,7 +24,6 @@ import net.osmand.plus.R;
import net.osmand.plus.UiUtilities;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.helpers.AndroidUiHelper;
-import net.osmand.plus.render.RendererRegistry;
import net.osmand.plus.routepreparationmenu.cards.BaseCard;
import net.osmand.plus.routing.RouteLineDrawInfo;
import net.osmand.plus.track.AppearanceViewHolder;
@@ -201,6 +200,10 @@ public class RouteLineWidthCard extends BaseCard {
return WidthMode.DEFAULT;
}
+ private boolean isNightMode() {
+ return app.getDaynightHelper().isNightModeForMapControls();
+ }
+
private class WidthAdapter extends RecyclerView.Adapter {
private final List items = Arrays.asList(WidthMode.values());
@@ -268,13 +271,9 @@ public class RouteLineWidthCard extends BaseCard {
}
private int getIconColor(@NonNull WidthMode mode, @ColorInt int defaultColor) {
- return mode.widthKey != null ? getRouteLineColor() : defaultColor;
- }
-
- private int getRouteLineColor() {
- Integer color = routeLineDrawInfo.getColor();
- return color != null ? color :
- mapActivity.getMapLayers().getRouteLayer().getRouteLineColor(nightMode);
+ return mode.widthKey != null ?
+ mapActivity.getMapLayers().getRouteLayer().getRouteLineColor(isNightMode()) :
+ defaultColor;
}
private void updateButtonBg(AppearanceViewHolder holder, WidthMode item) {
diff --git a/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java
index 5fbc34e674..b5ea05fb09 100644
--- a/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java
+++ b/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java
@@ -2691,8 +2691,10 @@ public class OsmandSettings {
public final CommonPreference ROUTE_RECALCULATION_DISTANCE = new FloatPreference(this, "routing_recalc_distance", 0.f).makeProfile();
public final CommonPreference ROUTE_STRAIGHT_ANGLE = new FloatPreference(this, "routing_straight_angle", 30.f).makeProfile();
+
public final ListStringPreference CUSTOM_ROUTE_LINE_COLORS = (ListStringPreference) new ListStringPreference(this, "custom_route_line_colors", null, ",").makeShared().makeGlobal();
public final CommonPreference ROUTE_LINE_COLOR = new IntPreference(this, "route_line_color", 0).makeProfile();
+ public final CommonPreference ROUTE_LINE_COLOR_NIGHT = new IntPreference(this, "route_line_color_night", 0).makeProfile();
public final CommonPreference ROUTE_LINE_WIDTH = new StringPreference(this, "route_line_width", null).makeProfile();
public final OsmandPreference USE_OSM_LIVE_FOR_ROUTING = new BooleanPreference(this, "enable_osmc_routing", true).makeProfile();
diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java b/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java
index f4b38a32b8..01d9229eb0 100644
--- a/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java
+++ b/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java
@@ -1019,23 +1019,35 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment implements O
}
private RouteLineDrawInfo createRouteLineDrawInfo(@NonNull ApplicationMode appMode) {
- int storedValue = settings.ROUTE_LINE_COLOR.getModeValue(appMode);
- Integer color = storedValue != 0 ? storedValue : null;
+ Integer colorDay = getRouteLineColor(appMode, settings.ROUTE_LINE_COLOR);
+ Integer colorNight = getRouteLineColor(appMode, settings.ROUTE_LINE_COLOR_NIGHT);
String widthKey = settings.ROUTE_LINE_WIDTH.getModeValue(appMode);
- return new RouteLineDrawInfo(color, widthKey);
+ return new RouteLineDrawInfo(colorDay, colorNight, widthKey);
+ }
+
+ private Integer getRouteLineColor(@NonNull ApplicationMode appMode,
+ @NonNull CommonPreference preference) {
+ int storedValue = preference.getModeValue(appMode);
+ return storedValue != 0 ? storedValue : null;
}
private void saveRouteLineAppearance(@NonNull ApplicationMode appMode,
@NonNull RouteLineDrawInfo drawInfo) {
- Integer color = drawInfo.getColor();
- if (color != null) {
- settings.ROUTE_LINE_COLOR.setModeValue(appMode, color);
- } else {
- settings.ROUTE_LINE_COLOR.resetModeToDefault(appMode);
- }
+ saveRouteLineColor(appMode, settings.ROUTE_LINE_COLOR, drawInfo.getColor(false));
+ saveRouteLineColor(appMode, settings.ROUTE_LINE_COLOR_NIGHT, drawInfo.getColor(true));
settings.ROUTE_LINE_WIDTH.setModeValue(appMode, drawInfo.getWidth());
}
+ private void saveRouteLineColor(@NonNull ApplicationMode appMode,
+ @NonNull CommonPreference preference,
+ @Nullable @ColorInt Integer color) {
+ if (color != null) {
+ preference.setModeValue(appMode, color);
+ } else {
+ preference.resetModeToDefault(appMode);
+ }
+ }
+
public static boolean showInstance(FragmentActivity activity, SettingsScreenType screenType, @Nullable String appMode, boolean imported) {
try {
Fragment fragment = Fragment.instantiate(activity, screenType.fragmentName);
diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/RouteLineAppearanceFragment.java b/OsmAnd/src/net/osmand/plus/settings/fragments/RouteLineAppearanceFragment.java
index b0587eacde..2975815bb4 100644
--- a/OsmAnd/src/net/osmand/plus/settings/fragments/RouteLineAppearanceFragment.java
+++ b/OsmAnd/src/net/osmand/plus/settings/fragments/RouteLineAppearanceFragment.java
@@ -385,6 +385,10 @@ public class RouteLineAppearanceFragment extends ContextMenuScrollFragment imple
@Override
public void onSelectedColorChanged() {
+ updateColorItems();
+ }
+
+ private void updateColorItems() {
if (widthCard != null) {
widthCard.updateItems();
}
@@ -415,6 +419,7 @@ public class RouteLineAppearanceFragment extends ContextMenuScrollFragment imple
@Override
public void onMapThemeUpdated(@NonNull DayNightMode mapTheme) {
changeMapTheme(mapTheme);
+ updateColorItems();
}
private void changeMapTheme(@NonNull DayNightMode mapTheme) {
diff --git a/OsmAnd/src/net/osmand/plus/track/ColorsCard.java b/OsmAnd/src/net/osmand/plus/track/ColorsCard.java
index 7651775f6c..dd832da27f 100644
--- a/OsmAnd/src/net/osmand/plus/track/ColorsCard.java
+++ b/OsmAnd/src/net/osmand/plus/track/ColorsCard.java
@@ -72,6 +72,7 @@ public class ColorsCard extends BaseCard implements ColorPickerListener {
public void setSelectedColor(int selectedColor) {
this.selectedColor = selectedColor;
+ updateContent();
}
@Override
diff --git a/OsmAnd/src/net/osmand/plus/views/layers/RouteLayer.java b/OsmAnd/src/net/osmand/plus/views/layers/RouteLayer.java
index 2a432c8041..816327eda6 100644
--- a/OsmAnd/src/net/osmand/plus/views/layers/RouteLayer.java
+++ b/OsmAnd/src/net/osmand/plus/views/layers/RouteLayer.java
@@ -42,6 +42,7 @@ import net.osmand.plus.routing.RouteLineDrawInfo;
import net.osmand.plus.routing.RouteService;
import net.osmand.plus.routing.RoutingHelper;
import net.osmand.plus.routing.TransportRoutingHelper;
+import net.osmand.plus.settings.backend.CommonPreference;
import net.osmand.plus.views.OsmandMapLayer;
import net.osmand.plus.views.OsmandMapTileView;
import net.osmand.plus.views.layers.geometry.PublicTransportGeometryWay;
@@ -315,14 +316,16 @@ public class RouteLayer extends OsmandMapLayer implements ContextMenuLayer.ICont
QuadPoint c = tileBox.getCenterPixelPoint();
canvas.rotate(-angle, c.x, c.y);
- drawRouteLinePreview(canvas, tileBox, routeLineDrawInfo);
+ drawRouteLinePreview(canvas, tileBox, settings, routeLineDrawInfo);
canvas.rotate(angle, c.x, c.y);
}
}
private void drawRouteLinePreview(Canvas canvas,
RotatedTileBox tileBox,
+ DrawSettings settings,
RouteLineDrawInfo drawInfo) {
+ updateAttrs(settings, tileBox);
paintRouteLinePreview.setColor(getRouteLineColor(nightMode));
paintRouteLinePreview.setStrokeWidth(getRouteLineWidth(tileBox));
@@ -417,12 +420,14 @@ public class RouteLayer extends OsmandMapLayer implements ContextMenuLayer.ICont
public int getRouteLineColor(boolean night) {
Integer color;
if (routeLineDrawInfo != null) {
- color = routeLineDrawInfo.getColor();
+ color = routeLineDrawInfo.getColor(night);
} else {
- int storedValue = view.getSettings().ROUTE_LINE_COLOR.getModeValue(helper.getAppMode());
+ CommonPreference colorPreference = night ?
+ view.getSettings().ROUTE_LINE_COLOR_NIGHT :
+ view.getSettings().ROUTE_LINE_COLOR;
+ int storedValue = colorPreference.getModeValue(helper.getAppMode());
color = storedValue != 0 ? storedValue : null;
}
-
if (color == null) {
updateAttrs(new DrawSettings(night), view.getCurrentRotatedTileBox());
color = attrs.paint.getColor();
From 9d17f50f4b66358ca9aa0d1daf3eb5ddd65c0fcb Mon Sep 17 00:00:00 2001
From: Skalii
Date: Thu, 25 Mar 2021 17:24:09 +0200
Subject: [PATCH 38/42] fix full height of main dialog in landscape
---
.../monitoring/TripRecordingBottomSheet.java | 32 +++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java
index 2b2e13d2c4..425378b4b6 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java
@@ -5,11 +5,13 @@ import android.app.Dialog;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.drawable.Drawable;
+import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
+import android.view.ViewTreeObserver;
import android.widget.CompoundButton;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
@@ -690,6 +692,36 @@ public class TripRecordingBottomSheet extends MenuBottomSheetDialogFragment impl
return nightMode ? R.drawable.btn_background_inactive_dark : R.drawable.btn_background_inactive_light;
}
+ @Override
+ protected void setupHeightAndBackground(final View mainView) {
+ final Activity activity = getActivity();
+ if (activity == null) {
+ return;
+ }
+ if (AndroidUiHelper.isOrientationPortrait(activity)) {
+ super.setupHeightAndBackground(mainView);
+ return;
+ }
+
+ mainView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
+ @Override
+ public void onGlobalLayout() {
+ ViewTreeObserver obs = mainView.getViewTreeObserver();
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
+ obs.removeOnGlobalLayoutListener(this);
+ } else {
+ obs.removeGlobalOnLayoutListener(this);
+ }
+ final View contentView = mainView.findViewById(R.id.scroll_view);
+ contentView.getLayoutParams().height = ViewGroup.LayoutParams.MATCH_PARENT;
+ contentView.requestLayout();
+ boolean showTopShadow = AndroidUtils.getScreenHeight(activity) - AndroidUtils.getStatusBarHeight(activity)
+ - mainView.getHeight() >= AndroidUtils.dpToPx(activity, 8);
+ drawTopShadow(showTopShadow);
+ }
+ });
+ }
+
@Override
protected boolean hideButtonsContainer() {
return true;
From ad409bc96796b1e52b718a79449e999d3fc50949 Mon Sep 17 00:00:00 2001
From: Skalii
Date: Thu, 25 Mar 2021 17:49:46 +0200
Subject: [PATCH 39/42] fix keep the main "Trip Record" dialog visible after
clicking on "Options"
---
.../osmand/plus/monitoring/TripRecordingBottomSheet.java | 6 +-----
.../plus/monitoring/TripRecordingOptionsBottomSheet.java | 4 ----
2 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java
index 425378b4b6..3decf5bbad 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java
@@ -239,15 +239,11 @@ public class TripRecordingBottomSheet extends MenuBottomSheetDialogFragment impl
}
}
- public void show() {
+ public void show(String... keys) {
Dialog dialog = getDialog();
if (dialog != null) {
dialog.show();
}
- }
-
- public void show(String... keys) {
- show();
for (String key : keys) {
if (key.equals(UPDATE_TRACK_ICON)) {
updateTrackIcon(app, trackAppearanceIcon);
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingOptionsBottomSheet.java b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingOptionsBottomSheet.java
index 52f218190f..994b3034d9 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingOptionsBottomSheet.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingOptionsBottomSheet.java
@@ -178,10 +178,6 @@ public class TripRecordingOptionsBottomSheet extends MenuBottomSheetDialogFragme
public void onResume() {
super.onResume();
runUpdatingTimeTrackSaved();
- Fragment target = getTargetFragment();
- if (target instanceof TripRecordingBottomSheet) {
- ((TripRecordingBottomSheet) target).hide();
- }
}
@Override
From 483f33bccd4b9a88c974c848c2dee1b486f81424 Mon Sep 17 00:00:00 2001
From: nazar-kutz
Date: Thu, 25 Mar 2021 20:49:28 +0200
Subject: [PATCH 40/42] small fixes
---
.../src/net/osmand/plus/settings/backend/OsmandSettings.java | 4 ++--
.../plus/settings/fragments/ProfileAppearanceFragment.java | 4 ++--
OsmAnd/src/net/osmand/plus/views/layers/RouteLayer.java | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java
index b5ea05fb09..d1cd8fd622 100644
--- a/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java
+++ b/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java
@@ -2693,8 +2693,8 @@ public class OsmandSettings {
public final CommonPreference ROUTE_STRAIGHT_ANGLE = new FloatPreference(this, "routing_straight_angle", 30.f).makeProfile();
public final ListStringPreference CUSTOM_ROUTE_LINE_COLORS = (ListStringPreference) new ListStringPreference(this, "custom_route_line_colors", null, ",").makeShared().makeGlobal();
- public final CommonPreference ROUTE_LINE_COLOR = new IntPreference(this, "route_line_color", 0).makeProfile();
- public final CommonPreference ROUTE_LINE_COLOR_NIGHT = new IntPreference(this, "route_line_color_night", 0).makeProfile();
+ public final CommonPreference ROUTE_LINE_COLOR_DAY = new IntPreference(this, "route_line_color", 0).cache().makeProfile();
+ public final CommonPreference ROUTE_LINE_COLOR_NIGHT = new IntPreference(this, "route_line_color_night", 0).cache().makeProfile();
public final CommonPreference ROUTE_LINE_WIDTH = new StringPreference(this, "route_line_width", null).makeProfile();
public final OsmandPreference USE_OSM_LIVE_FOR_ROUTING = new BooleanPreference(this, "enable_osmc_routing", true).makeProfile();
diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java b/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java
index 01d9229eb0..c8d600315c 100644
--- a/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java
+++ b/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java
@@ -1019,7 +1019,7 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment implements O
}
private RouteLineDrawInfo createRouteLineDrawInfo(@NonNull ApplicationMode appMode) {
- Integer colorDay = getRouteLineColor(appMode, settings.ROUTE_LINE_COLOR);
+ Integer colorDay = getRouteLineColor(appMode, settings.ROUTE_LINE_COLOR_DAY);
Integer colorNight = getRouteLineColor(appMode, settings.ROUTE_LINE_COLOR_NIGHT);
String widthKey = settings.ROUTE_LINE_WIDTH.getModeValue(appMode);
return new RouteLineDrawInfo(colorDay, colorNight, widthKey);
@@ -1033,7 +1033,7 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment implements O
private void saveRouteLineAppearance(@NonNull ApplicationMode appMode,
@NonNull RouteLineDrawInfo drawInfo) {
- saveRouteLineColor(appMode, settings.ROUTE_LINE_COLOR, drawInfo.getColor(false));
+ saveRouteLineColor(appMode, settings.ROUTE_LINE_COLOR_DAY, drawInfo.getColor(false));
saveRouteLineColor(appMode, settings.ROUTE_LINE_COLOR_NIGHT, drawInfo.getColor(true));
settings.ROUTE_LINE_WIDTH.setModeValue(appMode, drawInfo.getWidth());
}
diff --git a/OsmAnd/src/net/osmand/plus/views/layers/RouteLayer.java b/OsmAnd/src/net/osmand/plus/views/layers/RouteLayer.java
index 816327eda6..d7393b2cc9 100644
--- a/OsmAnd/src/net/osmand/plus/views/layers/RouteLayer.java
+++ b/OsmAnd/src/net/osmand/plus/views/layers/RouteLayer.java
@@ -424,7 +424,7 @@ public class RouteLayer extends OsmandMapLayer implements ContextMenuLayer.ICont
} else {
CommonPreference colorPreference = night ?
view.getSettings().ROUTE_LINE_COLOR_NIGHT :
- view.getSettings().ROUTE_LINE_COLOR;
+ view.getSettings().ROUTE_LINE_COLOR_DAY;
int storedValue = colorPreference.getModeValue(helper.getAppMode());
color = storedValue != 0 ? storedValue : null;
}
From 1a149c0d63b72ad2a53f62e88e1447408e0a259d Mon Sep 17 00:00:00 2001
From: Skalii
Date: Thu, 25 Mar 2021 21:05:10 +0200
Subject: [PATCH 41/42] small fixes
---
.../plus/monitoring/TripRecordingBottomSheet.java | 5 ++++-
.../net/osmand/plus/myplaces/SegmentGPXAdapter.java | 9 ++-------
OsmAnd/src/net/osmand/plus/track/SegmentsCard.java | 2 +-
.../plus/views/controls/PagerSlidingTabStrip.java | 12 ------------
4 files changed, 7 insertions(+), 21 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java
index 3decf5bbad..480e5affa8 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java
@@ -294,10 +294,13 @@ public class TripRecordingBottomSheet extends MenuBottomSheetDialogFragment impl
viewGroup.removeAllViews();
setupDisplayHelper();
- View segmentView = SegmentGPXAdapter.createGpxTabsView(displayHelper, viewGroup, this, nightMode, true);
+ View segmentView = SegmentGPXAdapter.createGpxTabsView(displayHelper, viewGroup, this, nightMode);
AndroidUiHelper.setVisibility(View.GONE, segmentView.findViewById(R.id.list_item_divider));
WrapContentHeightViewPager pager = segmentView.findViewById(R.id.pager);
PagerSlidingTabStrip tabLayout = segmentView.findViewById(R.id.sliding_tabs);
+ tabLayout.setDividerWidth(AndroidUtils.dpToPx(app, 1));
+ tabLayout.setDividerColor(ContextCompat.getColor(app, nightMode ?
+ R.color.stroked_buttons_and_links_outline_dark : R.color.stroked_buttons_and_links_outline_light));
tabLayout.setOnTabReselectedListener(new PagerSlidingTabStrip.OnTabReselectedListener() {
@Override
public void onTabSelected(int position) {
diff --git a/OsmAnd/src/net/osmand/plus/myplaces/SegmentGPXAdapter.java b/OsmAnd/src/net/osmand/plus/myplaces/SegmentGPXAdapter.java
index 9891c6ef5f..91f67afd22 100644
--- a/OsmAnd/src/net/osmand/plus/myplaces/SegmentGPXAdapter.java
+++ b/OsmAnd/src/net/osmand/plus/myplaces/SegmentGPXAdapter.java
@@ -49,7 +49,7 @@ public class SegmentGPXAdapter extends ArrayAdapter {
boolean create = false;
if (row == null) {
create = true;
- row = createGpxTabsView(displayHelper, parent, listener, nightMode, false);
+ row = createGpxTabsView(displayHelper, parent, listener, nightMode);
}
GpxDisplayItem item = getItem(position);
if (item != null) {
@@ -67,7 +67,7 @@ public class SegmentGPXAdapter extends ArrayAdapter {
}
public static View createGpxTabsView(TrackDisplayHelper displayHelper, ViewGroup root,
- SegmentActionsListener listener, boolean nightMode, boolean withDivider) {
+ SegmentActionsListener listener, boolean nightMode) {
Context context = root.getContext();
View row = UiUtilities.getInflater(context, nightMode).inflate(R.layout.gpx_list_item_tab_content, root, false);
@@ -75,11 +75,6 @@ public class SegmentGPXAdapter extends ArrayAdapter {
tabLayout.setTabBackground(AndroidUtils.resolveAttribute(context, R.attr.btn_bg_border_inactive));
tabLayout.setIndicatorHeight(0);
tabLayout.setShouldExpand(true);
- if (withDivider) {
- tabLayout.setDividerWidth(AndroidUtils.dpToPx(context, 1.0f));
- tabLayout.setDividerColor(ContextCompat.getColor(context, nightMode ?
- R.color.stroked_buttons_and_links_outline_dark : R.color.stroked_buttons_and_links_outline_light));
- }
WrapContentHeightViewPager pager = row.findViewById(R.id.pager);
pager.setSwipeable(false);
pager.setOffscreenPageLimit(2);
diff --git a/OsmAnd/src/net/osmand/plus/track/SegmentsCard.java b/OsmAnd/src/net/osmand/plus/track/SegmentsCard.java
index 8a49438bc6..a3ed324543 100644
--- a/OsmAnd/src/net/osmand/plus/track/SegmentsCard.java
+++ b/OsmAnd/src/net/osmand/plus/track/SegmentsCard.java
@@ -42,7 +42,7 @@ public class SegmentsCard extends BaseCard {
container.removeAllViews();
List items = TrackDisplayHelper.flatten(displayHelper.getOriginalGroups(filterTypes));
for (GpxDisplayItem displayItem : items) {
- View segmentView = SegmentGPXAdapter.createGpxTabsView(displayHelper, container, listener, nightMode, false);
+ View segmentView = SegmentGPXAdapter.createGpxTabsView(displayHelper, container, listener, nightMode);
WrapContentHeightViewPager pager = segmentView.findViewById(R.id.pager);
PagerSlidingTabStrip tabLayout = segmentView.findViewById(R.id.sliding_tabs);
diff --git a/OsmAnd/src/net/osmand/plus/views/controls/PagerSlidingTabStrip.java b/OsmAnd/src/net/osmand/plus/views/controls/PagerSlidingTabStrip.java
index 7eade8f2ba..bdb936f8ba 100644
--- a/OsmAnd/src/net/osmand/plus/views/controls/PagerSlidingTabStrip.java
+++ b/OsmAnd/src/net/osmand/plus/views/controls/PagerSlidingTabStrip.java
@@ -129,7 +129,6 @@ public class PagerSlidingTabStrip extends HorizontalScrollView {
private int dividerWidth = 0;
- private int dividerPadding = 0;
@ColorInt
private int dividerColor;
@@ -183,7 +182,6 @@ public class PagerSlidingTabStrip extends HorizontalScrollView {
scrollOffset = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, scrollOffset, dm);
indicatorHeight = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, indicatorHeight, dm);
underlineHeight = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, underlineHeight, dm);
- dividerPadding = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dividerPadding, dm);
tabPadding = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, tabPadding, dm);
dividerWidth = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dividerWidth, dm);
tabTextSize = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, tabTextSize, dm);
@@ -214,7 +212,6 @@ public class PagerSlidingTabStrip extends HorizontalScrollView {
dividerWidth = a.getDimensionPixelSize(R.styleable.PagerSlidingTabStrip_pstsDividerWidth, dividerWidth);
indicatorHeight = a.getDimensionPixelSize(R.styleable.PagerSlidingTabStrip_pstsIndicatorHeight, indicatorHeight);
underlineHeight = a.getDimensionPixelSize(R.styleable.PagerSlidingTabStrip_pstsUnderlineHeight, underlineHeight);
- dividerPadding = a.getDimensionPixelSize(R.styleable.PagerSlidingTabStrip_pstsDividerPadding, dividerPadding);
tabPadding = a.getDimensionPixelSize(R.styleable.PagerSlidingTabStrip_pstsTabPaddingLeftRight, tabPadding);
tabBackgroundResId = a.getResourceId(R.styleable.PagerSlidingTabStrip_pstsTabBackground, tabBackgroundResId);
indicatorBgColor = a.getColor(R.styleable.PagerSlidingTabStrip_pstsTabBackground, Color.TRANSPARENT);
@@ -720,10 +717,6 @@ public class PagerSlidingTabStrip extends HorizontalScrollView {
return underlineHeight;
}
- public int getDividerPadding() {
- return dividerPadding;
- }
-
public int getScrollOffset() {
return scrollOffset;
}
@@ -826,11 +819,6 @@ public class PagerSlidingTabStrip extends HorizontalScrollView {
invalidate();
}
- public void setDividerPadding(int dividerPaddingPx) {
- this.dividerPadding = dividerPaddingPx;
- invalidate();
- }
-
public void setScrollOffset(int scrollOffsetPx) {
this.scrollOffset = scrollOffsetPx;
invalidate();
From 27cf399bd9edc200e101187136dd86a133c9c7e7 Mon Sep 17 00:00:00 2001
From: Vitaliy
Date: Thu, 25 Mar 2021 22:49:31 +0200
Subject: [PATCH 42/42] Fix NoClassDefFoundError for old android version
---
.../main/java/net/osmand/router/RoutePlannerFrontEnd.java | 7 +++----
.../main/java/net/osmand/router/RoutingConfiguration.java | 2 +-
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/OsmAnd-java/src/main/java/net/osmand/router/RoutePlannerFrontEnd.java b/OsmAnd-java/src/main/java/net/osmand/router/RoutePlannerFrontEnd.java
index 74dceb13a1..4fb6c9a193 100644
--- a/OsmAnd-java/src/main/java/net/osmand/router/RoutePlannerFrontEnd.java
+++ b/OsmAnd-java/src/main/java/net/osmand/router/RoutePlannerFrontEnd.java
@@ -6,7 +6,6 @@ import net.osmand.NativeLibrary;
import net.osmand.PlatformUtil;
import net.osmand.ResultMatcher;
import net.osmand.binary.BinaryMapIndexReader;
-import net.osmand.binary.BinaryMapRouteReaderAdapter;
import net.osmand.binary.BinaryMapRouteReaderAdapter.RouteRegion;
import net.osmand.binary.RouteDataObject;
import net.osmand.data.LatLon;
@@ -689,15 +688,15 @@ public class RoutePlannerFrontEnd {
}
}
if (ctx.calculationMode == RouteCalculationMode.COMPLEX && routeDirection == null
- && maxDistance > ctx.config.DEVIATION_RADIUS * 6) {
+ && maxDistance > RoutingConfiguration.DEVIATION_RADIUS * 6) {
ctx.calculationProgress.totalIterations++;
RoutingContext nctx = buildRoutingContext(ctx.config, ctx.nativeLib, ctx.getMaps(), RouteCalculationMode.BASE);
nctx.calculationProgress = ctx.calculationProgress;
List ls = searchRoute(nctx, start, end, intermediates);
- if(ls == null) {
+ if (ls == null) {
return null;
}
- routeDirection = PrecalculatedRouteDirection.build(ls, ctx.config.DEVIATION_RADIUS, ctx.getRouter().getMaxSpeed());
+ routeDirection = PrecalculatedRouteDirection.build(ls, RoutingConfiguration.DEVIATION_RADIUS, ctx.getRouter().getMaxSpeed());
}
List res ;
if (intermediatesEmpty && ctx.nativeLib != null) {
diff --git a/OsmAnd-java/src/main/java/net/osmand/router/RoutingConfiguration.java b/OsmAnd-java/src/main/java/net/osmand/router/RoutingConfiguration.java
index 232b971f9f..829e061494 100644
--- a/OsmAnd-java/src/main/java/net/osmand/router/RoutingConfiguration.java
+++ b/OsmAnd-java/src/main/java/net/osmand/router/RoutingConfiguration.java
@@ -20,7 +20,7 @@ import java.util.Stack;
public class RoutingConfiguration {
public static final int DEFAULT_MEMORY_LIMIT = 30;
- public final float DEVIATION_RADIUS = 3000;
+ public static final float DEVIATION_RADIUS = 3000;
public Map attributes = new LinkedHashMap();
// 1. parameters of routing and different tweaks