/**
     * We override this method to be sure and show the soft keyboard if appropriate when the
     * TextView has focus.
     */
    @Override
    public void onWindowFocusChanged(boolean hasWindowFocus) {
      super.onWindowFocusChanged(hasWindowFocus);

      if (hasWindowFocus && mSearchView.hasFocus() && getVisibility() == VISIBLE) {
        InputMethodManager inputManager =
            (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
        inputManager.showSoftInput(this, 0);
        // If in landscape mode, then make sure that
        // the ime is in front of the dropdown.
        if (isLandscapeMode(getContext())) {
          ensureImeVisible(true);
        }
      }
    }
 @Override
 protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) {
   super.onFocusChanged(focused, direction, previouslyFocusedRect);
   mSearchView.onTextFocusChanged();
 }
 @Override
 public void setThreshold(int threshold) {
   super.setThreshold(threshold);
   mThreshold = threshold;
 }