From e1d356de8af5596abd1ccfe393beb46d4c1a5178 Mon Sep 17 00:00:00 2001 From: serso Date: Tue, 1 Nov 2011 15:30:28 +0400 Subject: [PATCH] fix for display clearing --- res/layout/calc_display.xml | 2 +- .../solovyev/android/calculator/CalculatorModel.java | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/res/layout/calc_display.xml b/res/layout/calc_display.xml index b843dfdc..52ffaf29 100644 --- a/res/layout/calc_display.xml +++ b/res/layout/calc_display.xml @@ -11,4 +11,4 @@ a:id="@+id/calculatorDisplay" style="@style/display_style" a:scrollHorizontally="true" - a:scrollbars="horizontal"/> \ No newline at end of file + a:scrollbars="none"/> \ No newline at end of file diff --git a/src/main/java/org/solovyev/android/calculator/CalculatorModel.java b/src/main/java/org/solovyev/android/calculator/CalculatorModel.java index 4d60562c..c962d8fa 100644 --- a/src/main/java/org/solovyev/android/calculator/CalculatorModel.java +++ b/src/main/java/org/solovyev/android/calculator/CalculatorModel.java @@ -141,7 +141,11 @@ public enum CalculatorModel implements CursorControl, HistoryControl pendingOperation = new MutableObject(); - private void evaluate(boolean delayEvaluate, @NotNull final String expression, @NotNull final JsclOperation operation, @Nullable CalculatorHistoryState historyState) { + private void evaluate(boolean delayEvaluate, + @NotNull final String expression, + @NotNull final JsclOperation operation, + @Nullable CalculatorHistoryState historyState) { + final CalculatorHistoryState localHistoryState; if (historyState == null) { this.display.setText(""); @@ -201,7 +205,9 @@ public enum CalculatorModel implements CursorControl, HistoryControl 0) { display.setText(result.getResult()); } else { display.setText(""); @@ -231,7 +237,7 @@ public enum CalculatorModel implements CursorControl, HistoryControl