question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support horizontal scrolling with FlexDirection.ROW

See original GitHub issue

Hello, thanks for this fantastic library. I’m trying to create a horizontally scrollable list, but FlexboxLayoutManager doesn’t seem to be wrapping the list items. In each column, all items have the same width, which doesn’t look correct. Is there something I’m missing? I’m using this code:

FlexboxLayoutManager flexboxLayoutManager = new FlexboxLayoutManager();
flexboxLayoutManager.setFlexWrap(FlexWrap.WRAP);
flexboxLayoutManager.setFlexDirection(FlexDirection.COLUMN);

Update: Oh wait, supplying setAlignItems() with something other than STRETCH fixes the width of the items. As in, they’re no longer equi sized. So I’ve realized that I want the items to be laid out in row fashion, but the list should be horizontally scrollable. Is this possible?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
thagikuracommented, Jun 26, 2017

Fixed by #315

0reactions
bharat1320commented, Dec 18, 2021

Guys I have found a solution, simply use ChipGroup instead of FlexBox , literally everything works fine as expected

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enabling horizontal scroll in flexbox - css - Stack Overflow
The idea is to show the first item as 100% height and width, like covering the screen with the remaining items to the...
Read more >
How to implement horizontal scrolling using Flexbox
Add white space between the images; Get rid of the horizontal scrollbar; Place the scroller in the middle of the screen. The images...
Read more >
Using flexbox for horizontal scrolling navigation - Iamsteve
This post is a follow up to a different method for horizontal scrolling navigation which used inline-block. In this post, I want to...
Read more >
flex-direction - CSS: Cascading Style Sheets - MDN Web Docs
The flex-direction CSS property sets how flex items are placed in the flex container defining the main axis and the direction (normal or ......
Read more >
Creating horizontal scrolling containers the right way [CSS Grid]
In this article, I want to explore how the flexibility of CSS Grid can help implement a horizontal scrolling component while dealing with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found