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

John O'Reilly

08/09/2020, 6:13 PM
In following I have
scaffold
with
bodyContent
containing a list (using
LazyColumnFor
) and a
BottomAppBar
....selecting different options in bottom bar causes some state to change and for UI to be recomposed (with content of list updated).....the only issue is that list position remains the same. Is there way I can/should reset that when I select different option? https://github.com/joreilly/BikeShare/blob/master/app/src/main/java/com/surrus/bikeshare/MainActivity.kt
This is what UI looks like right now.....so, in this case for example if I scroll down list, then select Oslo, the data for Oslo is shown in list but I'm at same position in list as I was when viewing Galway list.
One problem at least with that is if I scroll to bottom of longer list and then switch to other one....then nothing is shown.....but in any case I think expectation would be that you'd be at top of new list when you switch
b

brandonmcansh

08/10/2020, 3:50 AM
a

Adrian Blanco

08/10/2020, 5:10 AM
j

John O'Reilly

08/10/2020, 10:44 AM
Thanks @Adrian Blanco, will take a look at that
2 Views