diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml index 466f8170..40c917f0 100644 --- a/res/values-ru/strings.xml +++ b/res/values-ru/strings.xml @@ -35,6 +35,8 @@ переменные Подсветка выражений + Округление результата + Включает/выключает округление результата Точность результата Выход Добавить diff --git a/res/values/default_values.xml b/res/values/default_values.xml index 0e269f30..eea88c45 100644 --- a/res/values/default_values.xml +++ b/res/values/default_values.xml @@ -22,6 +22,9 @@ org.solovyev.android.calculator.CalculatorModel_haptic_feedback false + org.solovyev.android.calculator.CalculatorModel_round_result + true + org.solovyev.android.calculator.CalculatorModel_vars org.solovyev.android.calculator.CalculatorActivity_calc_theme diff --git a/res/values/strings.xml b/res/values/strings.xml index e1a4fd65..fdc72cf2 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -38,6 +38,8 @@ vars Highlight expressions + Round result + Toggles rounding of the result Precision of result Exit Add diff --git a/res/xml/main_preferences.xml b/res/xml/main_preferences.xml index e29b6125..e8cce53f 100644 --- a/res/xml/main_preferences.xml +++ b/res/xml/main_preferences.xml @@ -4,12 +4,18 @@ xmlns:range="http://schemas.android.com/apk/res/org.solovyev.android.calculator"> + + + range:boundaries="0;16"/> integerNumberMapper = new NumberMapper(Integer.class); //noinspection ConstantConditions this.setPrecision(integerNumberMapper.parseValue(preferences.getString(RESULT_PRECISION_P_KEY, RESULT_PRECISION_DEFAULT))); + this.setRoundResult(preferences.getBoolean(ROUND_RESULT_P_KEY, ROUND_RESULT_DEFAULT)); final String groupingSeparator = preferences.getString(GROUPING_SEPARATOR_P_KEY, GROUPING_SEPARATOR_DEFAULT); if (StringUtils.isEmpty(groupingSeparator)) {