When I map a request being in flight to button being enabled, and on success move to next screen, what I notice is that given the screen transitions are animated, I can see the button being enabled during the transition for a split second.
Has anyone idea as how to workaround this, given the next screen is backable, I cant just map success to button.enabled = false
(somehow reset the state after transition)
d
Doris Liu
02/10/2021, 6:21 AM
Can you show a code snippet? How are you transitioning the screens?
u
ursus
02/10/2021, 12:38 PM
Unfortunately my screens are still fragments so the transition is fragment transition. ComposeView only lives isolated within each fragment. Could moving to compose "everything" and removing help this somehow?
d
Doris Liu
02/10/2021, 5:57 PM
@Ian Lake may be able to comment on the fragment transition behavior you've observed here.
i
Ian Lake
02/10/2021, 6:15 PM
Sounds working as intended - if you set something to enabled, it shows as enabled. Running a transition (either in Compose or in the view system) doesn't stop your state updates from actually applying
u
ursus
02/10/2021, 9:46 PM
Yes, I'm not saying something is not working, but UX wise its not desired, and not sure if the "update views after transitioned next to screen" is a good idea; so asking how do people best handle this