Hello guys, what do you think is the best way to a...
# compose
a
Hello guys, what do you think is the best way to achieve this in compose. PS: number of items unknown
m
Looks like a Column with Rows to me.
t
@ayodele do you want to be able to drag the items?
a
@Marcin Wisniowski I thought about that but what the three dots?
@Tiago Fernandes yes
m
Shouldn’t be a problem with the dots, each row renders the one-and-a-half dot above and below the letter circle.
And probably want to hide the dots on a dragged row.
t
@Marcin Wisniowski wouldn't be better to make two columns where only the full location item is draggable and the dots are always visible, like it does on the Google Maps website?
m
That depends on the design you want to achieve, if you want the circles to stay if dragged or not.
Multiple Columns are fine too, but then you have to manually make sure the rows line up between the different columns.
If the user changes the font size, etc.
r
Im a noob but you prbably want searchbar right?
j
In a row you could have 2 columns one for dots and another for Textfield and track the drag behavior with each other
c
You could look into "Timeline view" libraries for Compose. That's what seems to be closest to your requirement. Dragging probably will not be present though.
a
I’d build a custom layout to place them where you want the content to go. There was a dev summit talk about custom layouts which was great
a
I actually made an expanding/collapsing version of this that is similar
Stepper.kt
There is probably going to be some broken imports, but it should be enough to get you started
It can probably be optimized too
It’s meant for onboarding, and the progress + expand/collapse code can be stripped out