我得到了这个带有适配器的 ListView:
date_status_pending_listview.setAdapter(arrayAdapter_pending);
其中适配器定义如下:
arrayAdapter_pending = new SimpleAdapter(context, dates_pending, R.layout.date_status_list_item, columns, to){
public View getView(int position, View convertView, ViewGroup parent) {
if (convertView == null) {
LayoutInflater vi = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = vi.inflate(R.layout.date_status_list_item, null);
}
TextView tt = (TextView) convertView.findViewById(R.id.text_uid);
tt.setText(dates_pending.get(position).get("id_request"));
....
return convertView;
}
};
我想要的是在单击一个项目时获取 uid_request 的值,然后转到另一个活动。
// A C T I O N B U T T O N S (I T E M S E L E C T E D - P E N D I N G)
date_status_pending_listview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
public void onItemClick(AdapterView<?> parent,android.view.View v, int position, long id) {
}
});
我应该怎么点?