开发者

Android - Get soft keyboard to automatically pop up when a dialog is displayed?

开发者 https://www.devze.com 2023-01-21 03:54 出处:网络
I currently pop up a custom dialog with an EditText in it. Currently the keyboard will only pop up开发者_运维技巧 when the user clicks \"into\" the EditText.

I currently pop up a custom dialog with an EditText in it. Currently the keyboard will only pop up开发者_运维技巧 when the user clicks "into" the EditText.

Is it possible to get the keyboard to pop up for the EditText as soon as the Dialog loads?

I have tried:

editText = (EditText) findViewById(R.id.EditTextd);
editText.setFocusable(true);
editText.requestFocus();

But it hasn't worked.

Has anyone any ideas?

0

精彩评论

暂无评论...
验证码 换一张
取 消