SimpleExpandableListAdapter 问题

小哥、 2013-09-27 01:22:52
为什么SimpleExpandableListAdapter 报错 参数好像应该是这样的啊
SimpleExpandableListAdapter expand = new SimpleExpandableListAdapter(
this, group, R.layout.images,new String[] { "images", "names" }, new int[] { R.id.image1,R.id.txt1 },child,R.layout.txtitem,new String[] { "tengxun", "baidu", "alibaba" }, new int[] {R.id.txt1, R.id.txt1, R.id.txt1 });

下面就不报错 但是运行起来程序就挂了
SimpleExpandableListAdapter expand = new SimpleExpandableListAdapter(
this, group, R.layout.images,new String[] { "images", "names" }, new int[] { R.id.image1,R.id.txt1 },(List<? extends List<? extends Map<String, ?>>>) child,
R.layout.txtitem,new String[] { "tengxun", "baidu", "alibaba" }, new int[] {R.id.txt1, R.id.txt1, R.id.txt1 });
官方文档 child 的参数是List<? extends Map<String, ?>> 是这个啊
...全文
79 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
小哥、 2013-09-27
  • 打赏
  • 举报
回复
SimpleExpandableListAdapter(Context context, List<? extends Map<String, ?>> groupData, int groupLayout, String[] groupFrom, int[] groupTo, List<? extends List<? extends Map<String, ?>>> childData, int childLayout, String[] childFrom, int[] childTo) Constructor SimpleExpandableListAdapter(Context context, List<? extends Map<String, ?>> groupData, int expandedGroupLayout, int collapsedGroupLayout, String[] groupFrom, int[] groupTo, List<? extends List<? extends Map<String, ?>>> childData, int childLayout, String[] childFrom, int[] childTo) Constructor SimpleExpandableListAdapter(Context context, List<? extends Map<String, ?>> groupData, int expandedGroupLayout, int collapsedGroupLayout, String[] groupFrom, int[] groupTo, List<? extends List<? extends Map<String, ?>>> childData, int childLayout, int lastChildLayout, String[] childFrom, int[] childTo) Constructor

80,351

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧