Displaying soft keyboard whenever AlertDialog.Builder object is opened

后端 未结 14 1807
半阙折子戏
半阙折子戏 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:54

    try using view

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

提交回复
热议问题