如何在可扩展列表视图中使用imageheader?
public View getGroupView(int groupPosition, boolean isExpanded,
View convertView, ViewGroup parent) {
return convertView;
}
答案 0 :(得分:0)
仍然不确定什么是imagehader,但要在expandablelistview标头中设置图像,你应该这样做:
@Override
public View getGroupView(int listPosition, boolean isExpanded,
View convertView, ViewGroup parent) {
if (convertView == null) {
LayoutInflater layoutInflater = (LayoutInflater) this.context.
getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = layoutInflater.inflate(R.layout.your_layout, null);
}
ImageView imageheader = (ImageView) convertView.findViewById(R.id.imageheader);
return convertView;
}