I’m having an issue with beta02 and AndroidView an...
# compose
b
I’m having an issue with beta02 and AndroidView and scrolling (see video below). When I scroll the view scrolls faster than everything else
3
Copy code
@Composable
fun LoadingScreen(
    modifier: Modifier = Modifier,
    navCtrl: NavController,
    wavePrefs: WavePreferences
) {
    LazyColumn(modifier = Modifier.padding(10.dp)) {
        repeat((0..10).count()) {
            item {
                Video()
            }
        }
    }
}

@Composable
fun Video() {
    Card(modifier = Modifier.padding(10.dp)) {
        Box(modifier = Modifier.padding(10.dp)) {
            ExoPlayerDashCompose(
                dashUrl = "<https://v.redd.it/opthnx0e6am61/DASHPlaylist.mpd?a=1618022051%2CNDIyYjg5ZTFhOTM2N2MxZDFmMGQ3NGE4ZjM4M2Q4ODdmNzVkZDVlYWQzNDdkYzkwOWIyNTkyNTI0Yjc5ZGQ1Mw%3D%3D&v=1&f=sd>,",
                ratio = 1080 / 574f,
                clickable = { }
            )
        }
    }
}
Where ExoPlayerDashCompose looks like:
Copy code
AndroidView(
            factory = ::StyledPlayerView,
            modifier = Modifier
                .clickable {
                    clickable(player)
                }
                .fillMaxHeight()
                .fillMaxWidth()
                .aspectRatio(ratio)
        ) {
            it.player = player
            it.hideController()
            it.setShowBuffering(StyledPlayerView.SHOW_BUFFERING_WHEN_PLAYING)
            player.repeatMode = REPEAT_MODE_ALL
            player.addListener(object : Player.EventListener {
                override fun onPlayerError(error: ExoPlaybackException) {
                    super.onPlayerError(error)
                    error.printStackTrace()
                    isError = true
                }
            })

            player.volume = 0f
            player.playWhenReady = false
        }
I can remove the StyledPlayerView and replace it with a TextView and I have the same issue where it just runs up the screen
h
I'm glad it wasn't only me who experienced this.
3
I've recently shared the same demo working fine with beta01. This is the result after upgrading to beta02 with no other change
😞 1
a
@Mihai Popa
m
Looking into it. If anyone is able could also file a bug, it would be great!
🎉 2
b
If there is not a bug created by the time I get home tonight, I will take care of it
m
❤️ 5
b
Yeah this is pretty similar to my issue. I’ll add my notes from my project onto your bug, it can always be split out if it’s not the same issue
d
Phew! Glad to see this... we're using wrapped AndroidSVG to render all our graphical elements and when we started scrolling they all flew off the screen 🙃
h
I don't know how I did it or I missed something but I managed to replicate this issue on beta01 as well. I need to be sure before sharing my code because basically the same code was working one minute and the next it started glitching
I've checked multiple times that I was using beta01. I took clean builds as well.
d
At least for me, reverting to beta01 did resolve it.
h
It did for me too. I have no idea how it started happening again. Can I ask you to check one thing? Would you enable "Don't keep activities" in developer options? It's an odd request but it was the only thing that I did differently before bug started reoccurring.
d
Sorry it's 3.44am here, I am about to fall over 🙃
h
lol whenever you have time ofc.
ok no worries, it was because of accompanist-coil. It somehow included beta02 in the build
c
Aha. @Halil Ozercan I was also seeing some weird issue where reverting to beta01 didn't fix it, BUT I WAS on latest accompanist.