diff --git a/android-app-core/res/values/preferences.xml b/android-app-core/res/values/preferences.xml
deleted file mode 100644
index fbfec9ae..00000000
--- a/android-app-core/res/values/preferences.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
- org.solovyev.android.calculator.CalculatorModel_functions
- org.solovyev.android.calculator.CalculatorModel_vars
-
\ No newline at end of file
diff --git a/android-app-core/src/main/java/org/solovyev/android/calculator/model/AndroidCalculatorEngine.java b/android-app-core/src/main/java/org/solovyev/android/calculator/model/AndroidCalculatorEngine.java
index 7863c5a5..995ced40 100644
--- a/android-app-core/src/main/java/org/solovyev/android/calculator/model/AndroidCalculatorEngine.java
+++ b/android-app-core/src/main/java/org/solovyev/android/calculator/model/AndroidCalculatorEngine.java
@@ -128,8 +128,8 @@ public class AndroidCalculatorEngine implements CalculatorEngine, SharedPreferen
final JsclMathEngine engine = JsclMathEngine.getInstance();
this.calculatorEngine = new CalculatorEngineImpl(engine,
- new CalculatorVarsRegistry(engine.getConstantsRegistry(), new AndroidMathEntityDao(R.string.p_calc_vars, application, Vars.class)),
- new CalculatorFunctionsMathRegistry(engine.getFunctionsRegistry(), new AndroidMathEntityDao(R.string.p_calc_functions, application, Functions.class)),
+ new CalculatorVarsRegistry(engine.getConstantsRegistry(), new AndroidMathEntityDao("org.solovyev.android.calculator.CalculatorModel_vars", application, Vars.class)),
+ new CalculatorFunctionsMathRegistry(engine.getFunctionsRegistry(), new AndroidMathEntityDao("org.solovyev.android.calculator.CalculatorModel_functions", application, Functions.class)),
new CalculatorOperatorsMathRegistry(engine.getOperatorsRegistry(), new AndroidMathEntityDao(null, application, null)),
new CalculatorPostfixFunctionsRegistry(engine.getPostfixFunctionsRegistry(), new AndroidMathEntityDao(null, application, null)),
this.lock);
diff --git a/android-app-core/src/main/java/org/solovyev/android/calculator/model/AndroidMathEntityDao.java b/android-app-core/src/main/java/org/solovyev/android/calculator/model/AndroidMathEntityDao.java
index 8379f076..3cad19e7 100644
--- a/android-app-core/src/main/java/org/solovyev/android/calculator/model/AndroidMathEntityDao.java
+++ b/android-app-core/src/main/java/org/solovyev/android/calculator/model/AndroidMathEntityDao.java
@@ -51,7 +51,7 @@ public class AndroidMathEntityDao implements Ma
private static final String TAG = AndroidMathEntityDao.class.getSimpleName();
@Nullable
- private final Integer preferenceStringId;
+ private final String preferenceString;
@Nonnull
private final Context context;
@@ -59,17 +59,17 @@ public class AndroidMathEntityDao implements Ma
@Nullable
private final Class extends MathEntityPersistenceContainer> persistenceContainerClass;
- public AndroidMathEntityDao(@Nullable Integer preferenceStringId,
+ public AndroidMathEntityDao(@Nullable String preferenceString,
@Nonnull Application application,
@Nullable Class extends MathEntityPersistenceContainer> persistenceContainerClass) {
- this.preferenceStringId = preferenceStringId;
+ this.preferenceString = preferenceString;
this.context = application;
this.persistenceContainerClass = persistenceContainerClass;
}
@Override
public void save(@Nonnull MathEntityPersistenceContainer container) {
- if (preferenceStringId != null) {
+ if (preferenceString != null) {
final SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(context);
final SharedPreferences.Editor editor = settings.edit();
@@ -81,7 +81,7 @@ public class AndroidMathEntityDao implements Ma
throw new RuntimeException(e);
}
- editor.putString(context.getString(preferenceStringId), sw.toString());
+ editor.putString(preferenceString, sw.toString());
editor.commit();
}
@@ -90,11 +90,11 @@ public class AndroidMathEntityDao implements Ma
@Nullable
@Override
public MathEntityPersistenceContainer load() {
- if (persistenceContainerClass != null && preferenceStringId != null) {
+ if (persistenceContainerClass != null && preferenceString != null) {
final SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
if (preferences != null) {
- final String value = preferences.getString(context.getString(preferenceStringId), null);
+ final String value = preferences.getString(preferenceString, null);
if (value != null) {
final Serializer serializer = new Persister();
try {
diff --git a/android-app/res/values-large/arrays.xml b/android-app/res/values-large/arrays.xml
index c6bcbbc0..4d508828 100644
--- a/android-app/res/values-large/arrays.xml
+++ b/android-app/res/values-large/arrays.xml
@@ -28,7 +28,7 @@
- @string/p_layout_simple
- @string/p_layout_simple_mobile
-
+
- main_calculator
- main_calculator_mobile
- simple
diff --git a/android-app/res/values/arrays.xml b/android-app/res/values/arrays.xml
index 7742c23a..23de9ed4 100644
--- a/android-app/res/values/arrays.xml
+++ b/android-app/res/values/arrays.xml
@@ -29,7 +29,7 @@
- @string/p_metro_green_theme
- @string/p_metro_purple_theme
-
+
- default_theme
- violet_theme
- light_blue_theme
@@ -43,13 +43,13 @@
- @string/p_grouping_separator_apostrophe
- @string/p_grouping_separator_space
-
+
- ""
- \'
- " "
-
+
- "*"
- "×"
- "∙"
@@ -59,7 +59,7 @@
- @string/p_layout_calculator
- @string/p_layout_simple
-
+
- main_calculator
- simple
@@ -69,7 +69,7 @@
- @string/p_calc_haptic_feedback_strength_middle
- @string/p_calc_haptic_feedback_strength_long
-
+
- 30
- 60
- 100
@@ -81,7 +81,7 @@
- @string/p_grad
- @string/p_turns
-
+
- deg
- rad
- grad
@@ -94,7 +94,7 @@
- @string/p_oct
- @string/p_bin
-
+
- dec
- hex
- oct