Displaying soft keyboard whenever AlertDialog.Builder object is opened

后端 未结 14 1774
半阙折子戏
半阙折子戏 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 20:03

    I found this worked in an Alert Dialog called from different places

            case R.id.birthyear:
            case R.id.ymax:
                input.setInputType(InputType.TYPE_CLASS_NUMBER);
                break;
    

    Mind you I tried lots of other things too. Seems delicate.

提交回复
热议问题