Android 如何在启动活动后在片段中以文本形式显示软键盘?
我在Android 如何在启动活动后在片段中以文本形式显示软键盘?,android,android-fragments,android-edittext,android-softkeyboard,Android,Android Fragments,Android Edittext,Android Softkeyboard,我在活动启动时显示的片段中有EditText 我想在发布后展示一下软键盘 我在片段的onStart方法中使用了这个问题中的代码,但它不起作用 我应该将代码放在哪个片段方法中?事实上,最好的解决方案是将android:windowSoftInputMode=stateVisible放在Activity部分的AndroidManifest.xml 它工作得非常好。事实上,最好的解决方案是将android:windowSoftInputMode=stateVisible放在AndroidManifes
活动启动时显示的片段中有EditText
我想在发布后展示一下软键盘
我在片段的onStart
方法中使用了这个问题中的代码,但它不起作用
我应该将代码放在哪个片段方法中?事实上,最好的解决方案是将android:windowSoftInputMode=stateVisible
放在Activity
部分的AndroidManifest.xml
它工作得非常好。事实上,最好的解决方案是将android:windowSoftInputMode=stateVisible
放在AndroidManifest.xml的活动
部分
它工作得很好