Fix animation for RESULT state.
Fixes: 32948596
Introduce isResultState() and pass its value to HistoryAdapter. We
actually can't accurately determine RESULT state from the Evaluator.
Change-Id: Ie50c5743fac8af680073c60a3e9cc9b58ccff167
diff --git a/src/com/android/calculator2/HistoryAdapter.java b/src/com/android/calculator2/HistoryAdapter.java
index ca5509c..dba887f 100644
--- a/src/com/android/calculator2/HistoryAdapter.java
+++ b/src/com/android/calculator2/HistoryAdapter.java
@@ -39,6 +39,8 @@
private List<HistoryItem> mDataSet;
+ private boolean mIsResultState;
+
public HistoryAdapter(Calculator calculator, ArrayList<HistoryItem> dataSet,
String currentExpressionDescription) {
mEvaluator = Evaluator.getInstance(calculator);
@@ -131,6 +133,10 @@
}
}
+ public void setIsResultState(boolean isResult) {
+ mIsResultState = isResult;
+ }
+
public static class ViewHolder extends RecyclerView.ViewHolder {
private TextView mDate;