我ExpandableListActivity
在Text
每个项目中都有。如何获取点击列表项的文本?
这是我的做法:
groupData = application.getFirstLayer();
String groupFrom[] = new String[] {"groupName"};
int groupTo[] = new int[] {android.R.id.text1};
childData = application.getSecondLayer();
String childFrom[] = new String[] {"levelTwoCat"};
int childTo[] = new int[] {android.R.id.text1};
adapter = new SimpleExpandableListAdapter(
this,
groupData,
android.R.layout.simple_expandable_list_item_1,
groupFrom,
groupTo,
childData,
android.R.layout.simple_list_item_1,
childFrom,
childTo);
public boolean onChildClick(android.widget.ExpandableListView parent,
View v, int groupPosition, int childPosition, long id) {}
我必须写什么onChildClick
才能看到当前项目的文本?