本文介绍了如何在android中的recyclerview autofit中创建列数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨朋友们,
我正在使用recyclerview,但目前我正在动态定义一行中的项目数量,但我想让它自动填写不同大小的屏幕。那么,任何人都可以告诉我该怎么做吗?
我尝试过的事情:
NewArrivalsRecycler adapter = new NewArrivalsRecycler(getActivity(),newarrivalsData.subList(0,2));
recyclerView1.setAdapter(adapter);
Hi friends,
I am using recyclerview, but currently i am defining number of items on a single row dynamically, but i want to make it auto fill in different size screen. So, can any one tell me how to do this?
What I have tried:
NewArrivalsRecycler adapter = new NewArrivalsRecycler(getActivity(), newarrivalsData.subList(0, 2));
recyclerView1.setAdapter(adapter);
推荐答案
这篇关于如何在android中的recyclerview autofit中创建列数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!