如何实现点击子项以显示布局?
我基于example:
应该是这样的:
@Override
public void onClick(View view) {
if(View.equals.("Core")
{
//code
}
}
});
答案 0 :(得分:0)
将OnChildClickListener添加到ExpandableListView。
@Override
public boolean onChildClick (ExpandableListView parent, View v, int groupPosition, int childPosition, long id){
// your code here
}
文档:http://developer.android.com/reference/android/widget/ExpandableListView.OnChildClickListener.html
答案 1 :(得分:0)
试试这个
expListView.setOnChildClickListener(new OnChildClickListener() {
@Override
public boolean onChildClick(ExpandableListView parent, View v,
int groupPosition, int childPosition, long id) {
// TODO Auto-generated method stub
}
});