Flexbox showing a lot of items on the last line of maxLine
See original GitHub issueIssues and steps to reproduce
I’ve been trying the new “maxLines” attribute, but its behavior is not like what I was expecting. Let’s think about a list with 50 items, 4 per line: if I set the maxLIne to 3, the first and second line will show 4 items per line, but the third line will show 42 items, instead of 4. Is there a way to show 4 items in all lines and ignore the others 42?
Expected behavior
Ignore items after third line.
Version of the flexbox library
1.0.0
Link to code
<com.google.android.flexbox.FlexboxLayout
android:id="@+id/items_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:maxLine="3"
android:paddingTop="20dp"
android:paddingLeft="20dp"
android:paddingRight="20dp"/>
Issue Analytics
- State:
- Created 5 years ago
- Reactions:18
- Comments:25
Top Results From Across the Web
Android FlexboxLayoutManager last row alignment
This will fit as many items in one line, leaving empty spaces of equal width between (thus centering items). The "stranglers" on the...
Read more >Some ways to align the last row in a flexbox grid - Travis Horn
One of my favorite approaches is to replace flexbox with grid. Delete the empty items so we're left with the original set. display:...
Read more >max-lines - CSS-Tricks
The max-lines property limits the content of a block to a maximum number of lines before being cut off and can create a...
Read more >Text Overflow - Tailwind CSS
Flexbox & Grid ... Grid Column Start / End · Grid Template Rows · Grid Row Start / End ... Justify Items ·...
Read more >-webkit-line-clamp - CSS: Cascading Style Sheets | MDN
In most cases you will also want to set overflow to hidden , otherwise the contents won't be clipped but an ellipsis will...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am facing the same problem right now
Please fix that, it’s very important feature for me and I think for many people too. For now I restrict height of FlexboxLayout but it’s dirty hack