Hello everyone. I need to integrate a third-party ...
# compose
m
Hello everyone. I need to integrate a third-party view, that actually is more than just a view, using
AndroidView
? As in, basically view-wise it’s a
WebView
, but it also has methods I can call to go to specific pages, for which I want to have
Button
for it. The pages aren’t static, and need to be fed data from a web API. How do I structure it so I can call the methods of this
AndroidView
from my compose
Button
?
c
You could pass a Flow down to this level of this custom View, and collect events from the Flow to trigger navigation and such
Or, pass the custom View to a higher level, and just call those methods directly. Careful to make sure you are not retaining references to old Views if they are disposed