listview长按时,获取相关条目信息
/** * 长按按钮弹出的菜单 里面选择 不同菜单 显示的不同的方法 * * 即 长按菜单的单击事件 */public boolean onContextItemSelected(MenuItem item) {//设置 长按 显示文本的 一个常量String Temp = "";AdapterView.AdapterContextMenuInfo menuInfo;menuInfo = (AdapterView.AdapterContextMenuInfo) item.getMenuInfo();int listId = (int) menuInfo.id;CheckBox ckBox = (CheckBox)menuInfo.targetView.findViewById(R.id.user_check);String userIdString= ckBox.getTag().toString(); switch (item.getItemId()) {case 0: break; default: break;}return super.onContextItemSelected(item);}