From 50f1c6804e121d0ee65028d27400c57749073a77 Mon Sep 17 00:00:00 2001 From: serso Date: Sun, 23 Oct 2011 16:05:40 +0400 Subject: [PATCH] grouping separator preference --- res/values-ru/strings.xml | 7 +++ res/values/arrays.xml | 12 ++++ res/values/default_values.xml | 3 + res/values/strings.xml | 6 ++ res/xml/main_preferences.xml | 10 +++- .../android/calculator/CalculatorDisplay.java | 5 +- .../android/calculator/CalculatorEditor.java | 7 ++- .../android/calculator/TextHighlighter.java | 56 +++++++++++++++++-- .../android/calculator/math/MathType.java | 12 +++- .../calculator/model/CalculatorEngine.java | 28 +++++++--- .../model/FromJsclSimplifyTextProcessor.java | 7 +-- .../calculator/model/NumberBuilder.java | 30 +++++++--- .../calculator/TextHighlighterTest.java | 8 +-- .../FromJsclSimplifyTextProcessorTest.java | 3 + 14 files changed, 155 insertions(+), 39 deletions(-) diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml index 5f4b108b..e4d49319 100644 --- a/res/values-ru/strings.xml +++ b/res/values-ru/strings.xml @@ -85,4 +85,11 @@ Устанавливает тему оформления приложения Очистить историю Следующие константы не определены: {0}! + + Не использовать разделитель разрядов + Апостроф (\') + Пробел ( ) + Разделитель разрядов + Устанавливает разделитель разрядов числа + diff --git a/res/values/arrays.xml b/res/values/arrays.xml index 5c57dc96..eff788ab 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml @@ -15,4 +15,16 @@ violet_theme light_blue_theme + + + @string/p_grouping_separator_no + @string/p_grouping_separator_apostrophe + @string/p_grouping_separator_space + + + "" + \' + + + \ No newline at end of file diff --git a/res/values/default_values.xml b/res/values/default_values.xml index 5b8b8f63..783249c7 100644 --- a/res/values/default_values.xml +++ b/res/values/default_values.xml @@ -24,4 +24,7 @@ org.solovyev.android.calculator.CalculatorActivity_calc_theme default_theme + org.solovyev.android.calculator.CalculatorActivity_calc_grouping_separator + + \ No newline at end of file diff --git a/res/values/strings.xml b/res/values/strings.xml index 6e0d68ac..7ca826b0 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -85,4 +85,10 @@ Sets the theme for calculator Clear history Next constants are undefined: {0}! + + No grouping separator + Apostrophe (\') + Space ( ) + Grouping separator + Sets grouping separator diff --git a/res/xml/main_preferences.xml b/res/xml/main_preferences.xml index 7c266342..b0fa9f55 100644 --- a/res/xml/main_preferences.xml +++ b/res/xml/main_preferences.xml @@ -17,13 +17,17 @@ a:title="@string/c_calc_color_display_title" a:defaultValue="true"/> + + + a:entryValues="@array/p_theme_values"/>