aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2014-01-27 21:22:47 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2014-01-27 21:22:47 -0800
commit61ba174e16e89046dc30b02da29c7e89f9b23b7d (patch)
tree8afd03ed9e5fa082969a66c872dc2b38a368a285
parenta04ead80d71c33fd66dc752069916c84839c8706 (diff)
parent02b087090e9a4fe1a388bd18939711f988931744 (diff)
downloadlatinime-61ba174e16e89046dc30b02da29c7e89f9b23b7d.tar.gz
latinime-61ba174e16e89046dc30b02da29c7e89f9b23b7d.tar.xz
latinime-61ba174e16e89046dc30b02da29c7e89f9b23b7d.zip
am 02b08709: Merge "Fix test fails caused by I8bede13c87"
* commit '02b087090e9a4fe1a388bd18939711f988931744': Fix test fails caused by I8bede13c87
-rw-r--r--java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java12
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) {