String[] data=new String[]{"中国","美国","俄罗斯"};
int default_index=0;//默认选中的位置
new AlertDialog.Builder(TestActivity.this).setTitle("").setSingleChoiceItems(R.array.country, default_index, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int item) {
dialog.dismiss();
tv_country.setText(data[item]);
}
}).show();
android系统自带单选Dialog
猜你喜欢
转载自blog.csdn.net/m0_37782318/article/details/105218208
今日推荐
周排行