Displaying soft keyboard whenever AlertDialog.Builder object is opened

后端 未结 14 1810
半阙折子戏
半阙折子戏 2020-12-08 19:11

My code for opening an input dialog reads as follows:

final AlertDialog.Builder alert = new AlertDialog.Builder(this);  
alert.setTitle(\"Dialog Title\");  
         


        
14条回答
  •  长情又很酷
    2020-12-08 19:53

    try using inputBox

    inputBox.getWindow().setSoftInputMode( 
                   WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
    

提交回复
热议问题