Refresh or change the AlertDialog Message

后端 未结 4 471
攒了一身酷
攒了一身酷 2021-01-11 09:32

I create an AlertDialog

AlertDialog.Builder builder = new AlertDialog.Builder(this);
...
AlertDialog alert = builder.create();
alert.show();
<
4条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-11 09:52

    Agreed with android developer. You can also use

    TextView messageView = (TextView) alert.findViewById(android.R.id.message);
    

    To get the control over the messageTextView of AlertDialog. Then you can set the new text there.

提交回复
热议问题