有可能获得单行的值。在partycular 中,我不会在带有适配器的 mt 列表行中获取字符串中的 id 值。
在每一行中都有值 id 和 label
非常感谢,对不起我的英语
ListView list;
list = (ListView) findViewById(R.id.listView1);
mSchedule = new SimpleAdapter(getApplicationContext(), result ,R.layout.row_meteo,
new String[]{"id", "label"}, new int[] {R.id.textView1,R.id.textView2});
list.setAdapter(mSchedule);
list.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
String idPlace = mSchedule.getItem(position).toString();
Toast.makeText(getApplicationContext()," Cliccato sul luogo :"+idPlace,Toast.LENGTH_LONG).show();
}
}