• Luca Nicoletti

    Luca Nicoletti

    2 years ago
    Any idea why the
    FlexColumn
    compose the 2
    Text
    in a row instead of a column?
    Luca Nicoletti
    l
    +1
    9 replies
    Copy to Clipboard
  • l

    Leland Richardson [G]

    2 years ago
    this is broken for us to atm. someone working to fix it now
    l
    wasyl
    +1
    3 replies
    Copy to Clipboard
  • Luca Nicoletti

    Luca Nicoletti

    2 years ago
    Ok, I got another weird scenario with Ripples, but it’s someway complex to explain - and I don’t want to copy-paste that much code, who can I get in touch with?
    Luca Nicoletti
    1 replies
    Copy to Clipboard
  • Luca Nicoletti

    Luca Nicoletti

    2 years ago
    Will this be
    suppressed
    by default for
    @Composable
    functions?
    Luca Nicoletti
    spierce7
    2 replies
    Copy to Clipboard
  • wasyl

    wasyl

    2 years ago
    I tried searching but didn’t find anything that helps and I’m confused. Should I expect the views to change/recompose when passing
    @Model
    into another
    @Composable
    function? Something like:
    @Composable
    fun App() {
        val appState = +memo {
            ParentModel(
                listOf(
                    ChildModel("Item 1", false),
                    ChildModel("Item 2", true)
                )
            )
        }
        Column {
            appState.childModels.forEach { item ->
                Item(item)
            }
        }
    }
    
    @Composable
    fun Item(item: ChildModel) {
        ListItem(
            text = { Text(item.description) },
            trailing = {
                Checkbox(
                    checked = item.checked,
                    onCheckedChange = { item.checked = it })
            }
        )
    }
    
    @Model
    data class ParentModel(
        var childModels: List<ChildModel>
    )
    
    @Model
    data class ChildModel(
        var description: String,
        var checked: Boolean
    )
    ?
    wasyl
    George Mount
    +4
    26 replies
    Copy to Clipboard
  • wasyl

    wasyl

    2 years ago
    Another question: when I’m quickly adding items to a
    ModelList
    , they are being added out of order, that is when I add items slowly I have e.g.
    1, 2, 3, 4, 5
    . But when I click button to add them fast, I end up with
    0, 4, 3, 2, 1
    . Even when I try explicitly adding the item at position
    list.size
    . The same happens for an immutable list. Is this because mutating the state doesn’t guarantee order of the mutation? Is there any way actually have the changes applied in order?
    wasyl
    Andrey Kulikov
    4 replies
    Copy to Clipboard
  • Icaro Temponi

    Icaro Temponi

    2 years ago
    Icaro Temponi
    wasyl
    3 replies
    Copy to Clipboard
  • Adam Bennett

    Adam Bennett

    2 years ago
    0.1.0-dev02 seems to break my Compose demo app, so there's definitely been some significant change somewhere
    No direct method <init>(Ljava/lang/String;Lkotlin/jvm/functions/Function0;)V in class Landroidx/compose/Ambient; or its super classes
    Adam Bennett
    Fudge
    2 replies
    Copy to Clipboard
  • wasyl

    wasyl

    2 years ago
    I have a question about modifiers: right now I see the only handled
    Modifier
    type is a
    LayoutModifier
    , which, if I understand correctly, is read and applied in the
    LayoutNode
    in appropriate place. I know there’s been a discussion about the scope of modifiers, but in the end there’ll be just some number of modifier types handled by the core library in appropriate places, right? Could you share what other possible types of modifiers were you thinking about in general, not necessarily ones that are likely to be part of Compose?
    wasyl
    Adam Powell
    +3
    22 replies
    Copy to Clipboard
  • dector

    dector

    2 years ago
    There are no such items in AS 4.0 Canary 1. 🙂
    dector
    jim
    +1
    13 replies
    Copy to Clipboard