事件event

	private class OnItemClickListenerImpl implements OnItemClickListener {

		@SuppressWarnings("unchecked")
		@Override
		public void onItemClick(AdapterView<?> parent, View view, int position,
				long id) {
 CheckBox checkBox= (CheckBox)view.findViewById(R.id.wifi_list_choose);
			 if(checkBox.isChecked()){
				 checkBox.setChecked(false);
			 }else{
				 checkBox.setChecked(true);
			 }

			Map<String, String> map = (Map<String, String>) MyListViewDemo.this.simpleAdapter
					.getItem(position);//根据这个position可以拿到此行对应的全部数值
			String _id = map.get("_id");
			String name = map.get("name");
			MyListViewDemo.this.info.setText("选中的数据项ID是:" + _id + ",名称是:"
					+ name);
		}
	}

你可能感兴趣的:(event)