Remove unnecessary conversion
This commit is contained in:
parent
d6143e100e
commit
6ceb385050
2 changed files with 2 additions and 2 deletions
|
@ -88,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() {
|
||||
|
|
|
@ -90,7 +90,7 @@ public class SizePreference extends DialogPreference {
|
|||
if (!persistedString.equals(defaultValue)) {
|
||||
try {
|
||||
final DecimalFormat df = new DecimalFormat("#.####", new DecimalFormatSymbols(Locale.US));
|
||||
persistedString = String.valueOf(df.format(Float.parseFloat(persistedString) + 0.01f));
|
||||
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) {
|
||||
|
|
Loading…
Reference in a new issue