diff options
author | 2011-08-12 20:15:17 +0900 | |
---|---|---|
committer | 2011-08-12 23:14:34 +0900 | |
commit | 59f5cc8572374836950e4f086e5268773ea92166 (patch) | |
tree | b687ce6a74f38481fa432d13f756e1f01cc1ef15 /java/src/com/android/inputmethod/latin/CandidateView.java | |
parent | f84107cae72b85e0933b3c296b7f45e00b084809 (diff) | |
download | latinime-59f5cc8572374836950e4f086e5268773ea92166.tar.gz latinime-59f5cc8572374836950e4f086e5268773ea92166.tar.xz latinime-59f5cc8572374836950e4f086e5268773ea92166.zip |
Get rid of auto correction flash animation in the suggestion strip
bug: 5156762
Change-Id: I1350ad3d7125f8ecdfc699233ed05e253cc3f010
Diffstat (limited to 'java/src/com/android/inputmethod/latin/CandidateView.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/CandidateView.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/CandidateView.java b/java/src/com/android/inputmethod/latin/CandidateView.java index d779c8565..0640fd0b1 100644 --- a/java/src/com/android/inputmethod/latin/CandidateView.java +++ b/java/src/com/android/inputmethod/latin/CandidateView.java @@ -278,6 +278,7 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo private final ArrayList<CharSequence> mTexts = new ArrayList<CharSequence>(); + public final boolean mAutoCorrectionVisualFlashEnabled; public boolean mMoreSuggestionsAvailable; public SuggestionsStripParams(Context context, AttributeSet attrs, int defStyle, @@ -285,6 +286,8 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo super(words, dividers, infos); final TypedArray a = context.obtainStyledAttributes( attrs, R.styleable.CandidateView, defStyle, R.style.CandidateViewStyle); + mAutoCorrectionVisualFlashEnabled = a.getBoolean( + R.styleable.CandidateView_autoCorrectionVisualFlashEnabled, false); mAutoCorrectHighlight = a.getInt(R.styleable.CandidateView_autoCorrectHighlight, 0); mColorTypedWord = a.getColor(R.styleable.CandidateView_colorTypedWord, 0); mColorAutoCorrect = a.getColor(R.styleable.CandidateView_colorAutoCorrect, 0); @@ -700,6 +703,9 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo } public void onAutoCorrectionInverted(CharSequence autoCorrectedWord) { + if (!mStripParams.mAutoCorrectionVisualFlashEnabled) { + return; + } final CharSequence inverted = mStripParams.getInvertedText(autoCorrectedWord); if (inverted == null) return; |