洞察如何利用FinClip的小程序容器技术实现信创适配并推动数字化转型
656
2022-12-01
android隐藏与现实键盘
1. Control by code:
show input method panel:
view plain copy to clipboard print ?
finalif (v != null && v.getWindowToken() != null) {InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);0, 0);}
final View v = getWindow().peekDecorView(); if (v != null && v.getWindowToken() != null) { InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE); imm.toggleSoftInputFromWindow(v.getWindowToken(), 0, 0); }
hide input method panel:
view plain copy to clipboard print ?
finalif (v != null && v.getWindowToken() != null) {InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);0);}
final View v = getWindow().peekDecorView(); if (v != null && v.getWindowToken() != null) { InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(v.getWindowToken(), 0); }
2. Control by manifest parament:
view plain copy to clipboard print ?
android:windowSoftInputMode=["stateUnspecified","stateUnchanged", "stateHidden","stateAlwaysHidden", "stateVisible","stateAlwaysVisible", "adjustUnspecified","adjustResize", "adjustPan"]
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~