Merge "Fix test fails caused by I8bede13c87"
This commit is contained in:
commit
02b087090e
1 changed files with 12 additions and 0 deletions
|
@ -26,6 +26,7 @@ import android.view.View;
|
||||||
import android.view.View.OnClickListener;
|
import android.view.View.OnClickListener;
|
||||||
import android.view.View.OnLongClickListener;
|
import android.view.View.OnLongClickListener;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.view.ViewParent;
|
||||||
import android.widget.RelativeLayout;
|
import android.widget.RelativeLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
@ -189,10 +190,21 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
|
||||||
|
|
||||||
public void clear() {
|
public void clear() {
|
||||||
mSuggestionsStrip.removeAllViews();
|
mSuggestionsStrip.removeAllViews();
|
||||||
|
removeAllDebugInfoViews();
|
||||||
mStripVisibilityGroup.showSuggestionsStrip();
|
mStripVisibilityGroup.showSuggestionsStrip();
|
||||||
dismissMoreSuggestionsPanel();
|
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() {
|
private final MoreSuggestionsListener mMoreSuggestionsListener = new MoreSuggestionsListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuggestionSelected(final int index, final SuggestedWordInfo wordInfo) {
|
public void onSuggestionSelected(final int index, final SuggestedWordInfo wordInfo) {
|
||||||
|
|
Loading…
Reference in a new issue