0
此刻我运行了这段代码。我在日食工作,目前正在此错误Android Extendable ListView Child Click
方法的getItem(INT)是未定义Expandable.MySimpleCursorTreeAdapter
public boolean onChildClick(ExpandableListView parent, View v, int groupPosition,
int childPosition, long id) {
// use groupPosition and childPosition to locate the current item in the adapter
Intent intent = new Intent(Categories.this, com.random.max.Random.class);
Cursor cursor = (Cursor) mscta.getItem(childPosition);
intent.putExtra("EMPLOYEE_ID", cursor.getInt(cursor.getColumnIndex("_id")));
//Cursor cursor = (Cursor) adapter.getItem(position);
//intent.putExtra("EMPLOYEE_ID", cursor.getInt(cursor.getColumnIndex("_id")));
startActivity(intent);
return true;
}
啊谢谢我不知道这一点。你能提供一个例子或样本吗?谢谢 – Somk