Thread
#compose
    Vlad Gorbunov

    Vlad Gorbunov

    2 years ago
    Hello, i am experiencing wierd behaviour when using
    Card
    inside
    AdapterList
    For example this code:
    @Composable
    fun ArticleAdapterList(data: List<Article>) {
        AdapterList(data = data) { item ->
            Column {
                Column {
                    Text(text = item.title)
                    Text(text = item.content.take(200))
                }
            }
        }
    }
    works just fine, but once i change it to:
    @Composable
    fun ArticleAdapterList(data: List<Article>) {
        AdapterList(data = data) { item ->
            Card(shape = RoundedCornerShape(8.dp), elevation = 4.dp, modifier = Modifier.fillMaxWidth() + Modifier.padding(8.dp)) {
                Column {
                    Text(text = item.title)
                    Text(text = item.content.take(200))
                }
            }
        }
    }
    i am getting
    java.lang.IllegalStateException: Node should be attached to an owner
    once i start scrolling anyone with similar issue? Thanx
    v

    Val Salamakha

    2 years ago
    I got the same error, but not from start. It happened after playing some time with scrolling on AS-4.1-alpha04 compose 0.1.0-dev08. I
    Timo Drick

    Timo Drick

    2 years ago
    For me it is finaly more or less working in dev-08. But onDispose is not called for the composables. Maybe this is also the reason why it will show wired behavior after some time. So still not able to use AdapterList espacially for showing lists of images.
    Vlad Gorbunov

    Vlad Gorbunov

    2 years ago
    Yeah, i am leaking things too, but i am also presenting quite a lot of stuff from database on first start and it takes a while until VerticalScroller gets drawn… 🤯
    k

    Kismet

    2 years ago
    Hi Vlad, how are you able to run with
    0.1.0-dev08
    ?
    I have static function error, i thought 0.1.0-dev08 was broken?
    Vlad Gorbunov

    Vlad Gorbunov

    2 years ago
    it would be nice to see your error, but generally, i had to split app into modules so that kapt + experimental suicide squad (room, flow, compose) does not reside in single module so: • separate module for database (room only) • aggregator data module which already provides ready to consume data (flow only) • feature modules with ui + viewModels (compose only)
    k

    Kismet

    2 years ago
    Thanks!
    v

    Val Salamakha

    2 years ago
    The error has nothing with any data as text, because it arises without them.
    r

    Ryan Mentley

    2 years ago
    But onDispose is not called for the composables.
    https://issuetracker.google.com/issues/150174792