When I map a request being in flight to button bei...
# compose
u
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
Can you show a code snippet? How are you transitioning the screens?
u
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
@Ian Lake may be able to comment on the fragment transition behavior you've observed here.
i
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
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