Diego Rodriguez
09/23/2021, 3:00 PMAndroidView
to compose it. Now I need to access that view when the user presses a button to get its state. To simplify, I have an EditText and I need its content when the user presses 'Next'.
How Can I access the state of that view? I know I could build it from scratch using compose, but I have a lot of custom views and plan to migrate them progressively.Tash
09/23/2021, 9:17 PMval enteredText = remember { mutableStateOf("") }
or something at the Compose level, and then using the `EditText`’s listener to keep that value up to date?
essentially, you’d be pseudo hoisting the state from within the android view, up to the Compose level. this is probably the best approach for most such cases because you’re not leaning into the imperative-ness of the android viewDiego Rodriguez
09/24/2021, 1:32 PM