recycler在绑定数据的时候,能够绑定一个ArrayList的列表数据的吗?
就如,在数据源中
List<> datalist = new ArrayList<>();
ArrayList> list = new ArrayList>();
Hashmap map = new HashMap<>();
map.put("key",datalist);
在adapter的onBindView中获取。
类似于这样。
可以这样传递list的吗?
调试过程中发现,在map.put()中传入数据,在onBindView中get取出来时报了nullpointexcepttion,而且传入其它的字符串数据也是不行,也会报错!!
关键是,之前绑定的数据还是可以获取,后来新增的就全都不行了!
到底是什么问题呢!!求问!!