Some Android functions

学向勤中得,萤窗万卷书。这篇文章主要讲述Some Android functions相关的知识,希望能为你提供帮助。
1. 隐藏软键盘

private void hideKeyboard() { final Activity activity = getActivity(); if (activity != null) { View view = activity.getCurrentFocus(); InputMethodManager imm = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(view.getWindowToken(), 0); } }

【Some Android functions】 

    推荐阅读