diff --git a/OsmAnd/res/values-large/sizes.xml b/OsmAnd/res/values-large/sizes.xml
index f4c129da0e..94f7f9000f 100644
--- a/OsmAnd/res/values-large/sizes.xml
+++ b/OsmAnd/res/values-large/sizes.xml
@@ -89,8 +89,6 @@
12dp
54dp
- 8dp
-
33dp
5dp
diff --git a/OsmAnd/res/values/sizes.xml b/OsmAnd/res/values/sizes.xml
index 42b38e8c4b..19d8397db7 100644
--- a/OsmAnd/res/values/sizes.xml
+++ b/OsmAnd/res/values/sizes.xml
@@ -275,6 +275,7 @@
1.25
1.5
128dp
+ 8dp
236dp
68dp
@@ -285,7 +286,6 @@
52dp
10dp
- 5dp
28dp
88dp
diff --git a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/VehicleParametersBottomSheet.java b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/VehicleParametersBottomSheet.java
index e2274568c2..c57d1be8c1 100644
--- a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/VehicleParametersBottomSheet.java
+++ b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/VehicleParametersBottomSheet.java
@@ -39,7 +39,9 @@ import net.osmand.util.Algorithms;
import org.apache.commons.logging.Log;
import java.text.DecimalFormat;
+import java.text.DecimalFormatSymbols;
import java.util.Arrays;
+import java.util.Locale;
public class VehicleParametersBottomSheet extends BasePreferenceBottomSheet {
@@ -78,7 +80,7 @@ public class VehicleParametersBottomSheet extends BasePreferenceBottomSheet {
final TextView metric = mainView.findViewById(R.id.metric);
metric.setText(app.getString(preference.getAssets().getMetricRes()));
final RecyclerView recyclerView = mainView.findViewById(R.id.recycler_view);
- final DecimalFormat df = new DecimalFormat("#.####");
+ final DecimalFormat df = new DecimalFormat("#.####", new DecimalFormatSymbols(Locale.US));
text = mainView.findViewById(R.id.text_edit);
try {
currentValue = Float.parseFloat(preference.getValue());
@@ -86,7 +88,7 @@ public class VehicleParametersBottomSheet extends BasePreferenceBottomSheet {
currentValue = 0.0f;
}
selectedItem = preference.getEntryFromValue(preference.getValue());
- String currentValueStr = currentValue == 0.0f ? "" : String.valueOf(df.format(currentValue + 0.01f));
+ String currentValueStr = currentValue == 0.0f ? "" : df.format(currentValue + 0.01f);
text.setText(currentValueStr);
text.clearFocus();
text.setOnTouchListener(new View.OnTouchListener() {
@@ -133,7 +135,7 @@ public class VehicleParametersBottomSheet extends BasePreferenceBottomSheet {
selectedItem = item;
currentValue = preference.getValueFromEntries(selectedItem);
String currentValueStr = currentValue == 0.0f
- ? "" : String.valueOf(df.format(currentValue + 0.01f));
+ ? "" : df.format(currentValue + 0.01f);
text.setText(currentValueStr);
if (text.hasFocus()) {
text.setSelection(text.getText().length());
@@ -157,17 +159,18 @@ public class VehicleParametersBottomSheet extends BasePreferenceBottomSheet {
}
private ViewTreeObserver.OnGlobalLayoutListener getOnGlobalLayoutListener() {
- final int buttonsHeight = getResources().getDimensionPixelSize(R.dimen.dialog_button_ex_height);
return new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
Rect visibleDisplayFrame = new Rect();
+ int buttonsHeight = getResources().getDimensionPixelSize(R.dimen.dialog_button_ex_height);
+ int shadowHeight = getResources().getDimensionPixelSize(R.dimen.bottom_sheet_top_shadow_height);
final ScrollView scrollView = getView().findViewById(R.id.scroll_view);
scrollView.getWindowVisibleDisplayFrame(visibleDisplayFrame);
boolean showTopShadow;
int contentHeight = visibleDisplayFrame.bottom - visibleDisplayFrame.top - buttonsHeight;
if (contentHeightPrevious != contentHeight) {
- if (scrollView.getHeight() > contentHeight) {
+ if (scrollView.getHeight() + shadowHeight > contentHeight) {
scrollView.getLayoutParams().height = contentHeight;
showTopShadow = false;
} else {
diff --git a/OsmAnd/src/net/osmand/plus/settings/preferences/SizePreference.java b/OsmAnd/src/net/osmand/plus/settings/preferences/SizePreference.java
index 553e6a46db..67120bf7c6 100644
--- a/OsmAnd/src/net/osmand/plus/settings/preferences/SizePreference.java
+++ b/OsmAnd/src/net/osmand/plus/settings/preferences/SizePreference.java
@@ -7,6 +7,10 @@ import androidx.preference.DialogPreference;
import net.osmand.plus.R;
import net.osmand.plus.settings.bottomsheets.VehicleSizeAssets;
+import java.text.DecimalFormat;
+import java.text.DecimalFormatSymbols;
+import java.util.Locale;
+
public class SizePreference extends DialogPreference {
private String[] entries;
@@ -85,7 +89,8 @@ public class SizePreference extends DialogPreference {
String persistedString = getValue();
if (!persistedString.equals(defaultValue)) {
try {
- persistedString = String.valueOf(Float.parseFloat(persistedString) + 0.01f);
+ final DecimalFormat df = new DecimalFormat("#.####", new DecimalFormatSymbols(Locale.US));
+ persistedString = df.format(Float.parseFloat(persistedString) + 0.01f);
summary = String.format(getContext().getString(R.string.ltr_or_rtl_combine_via_space),
persistedString, getContext().getString(assets.getMetricShortRes()));
} catch (NumberFormatException e) {