@Override
**protected void onListItemClick(ListView l, View v, int position, long id)
{
super.onListItemClick(l, v, position, id);
**String responceid = Activity2.getData();**
Object o = (String) (Notepadv3.this).getListAdapter().getItem(position);**
Toast.makeText(this, "this row responce id is= " + " " + , Toast.LENGTH_LONG).show();
}
答案 0 :(得分:0)
尝试Toast.makeText(this, "this row responce id is= " + responceid + , Toast.LENGTH_LONG).show();
答案 1 :(得分:0)
在String类型的ArrayList中进行响应。
ArrayList respCode<String> =new Arraylist<String>();
respCode.add("RESPONSE 1");
respCode.add("RESPONSE 2");
然后在listview itemClickListner
中@Override
public void onItemClick(AdapterView<?> a, View v, int position, long id) {
Toast.makeText(this,respCode.get(position), Toast.LENGTH_LONG).show();
}