workflow-kotlin
workflow-kotlin copied to clipboard
Provide a mechanism for LayoutRunners to track changes to particular rendering values between update passes
Expensive view configuration often only needs to be performed when a value coming in from the rendering or the view environment changes. Sometimes these values need to be remembered across config changes or process death. Custom Views and Compose both have mechanisms for doing this, but LayoutRunner does not. Until we can deprecate LayoutRunner, we should provide some way to do this.
One particular use case for this is tracking events that are send from the workflow to the view by changing IDs, e.g. for showing toasts. The event ID needs to be tracked across config changes so the toast isn't re-shown on every rotation.
Not a ui-1.0 blocker, if we ever bother. It's not hard to hack this by adding an invisible TextView with an id -- shockingly robust, actually.