ChipsLayoutManager icon indicating copy to clipboard operation
ChipsLayoutManager copied to clipboard

Margin between items

Open hosseinaminii opened this issue 7 years ago • 4 comments

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

hosseinaminii avatar May 15 '17 08:05 hosseinaminii

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

michalbrz avatar May 30 '17 23:05 michalbrz

Thanks a a lot!this helps me

asche910 avatar Dec 08 '18 14:12 asche910

Thanks...this code help for me.

ChandanBera avatar Feb 23 '19 12:02 ChandanBera

@michalbrz thank you so much

kisa002 avatar Mar 05 '21 04:03 kisa002