Ejemplo n.º 1
0
  public void hideInputManager() {
    if (mSearchView != null) {
      if (mImm != null) {
        mImm.hideSoftInputFromWindow(mSearchView.getWindowToken(), 0);
      }
      mSearchView.clearFocus();

      SearchHistory.getInstance(this).addSearchString(queryString);
    }
  }
Ejemplo n.º 2
0
 @TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
 @Override
 public boolean onQueryTextSubmit(String query) {
   InputMethodManager imm =
       (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
   imm.hideSoftInputFromWindow(searchView.getWindowToken(), 0);
   searchView.setQuery("", false);
   searchView.setIconified(false);
   Toast.makeText(getApplicationContext(), "search 결과", Toast.LENGTH_LONG).show();
   return false;
 }
Ejemplo n.º 3
0
  @Override
  public boolean onQueryTextSubmit(String query) {
    Log.d("Sevibus search", "Query submit: " + query);
    InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
    imm.hideSoftInputFromWindow(mSearchView.getWindowToken(), 0);

    if (query.equalsIgnoreCase("virgi")) {
      ImageView img = new ImageView(this);
      img.setImageResource(R.drawable.secret);
      Toast toast = new Toast(this);
      toast.setView(img);
      toast.setDuration(Toast.LENGTH_LONG);
      toast.show();
      ThemeSelector.setV();
    }
    return true;
  }