?
试下这个
设置 ?ListaUtentiStringa?ArrayList、?profilesAdapter?adapter?为全局变量
|
1
2
3
4
5
6
7
8
|
builder.setPositiveButton("Si", new DialogInterface.OnClickListener() {
????????????????????????public void onClick(DialogInterface dialog, int which) {
???????????????????????????????????????// How to remove the selected item?
??????????????????????????????ListaUtentiStringa.remove(arg2);
?????????????????????????????????profilesAdapter.notifyDataSetChanged();
?????????????????????????????????dialog.dismiss();
?????????????????????????}
????????????????????});
|
?
原文地址:http://www.itmmd.com/201411/125.html?
该文章由?萌萌的IT人?整理发布,转载须标明出处。
android开发中如何使用 alertDialog从listView中删除数据?
原文:http://aijuans.iteye.com/blog/2169174