diff options
author | 2014-01-28 11:14:09 +0900 | |
---|---|---|
committer | 2014-01-28 11:17:47 +0900 | |
commit | 9ac6c9064d24a3a0e96db470bb76c997c51bb5c8 (patch) | |
tree | 85e5dfda6c79bb946489819706ac21739737508d /java/src/com/android/inputmethod | |
parent | c2e2b3949b159d6412e0e5815c1503d94b2b5ce7 (diff) | |
download | latinime-9ac6c9064d24a3a0e96db470bb76c997c51bb5c8.tar.gz latinime-9ac6c9064d24a3a0e96db470bb76c997c51bb5c8.tar.xz latinime-9ac6c9064d24a3a0e96db470bb76c997c51bb5c8.zip |
Fix test fails caused by I8bede13c87
Change-Id: I1e816bf7ea5fd46b39c2482bbcbfcdc16d5acc21
Diffstat (limited to 'java/src/com/android/inputmethod')
-rw-r--r-- | java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java index 32552ebe7..e44bd70a1 100644 --- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java +++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java @@ -26,6 +26,7 @@ import android.view.View; import android.view.View.OnClickListener; import android.view.View.OnLongClickListener; import android.view.ViewGroup; +import android.view.ViewParent; import android.widget.RelativeLayout; import android.widget.TextView; @@ -189,10 +190,21 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick public void clear() { mSuggestionsStrip.removeAllViews(); + removeAllDebugInfoViews(); mStripVisibilityGroup.showSuggestionsStrip(); dismissMoreSuggestionsPanel(); } + private void removeAllDebugInfoViews() { + // The debug info views may be placed as children views of this {@link SuggestionStripView}. + for (final View debugInfoView : mDebugInfoViews) { + final ViewParent parent = debugInfoView.getParent(); + if (parent instanceof ViewGroup) { + ((ViewGroup)parent).removeView(debugInfoView); + } + } + } + private final MoreSuggestionsListener mMoreSuggestionsListener = new MoreSuggestionsListener() { @Override public void onSuggestionSelected(final int index, final SuggestedWordInfo wordInfo) { |