ChipsLayoutManager
ChipsLayoutManager copied to clipboard
Margin between items
Hello How can I add margin between items? Currently I add margins for every item in my adapter onCreateView() method but it is not work when I use ChipsLayoutManger.
Thanks
Hi, I had the same problem but fortunately this issue is indirectly mentioned in Readme:
You may need an RecyclerView.ItemDecoration to work with ChipsLayoutManager for fast setup as showed in sample. It contained in same package and named SpacingItemDecoration.
So you need to apply SpacingItemDecoration
to your RecyclerView
.
It could be written more clearly (why and how to use it), but at least it's there.
Its usage is quite straighforward, you can see a sample here: https://github.com/BelooS/ChipsLayoutManager/blob/9b271a816fcef538de3e13307bd8b8a7130295be/sample/src/main/java/com/beloo/chipslayoutmanager/sample/ui/BottomSheetDialogFragment.java#L61
Thanks a a lot!this helps me
Thanks...this code help for me.
@michalbrz thank you so much