我想处理我的expandableListView子元素,点击我的片段,我有ExpandableListView。
现在,我在getChildView适配器方法中处理它。如何在Fragment中处理它?</ p>
我试过这个:
implements ExpandableListView.OnChildClickListener{
expandableListView.setOnChildClickListener(this);
....}
@Override
public boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id) {
Log.d("enter","enter");
return false;
}
但永远不要进入它..
答案 0 :(得分:0)
在您的片段中,您可以获得对ExpandableListView的引用,然后将OnChildClickListener设置为片段本身。
mExpandableListView.setOnChildClickListener(this);
该片段必须实现ExpandableListView.OnChildClickListener。