From 35dc1623659c8199c6f54759d2c775f25c7f2859 Mon Sep 17 00:00:00 2001 From: serso Date: Wed, 28 Sep 2011 22:53:50 +0400 Subject: [PATCH] preferences changed --- res/values/strings.xml | 3 +++ res/xml/preferences.xml | 8 ++++---- .../solovyev/android/calculator/CalculatorActivity.java | 2 ++ .../android/view/prefs/AbstractDialogPreference.java | 4 ++-- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 5c087d69..ff316f9b 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -28,4 +28,7 @@ redo clear paste + + Color expressions + Precision of result diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml index eef77cd2..351ab219 100644 --- a/res/xml/preferences.xml +++ b/res/xml/preferences.xml @@ -6,16 +6,16 @@ - + range:boundaries="0;45"/>--> diff --git a/src/main/java/org/solovyev/android/calculator/CalculatorActivity.java b/src/main/java/org/solovyev/android/calculator/CalculatorActivity.java index bfd5d515..5ff6204a 100644 --- a/src/main/java/org/solovyev/android/calculator/CalculatorActivity.java +++ b/src/main/java/org/solovyev/android/calculator/CalculatorActivity.java @@ -248,5 +248,7 @@ public class CalculatorActivity extends Activity implements FontSizeAdjuster, Sh final Boolean colorExpressionsInBracketsDefault = new BooleanMapper().parseValue(this.getString(R.string.p_calc_color_display)); assert colorExpressionsInBracketsDefault != null; this.calculatorView.getEditor().setHighlightExpressionInBrackets(sharedPreferences.getBoolean(this.getString(R.string.p_calc_color_display_key), colorExpressionsInBracketsDefault)); + + this.calculatorView.evaluate(); } } \ No newline at end of file diff --git a/src/main/java/org/solovyev/android/view/prefs/AbstractDialogPreference.java b/src/main/java/org/solovyev/android/view/prefs/AbstractDialogPreference.java index f7ebc3cf..e9adc999 100644 --- a/src/main/java/org/solovyev/android/view/prefs/AbstractDialogPreference.java +++ b/src/main/java/org/solovyev/android/view/prefs/AbstractDialogPreference.java @@ -100,9 +100,9 @@ public abstract class AbstractDialogPreference extends DialogPreference { final LinearLayout.LayoutParams params = getParams(); if (params != null) { - result.addView(v); - } else { result.addView(v, params); + } else { + result.addView(v); } return result;