展会信息港展会大全

Android开发中隐藏输入法
来源:互联网   发布日期:2016-01-14 12:36:06   浏览:2611次  

导读:1//隐藏输入法2publicvoidhideInput(){3if(MiniBrowser.this.getCurrentFocus()!=null){ 是否存在焦点4InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(Context.INPUT_MET......

1

//隐藏输入法

2

public void hideInput(){

3

if(MiniBrowser.this.getCurrentFocus()!=null){ 是否存在焦点

4

InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);

5

inputMethodManager.hideSoftInputFromWindow(MiniBrowser.this.getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);

6

}

7

}

赞助本站

人工智能实验室

相关热词: Android开发 隐藏输入法

AiLab云推荐
展开

热门栏目HotCates

Copyright © 2010-2024 AiLab Team. 人工智能实验室 版权所有    关于我们 | 联系我们 | 广告服务 | 公司动态 | 免责声明 | 隐私条款 | 工作机会 | 展会港