https://kotlinlang.org logo
#compose
Title
# compose
n

Nat Strangerweather

12/22/2021, 10:01 PM
Hi guys, I was trying to use the ScrollToTopButton composable but for some reason it is not showing in my dropdown menu on AS. Any ideas what I might be doing wrong?
c

Chris Sinco [G]

12/22/2021, 10:02 PM
Do you mean you deployed that Preview composable to device, and it’s not showing up in the Run Configuration dropdown on the main toolbar?
n

Nat Strangerweather

12/22/2021, 10:03 PM
No, I was trying to follow this video:

https://www.youtube.com/watch?v=BhqPpUYJYeQ&t=159s

I tried adding it to my LazyColumn
But the option is not available
c

Chris Sinco [G]

12/22/2021, 10:05 PM
I believe that is a custom Composable he made for the demo in the video
n

Nat Strangerweather

12/22/2021, 10:05 PM
Oh
lol, I see, I thought it was a ready-made one
Thanks!
c

Chris Sinco [G]

12/22/2021, 10:05 PM
Ha no worries - I can see why that’d be confusing 😉
😊 1
The important piece there is that you can call the
listState.scrollToItem(x)
with whatever clickable/actionable thing you want
3 Views