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()方法的代碼 –