How to separate elements of a RecyclerView?

0

I have implemented a RecyclerView correctly but the elements are completely together, I would like to know how I can separate them as if they were a MarginBotton or something like that, thanks.

    
asked by Parzival 20.11.2017 в 03:55
source

1 answer

1

There are many ways to do it, starting with the modification of item.xml, you could also use CardView to give it a touch of stronger visual separation. link

Finally if you do not want to complicate yourself a lot and you're using the support 25 library up, then you can use the dividerItemDecorator:

 DividerItemDecoration mDividerItemDecoration = new DividerItemDecoration(recyclerView.getContext(),
             mLayoutManager.getOrientation());
     recyclerView.addItemDecoration(mDividerItemDecoration);
    
answered by 20.11.2017 / 03:59
source