How to build a Horizontal ListView with RecyclerView?

前端 未结 13 1040
小鲜肉
小鲜肉 2020-11-22 04:53

I need to implement a horizontal listview in my Android application. I did a bit of research and came across How can I make a horizontal ListView in Android? and Horizontal

相关标签:
13条回答
  • 2020-11-22 05:50

    Try this:

    myrecyclerview.setLayoutManager(
            new LinearLayoutManager(getActivity(),
                                    LinearLayoutManager.HORIZONTAL,false));
    myrecyclerview.setAdapter(recyclerAdapter);
    

    only in case you got a recycler view with some fragments on it.

    0 讨论(0)
提交回复
热议问题