0
public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) {
final String value=(String)(getChild(groupPosition,childPosition));
View view = convertView;
if (view == null) {
LayoutInflater inflater = (LayoutInflater) this.context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = inflater.inflate(R.layout.exp_child_layout, parent, false);
}
TextView txt_group_category = (TextView) view.findViewById(R.id.txt_child_category);
txt_group_category.setText("test");
return view;
}
但它给了我ClassCastException
。我的hashmap是字符串类型的字符串和列表,那么我如何获取列表的值?
请张贴您在logcat中获得的错误代码。 –
发布getChild()方法的代码 –