Last active
February 23, 2020 13:16
-
-
Save siifii/3edd8cd2d4f5a9b4672b9976c0c55ff4 to your computer and use it in GitHub Desktop.
Recyclerview's gridlayout/straggedgridlayout with flexible and dynamic width and height
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
implementation 'com.google.android:flexbox:2.0.1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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