为了账号安全,请及时绑定邮箱和手机立即绑定

大神们帮忙看看我这个list.remove怎么才能调用

大神们帮忙看看我这个list.remove怎么才能调用

慕前端6305810 2016-12-11 18:27:05
         //长按事件        list.setOnItemLongClickListener(new OnItemLongClickListener() {                   @Override                   public boolean onItemLongClick(AdapterView<?> parent, View view,                   final int position, long id) {                   //listerner方法                  android.content.DialogInterface.OnClickListener listener=new                  android.content.DialogInterface.OnClickListener() {                               @Override                               public void onClick(DialogInterface dialog, int which) {                               // TODO Auto-generated method stub                               list.remove(position);                              notifyAll();                              }                    };                   //长按item时弹出对话框    Builder builder=new Builder(MusicList.this);    builder.setTitle("确定要删除吗?");    builder.setPositiveButton("确定",listener);    builder.setNegativeButton("取消",null);    builder.show();    return false;   }           });        }
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 1294 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信