1
这是子元素的onclick监听器。默认Onclick在expandablelistview中的子元素?
getExpandableListView().setOnChildClickListener(new ExpandableListView.OnChildClickListener() {
@Override
public boolean onChildClick(ExpandableListView parent, View v,
int groupPosition, int childPosition, long id) {
// TODO Auto-generated method stub
onChild_Click(parent,v,
groupPosition,childPosition, id);
return true;
}
});
它点击子元素时正在工作。现在我需要选择第一个孩子作为默认(在onCreate()方法内)。 对于扩展组,我正在使用这个。
getExpandableListView().expandGroup(0);
我想这些事,子元素,但是当点击子,它正在它不发射的onclick event.But。
getExpandableListView().setItemChecked(1, true);
和
getExpandableListView().setSelectedChild(0, 0, true);