how to set contents of setSingleChoiceItems in onPrepareDialog?

前端 未结 2 829
囚心锁ツ
囚心锁ツ 2021-02-09 09:53

Guys, in onCreateDialog i have this:

case DIALOG_REVIEW: {
    if (bundle.containsKey(\"POSITION\")) {
    final int position = bundle.getInt(\"POSITION\");
            


        
2条回答
  •  囚心锁ツ
    2021-02-09 10:20

    You need to use getListView method from AlertDialog class. Then use setItemChecked method on returned object. Example:

    alertDialog.getListView().setItemChecked(1, true);

提交回复
热议问题