zoukankan      html  css  js  c++  java
  • Android隐藏输入法

    输入法隐藏两种方式:

    /**
    * 隐藏输入法
    *
    * @param myActivity
    */
    public static void hideInput(Activity myActivity,EditText et)
    {
      if(et==null)
      {
        ((InputMethodManager) myActivity.getSystemService(Activity.INPUT_METHOD_SERVICE)).hideSoftInputFromWindow(myActivity.getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
      }
      else
      {
        InputMethodManager inputMethodManager = (InputMethodManager) myActivity.getApplicationContext().getSystemService(Context.INPUT_METHOD_SERVICE);
        inputMethodManager.hideSoftInputFromWindow(et.getWindowToken(), 0); 
      }
    }

  • 相关阅读:
    20191117-STD::讲解及求平均数例题
    计算机网络-ip分类
    游标cursor
    ajax
    django ORM
    urls
    templates
    views
    models
    setting
  • 原文地址:https://www.cnblogs.com/chensuqian/p/3811315.html
Copyright © 2011-2022 走看看