summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGilles Debunne <debunne@google.com>2011-11-02 18:39:50 -0700
committerGilles Debunne <debunne@google.com>2011-11-02 18:39:53 -0700
commit133f942a20d59f0e51f0bea4158b5b141f93e500 (patch)
tree280ab8ee12b6d248c7535946c1e463238c359776
parenta3d043b904acd4eb269632b747d9f512856a0f3a (diff)
downloadandroid_packages_apps_ExactCalculator-133f942a20d59f0e51f0bea4158b5b141f93e500.tar.gz
android_packages_apps_ExactCalculator-133f942a20d59f0e51f0bea4158b5b141f93e500.tar.bz2
android_packages_apps_ExactCalculator-133f942a20d59f0e51f0bea4158b5b141f93e500.zip
No spell checking in calculator
The listeners' input type replaces the one of the EditText. Added the no suggestion flag there too. Bug 5420869. Change-Id: I87ccf06bd93846a3e99436b48f557e2f2c0ffca2
-rw-r--r--src/com/android/calculator2/CalculatorDisplay.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/com/android/calculator2/CalculatorDisplay.java b/src/com/android/calculator2/CalculatorDisplay.java
index 3b48e1d..ca31fe9 100644
--- a/src/com/android/calculator2/CalculatorDisplay.java
+++ b/src/com/android/calculator2/CalculatorDisplay.java
@@ -19,11 +19,11 @@ package com.android.calculator2;
import android.content.Context;
import android.graphics.Rect;
import android.text.Editable;
+import android.text.InputType;
import android.text.Spanned;
import android.text.method.NumberKeyListener;
import android.util.AttributeSet;
import android.view.animation.TranslateAnimation;
-import android.view.inputmethod.EditorInfo;
import android.widget.EditText;
import android.widget.ViewSwitcher;
@@ -48,7 +48,6 @@ class CalculatorDisplay extends ViewSwitcher {
TranslateAnimation inAnimDown;
TranslateAnimation outAnimDown;
- private Logic mLogic;
private int mMaxDigits = DEFAULT_MAX_DIGITS;
public CalculatorDisplay(Context context, AttributeSet attrs) {
@@ -61,11 +60,10 @@ class CalculatorDisplay extends ViewSwitcher {
}
protected void setLogic(Logic logic) {
- mLogic = logic;
NumberKeyListener calculatorKeyListener =
new NumberKeyListener() {
public int getInputType() {
- return EditorInfo.TYPE_CLASS_TEXT;
+ return InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS;
}
@Override