How to get selected item of a singlechoice Alert Dialog?

后端 未结 7 1811
故里飘歌
故里飘歌 2020-12-23 13:42

I have this code to show a dialog with singlechoice(radio) options.

AlertDialog ad = new AlertDialog.Builder(this)
.setCancelable(false)
.setIcon(R.drawable.         


        
7条回答
  •  暖寄归人
    2020-12-23 14:32

    EditText et = (EditText)findViewById(R.id.editText9);
    
    int a = Integer.valueOf(item);
    
    et.setText(items[a]);
    

提交回复
热议问题