Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android FlowLayout as RecyclerView LayoutManager [closed]

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 a RecycleView and a custom LayoutManager. I search for a LayoutManager which layout its children like a FlowLayout but found nothing.

Has someone found this kind of behavior or a good and simple tutorial about custom layout managers? I found no simple or simple but incomplete articles.

enter image description here.

like image 978
Happo Avatar asked Jul 01 '16 08:07

Happo


1 Answers

I found a library that does this.

You have add this line to your Gradle depencencies:

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

and set your recycler view layout manager with it:

recyclerView.setLayoutManager(new FlowLayoutManager());

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

like image 69
Glacoon Avatar answered Sep 28 '22 05:09

Glacoon