diff --git a/res/layout/main.xml b/res/layout/main.xml
index 8938fac8..b49d7cd3 100644
--- a/res/layout/main.xml
+++ b/res/layout/main.xml
@@ -29,7 +29,7 @@
@@ -64,6 +64,11 @@
calc:textDown="^2" style="@style/digitButtonStyle"
a:onClick="digitButtonClickHandler"/>
+
+
@@ -90,6 +95,11 @@
style="@style/digitButtonStyle"
a:onClick="digitButtonClickHandler"/>
+
+
@@ -112,6 +122,11 @@
style="@style/digitButtonStyle"
a:onClick="digitButtonClickHandler"/>
+
+
@@ -140,6 +155,11 @@
style="@style/digitButtonStyle"
a:onClick="digitButtonClickHandler"/>
+
@@ -154,10 +174,6 @@
-->
-
-
+
+
+
+
+
-
diff --git a/src/main/java/org/solovyev/android/calculator/CalculatorActivity.java b/src/main/java/org/solovyev/android/calculator/CalculatorActivity.java
index 35a35a3f..88cf20e0 100644
--- a/src/main/java/org/solovyev/android/calculator/CalculatorActivity.java
+++ b/src/main/java/org/solovyev/android/calculator/CalculatorActivity.java
@@ -87,8 +87,7 @@ public class CalculatorActivity extends Activity implements FontSizeAdjuster {
}
final SimpleOnDragListener historyOnDragListener = new SimpleOnDragListener(new HistoryDragProcessor(), dragPreferences);
- ((DragButton) findViewById(R.id.clearButton)).setOnDragListener(historyOnDragListener);
- ((DragButton) findViewById(R.id.pasteButton)).setOnDragListener(historyOnDragListener);
+ ((DragButton) findViewById(R.id.historyButton)).setOnDragListener(historyOnDragListener);
onDragListeners.add(historyOnDragListener);
final SimpleOnDragListener toPositionOnDragListener = new SimpleOnDragListener(new SimpleOnDragListener.DragProcessor() {
diff --git a/src/main/java/org/solovyev/android/calculator/CalculatorView.java b/src/main/java/org/solovyev/android/calculator/CalculatorView.java
index fa989021..7344eec5 100644
--- a/src/main/java/org/solovyev/android/calculator/CalculatorView.java
+++ b/src/main/java/org/solovyev/android/calculator/CalculatorView.java
@@ -101,13 +101,14 @@ public class CalculatorView implements CursorControl{
} catch (EvalError evalError) {
// actually nothing shall be logged while text operations are done
}
+
+ saveHistoryState();
}
}
private void evaluate(@Nullable String expression) throws EvalError {
if (!StringUtils.isEmpty(expression)) {
display.setText(calculator.evaluate(JsclOperation.numeric, expression));
- saveHistoryState();
}
}