expListView.setOnChildClickListener(new ExpandableListView.OnChildClickListener() {
@Override
public boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id) {
String headername = (String) parent.getExpandableListAdapter().getGroup(groupPosition);
String childname = (String) parent.getExpandableListAdapter().getChild(groupPosition,childPosition);
Log.d("Parent name",headername);
Log.d("Child name", childname);
Intent intent = new Intent(ViewActivity.this,ShowActivity.class);
intent.putExtra("Parent",headername);
intent.putExtra("Child",childname);
intent.putExtra("Path",myPath);
startActivity(intent);
return true;
}
});
答案 0 :(得分:0)
只需使用ActivityName.this.startActivity(),即可调用所需的意图。