public void onClick(final View v) { if (v == mClearBtn) { onClearClicked(); } else if (v == mEditorTextView) { forceSuggestionQuery(); } else if (v == mCancelTextView) { onCancelClicked(); } }
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(); } }