Skip to content

Instantly share code, notes, and snippets.

@siifii
Last active February 23, 2020 13:16
Show Gist options
  • Save siifii/3edd8cd2d4f5a9b4672b9976c0c55ff4 to your computer and use it in GitHub Desktop.
Save siifii/3edd8cd2d4f5a9b4672b9976c0c55ff4 to your computer and use it in GitHub Desktop.
Recyclerview's gridlayout/straggedgridlayout with flexible and dynamic width and height
implementation 'com.google.android:flexbox:2.0.1'
val layoutManager = FlexboxLayoutManager(this)
layoutManager.flexDirection = FlexDirection.ROW
layoutManager.justifyContent = JustifyContent.FLEX_START
recyclerview.layoutManager = layoutManager
//TODO TO KNOW MORE ABOUT FLEXBOX CHECK https://github.com/google/flexbox-layout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment