aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2013-12-16 18:02:58 +0900
committerTadashi G. Takaoka <takaoka@google.com>2013-12-17 12:59:37 +0900
commit19dd753c0ccaea8dee71eeae7edc724c58c6f024 (patch)
tree3b53bea2589a0dec6eb0bfe65c08285b5325a816 /java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java
parentdd4937848a314ab18f665299cf32084bcc55d166 (diff)
downloadlatinime-19dd753c0ccaea8dee71eeae7edc724c58c6f024.tar.gz
latinime-19dd753c0ccaea8dee71eeae7edc724c58c6f024.tar.xz
latinime-19dd753c0ccaea8dee71eeae7edc724c58c6f024.zip
Cancel more suggestions panel when touching keyboard
Bug: 10010128 Change-Id: I2ff0870c69f407d943caf8b9cec90b7ed89de5f1
Diffstat (limited to 'java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java')
-rw-r--r--java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java18
1 files changed, 13 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java
index aa87affa2..073148a50 100644
--- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java
+++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java
@@ -162,19 +162,19 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
mSuggestionsStrip.removeAllViews();
removeAllViews();
addView(mSuggestionsStrip);
- mMoreSuggestionsView.dismissMoreKeysPanel();
+ dismissMoreSuggestionsPanel();
}
private final MoreSuggestionsListener mMoreSuggestionsListener = new MoreSuggestionsListener() {
@Override
public void onSuggestionSelected(final int index, final SuggestedWordInfo wordInfo) {
mListener.pickSuggestionManually(index, wordInfo);
- mMoreSuggestionsView.dismissMoreKeysPanel();
+ dismissMoreSuggestionsPanel();
}
@Override
public void onCancelInput() {
- mMoreSuggestionsView.dismissMoreKeysPanel();
+ dismissMoreSuggestionsPanel();
}
};
@@ -192,10 +192,18 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
@Override
public void onCancelMoreKeysPanel(final MoreKeysPanel panel) {
- mMoreSuggestionsView.dismissMoreKeysPanel();
+ dismissMoreSuggestionsPanel();
}
};
+ public boolean isShowingMoreSuggestionPanel() {
+ return mMoreSuggestionsView.isShowingInParent();
+ }
+
+ public void dismissMoreSuggestionsPanel() {
+ mMoreSuggestionsView.dismissMoreKeysPanel();
+ }
+
@Override
public boolean onLongClick(final View view) {
AudioAndHapticFeedbackManager.getInstance().performHapticAndAudioFeedback(
@@ -322,6 +330,6 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
@Override
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
- mMoreSuggestionsView.dismissMoreKeysPanel();
+ dismissMoreSuggestionsPanel();
}
}