Android FlowLayout as RecyclerView LayoutManager

I want to implement a tag cloud with Android chips.

enter image description here

But I think the best way to do this is with RecycleView and a custom LayoutManager. I am looking for a LayoutManager that composes its children as a FlowLayout, but found nothing.

Has anyone found this behavior or a good and simple tutorial about layout managers? I did not find simple or simple but incomplete articles.

enter image description here .

+5
source share
2 answers

I found a library that does this.

You have added this line to your Gradle dependencies:

compile 'com.xiaofeng.android:flowlayoutmanager:1.2.3.2' 

and set the recycler layout manager for it:

 recyclerView.setLayoutManager(new FlowLayoutManager()); 

You have more information on how to configure it on Github: https://github.com/xiaofeng-han/AndroidLibs/tree/master/flowlayoutmanager

+8
source

You can try my library . See the github description page for detailed functions / usage.

It provides the behavior you want. Its min sdk is 15, which covers almost all currently used devices.

It is also still supported, so you can get additional support from me.

+2
source

All Articles