Merge "Arrange for evaluateAndNotify calls at the right time." into ub-calculator-euler
diff --git a/res/layout/history_item.xml b/res/layout/history_item.xml
index 87ef83b..f3e05c3 100644
--- a/res/layout/history_item.xml
+++ b/res/layout/history_item.xml
@@ -27,6 +27,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fontFamily="sans-serif-medium"
+ android:paddingStart="@dimen/history_item_text_padding_start"
+ android:paddingEnd="@dimen/history_item_text_padding_end"
android:text="@string/title_current_expression"
android:textColor="?android:attr/colorAccent"
android:textSize="14dp" />
diff --git a/src/com/android/calculator2/CalculatorResult.java b/src/com/android/calculator2/CalculatorResult.java
index 5e61dc4..5a23c01 100644
--- a/src/com/android/calculator2/CalculatorResult.java
+++ b/src/com/android/calculator2/CalculatorResult.java
@@ -433,14 +433,14 @@
* Add the result to the value currently in memory.
*/
public void onMemoryAdd() {
- mEvaluator.addToMemory(Evaluator.MAIN_INDEX);
+ mEvaluator.addToMemory(mIndex);
}
/**
* Subtract the result from the value currently in memory.
*/
public void onMemorySubtract() {
- mEvaluator.subtractFromMemory(Evaluator.MAIN_INDEX);
+ mEvaluator.subtractFromMemory(mIndex);
}
/**