• Android如何让软键盘出现和消失


    在程序中加入以下代码时,软键盘会出现:

    InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);     
    imm.toggleSoftInput(0, InputMethodManager.RESULT_SHOWN);  
    如果要让软键盘消失,则为以下代码:
     

    InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);

    imm.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS);  
  • 相关阅读:
    hdu 1599 find the mincost route (最小环与floyd算法)
    hdu 3371(prim算法)
    hdu 1598 find the most comfortable road (并查集+枚举)
    hdu 1879 继续畅通工程 (并查集+最小生成树)
    hdu 1272 小希的迷宫(并查集+最小生成树+队列)
    UVA 156 Ananagrams ---map
    POJ 3597 Polygon Division (DP)
    poj 3735 Training little cats 矩阵快速幂+稀疏矩阵乘法优化
    poj 3734 Blocks 快速幂+费马小定理+组合数学
    CodeForces 407B Long Path (DP)
  • 原文地址:https://www.cnblogs.com/yangzhenyu/p/2192737.html
Copyright © 2020-2023  润新知