答案 0 :(得分:0)
如果您的适配器是extends BaseExpandableListAdapter
,请尝试:
@Override
public View getGroupView(int groupPosition, boolean isExpanded, View view, ViewGroup viewGroup) {
LayoutInflater inflater = LayoutInflater.from(context);
if(isExpanded){
view = inflater.inflate(R.layout.two_up_round_corners_group, null);
}else{
view = inflater.inflate(R.layout.four_round_corners_group, null);
}
// Populate your view here.
return view;
}
@Override
public View getChildView(int groupPosition, int childPosition, boolean isLast, View view, ViewGroup viewGroup) {
LayoutInflater inflater = LayoutInflater.from(context);
if(isLast){
view = inflater.inflate(R.layout.two_bottom_round_corners_child, null);
}else{
view = inflater.inflate(R.layout.normal_child, null);
}
// Populate your view here.
return view;
}
请相应地进行布局。希望有帮助!