开发者

How to show a soft-keyboard when EditText is selected?

开发者 https://www.devze.com 2023-03-29 22:27 出处:网络
I tried using the accepted answer here but this does not work for me! 开发者_高级运维android - show soft keyboard on demand

I tried using the accepted answer here but this does not work for me!

开发者_高级运维android - show soft keyboard on demand

Any advice is appreciated :)


how about this:

 activity.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);


This line of code (which seems so obvious now) did the trick:

editText.clearFocus();
0

精彩评论

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

关注公众号