コード例 #1
0
 public void onClick(final View v) {
   if (v == mClearBtn) {
     onClearClicked();
   } else if (v == mEditorTextView) {
     forceSuggestionQuery();
   } else if (v == mCancelTextView) {
     onCancelClicked();
   }
 }
コード例 #2
0
 void onTextFocusChanged() {
   updateButtonState();
   // Delayed update to make sure that the focus has settled down and
   // window focus changes
   // don't affect it. A synchronous update was not working.
   postUpdateFocusedState();
   if (mEditorTextView.hasFocus()) {
     forceSuggestionQuery();
   }
 }