class ListListener implements android.widget.AdapterView.OnItemClickListener{
@Override
public void onItemClick(AdapterView<?> parent, View view, int position,
long id) {
// TODO Auto-generated method stub
ListView listView = (ListView) parent;
Cursor cursor = (Cursor) listView.getItemAtPosition(position);
String personid=cursor.getString(cursor.getColumnIndex("name"));
Toast.makeText(getApplicationContext(), personid, 1).show();
}
}
simpleCursorAdapter中的listview获取内容
最新推荐文章于 2021-05-25 16:42:52 发布