I have a `LazyColumn` with an `AndroidView` which ...
# compose
z
I have a
LazyColumn
with an
AndroidView
which wraps a
WebView
Copy code
LazyColumn {
    AndroidView(
      factory = {
           WebView()
      }
    )

   //other stuff
}
The WebView has horizontal scrolling but while scrolling it, the lazy column & android view “fight” over the scroll input. If your horizontal scroll has any kind of vertical component to it, the lazy column will start scrolling. Other native views in the same lazy column that scroll horizontally work correctly (as in if your scroll is partially vertical, the lazy column won’t scroll errantly) Has anyone run into this before?
c
What’s your use case? Webviews in a LazyColumn sounds like a bad idea. What do you want to accomplish?
z
Embedding 3rd party content in a shopping feed
c
Ok I see what you mean. That make sense. You could disable vertical scrolling in the webview by injecting css with
overflow: hidden
If that works for your use case
z
the web view doesn’t have a vertical scroll as its allowed to take up its full height (roughly a 3rd of the screen). however its a carousel like setup and so it scrolls horiztonally. it seems that both the vertical scroll of the lazy column and the horizontal scroll of the web view fight each other, so you get a really jerky scrolling motion where sometimes the web view is scrolling horizontally and sometimes the column is scrolling vertically
761 Views