listview點擊items的操作

public void onItemClick(AdapterView<?> arg0, View view, int arg2,
					long arg3) {// 傳遞view
				// 查詢號碼,供應商,付款賬戶,交易時間,應付金額,實付金額,交易類型,交易說明,交易狀態,變更時間
				// String id = (String) arg0.getItemAtPosition(arg2).get;

				@SuppressWarnings("unchecked")
				Map<String, Object> map = (Map<String, Object>) adapterBizHistory
						.getItem(arg2);
				String id = map.get("id").toString();

				String num = map.get("num").toString();
				String company = map.get("company").toString();
				String payaccount = map.get("payaccount").toString();
				String tradetime = map.get("tradetime").toString();
				String duefee = map.get("duefee").toString();
				String fee = map.get("fee").toString();
				String name = map.get("name").toString();
				String explain = map.get("explain").toString();
				String state = map.get("state").toString();
				String distime = map.get("distime").toString();
				Intent intent = new Intent(context,
						HistoryTodayBizQueryItemDetail.class);
				Bundle bundle = new Bundle();
				bundle.putString("id", id);
				bundle.putString("num", num);
				bundle.putString("company", company);
				bundle.putString("payaccount", payaccount);
				bundle.putString("tradetime", tradetime);
				bundle.putString("duefee", duefee);
				bundle.putString("fee", fee);
				bundle.putString("name", name);
				bundle.putString("explain", explain);
				bundle.putString("state", state);
				bundle.putString("distime", distime);
				intent.putExtra("bundle", bundle);
				startActivity(intent);
			}

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章