Jez*_*her 4 android android-softkeyboard
我的目标是在加载应用程序后立即打开键盘.使用此代码,
InputMethodManager inputMgr = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
inputMgr.toggleSoftInput(0, 0);`
Run Code Online (Sandbox Code Playgroud)
在按钮上,我可以在按下按钮时加载键盘.但是,当置于覆盖onCreate()部分时,没有任何反应.
将以下行添加到AndroidManifest.xml中的活动
android:windowSoftInputMode="stateVisible|adjustPan"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1294 次 |
| 最近记录: |