Denis
11/21/2020, 1:32 AMnavigation-compose
?
I want to make a list with multiple selection like in the GMail app. On back button press navigation-compose goes to the previous destination, but I want it to unselect all selected items. I did it with a boolean optional argument "items?selected={selected}"
, but I think it really smells. I suppose it's better to override the default behavior of back button, but I just can't find a solution. Or is there a better approach to the problem?Ian Lake
11/21/2020, 1:43 AMOnBackPressedCallback
ala https://kotlinlang.slack.com/archives/CJLTWPH7S/p1604158427082300Ian Lake
11/21/2020, 1:44 AMDenis
11/21/2020, 2:24 AMBackButtonHandler
that works perfectly for me. Vinay, thank you for it!Denis
11/21/2020, 2:29 AMVinay Gaba
11/21/2020, 2:33 AM