我使用上AlertDialog自定义布局。自定义布局已提起一个EditText里面我是用得到一个电话。当我显示AlertDialog,为了让键盘键入你必须点击提交的EditText的电话号码。有没有办法让键盘自动弹出,当我调出AlertDialog,使用户不必点击提交的EditText拿到键盘。
I am using a custom layout on an AlertDialog. The custom layout has an EditText filed which I am using to get a phone. When I display the AlertDialog, in order to get the keyboard to type in the phone number you have to click on the EditText filed. Is there a way to get the keyboard to automatically pop up when I bring up the AlertDialog so that the user does not have to click on the EditText filed to get the Keyboard.
谢谢,人员Prasanna
Thanks, Prasanna
刚加入这一行,当你显示您的对话框:
Just add this line when you are showing your dialog:
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
上一篇:举个例子来使用哈希code检测一个名单,其中的一个元素;字符串>改变了C#字符串、举个例子、元素、名单
下一篇:如何使用互动:对DatePicker的Interaction.Triggers互动、如何使用、DatePicker、Interaction