Fix UI for 12

This commit is contained in:
Victor Shcherb 2015-05-06 23:51:00 +02:00
parent ef643006b9
commit f40cc08002
5 changed files with 7 additions and 4 deletions

View file

@ -90,9 +90,9 @@ public class OsmAndFormatter {
if (meters >= 100 * mainUnitInMeters) {
return (int) (meters / mainUnitInMeters + 0.5) + " " + ctx.getString(mainUnitStr); //$NON-NLS-1$
} else if (meters > 9.99f * mainUnitInMeters) {
return MessageFormat.format("{0,number,#.#} " + ctx.getString(mainUnitStr), ((float) meters) / mainUnitInMeters); //$NON-NLS-1$
return MessageFormat.format("{0,number,#.#} " + ctx.getString(mainUnitStr), ((float) meters) / mainUnitInMeters).replace('\n', ' '); //$NON-NLS-1$
} else if (meters > 0.999f * mainUnitInMeters) {
return MessageFormat.format("{0,number,#.##} " + ctx.getString(mainUnitStr), ((float) meters) / mainUnitInMeters); //$NON-NLS-1$
return MessageFormat.format("{0,number,#.##} " + ctx.getString(mainUnitStr), ((float) meters) / mainUnitInMeters).replace('\n', ' '); //$NON-NLS-1$
} else {
if (mc == MetricsConstants.KILOMETERS_AND_METERS) {
return ((int) (meters + 0.5)) + " " + ctx.getString(R.string.m); //$NON-NLS-1$

View file

@ -23,7 +23,7 @@
android:insetBottom="@dimen/abc_button_inset_vertical_material">
<shape android:shape="rectangle">
<corners android:radius="@dimen/abc_control_corner_material" />
<solid android:color="@android:color/white" />
<solid android:color="@android:color/darker_gray" />
<padding android:left="@dimen/abc_button_padding_horizontal_material"
android:top="@dimen/abc_button_padding_vertical_material"
android:right="@dimen/abc_button_padding_horizontal_material"

View file

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="checkbox_padding">0dp</dimen>
<dimen name="radio_padding">0dp</dimen>
</resources>

View file

@ -84,4 +84,5 @@
<!-- Dialog button bar height -->
<dimen name="abc_alert_dialog_button_bar_height">48dp</dimen>
<dimen name="checkbox_padding">12dp</dimen>
<dimen name="radio_padding">30dp</dimen>
</resources>

View file

@ -378,7 +378,8 @@
<style name="Base.Widget.AppCompat.CompoundButton.RadioButton" parent="android:Widget.CompoundButton.RadioButton">
<item name="android:button">?android:attr/listChoiceIndicatorSingle</item>
<item name="android:background">?attr/selectableItemBackgroundBorderless</item>
<item name="android:background">?attr/selectableItemBackgroundBorderless</item>
<item name="android:paddingLeft">@dimen/radio_padding</item>
</style>
<style name="Base.Widget.AppCompat.CompoundButton.Switch" parent="android:Widget.CompoundButton">