• m

    MBegemot

    2 years ago
    Hi, how can I add or remove components of my user interface at run time? tanks
    m
    Yann Badoual
    2 replies
    Copy to Clipboard
  • m

    MBegemot

    2 years ago
    Well, I mean as an example suppose you have a button and every time you press it you add a text or any other component to a certain container...
    m
    1 replies
    Copy to Clipboard
  • m

    MBegemot

    2 years ago
    So there is no generic addview like concept in compose, but I think I got the idea many thanks (A list of parameters in a model, and a component which draws that list)
    m
    Yann Badoual
    3 replies
    Copy to Clipboard
  • Luca Nicoletti

    Luca Nicoletti

    2 years ago
    What’s the corresponding of:
    setShadowLayer
    in
    androidx.ui.graphics.Paint
    ? Is there a way to draw shadow inside
    Draw {}
    composable?
    Luca Nicoletti
    Yann Badoual
    +1
    5 replies
    Copy to Clipboard
  • Luca Nicoletti

    Luca Nicoletti

    2 years ago
    I’m trying to draw a circle when the user tap on the screen. I have a
    var inputPosition: Offset? by +state { null as Offset? }
    I updated it inside the
    PressGestureDetector
    observer with:
    inputPosition = Offset(position.x.value, position.y.value)
    then I have a
    @Composable
    function that accept an
    Offset?
    as input and
    Draw { canvas, _ -> canvas.drawCircle(pos, size.value, paint = paint) }
    with that position. I’m getting the following error as soon as the user tap somewhere:
    Luca Nicoletti
    Yann Badoual
    +1
    9 replies
    Copy to Clipboard
  • Roar Gronmo

    Roar Gronmo

    2 years ago
    Have anyone a working example with compose and Room viewing a list in a VerticalScroller setting (or any other composable) which is imitating a recyclerview? Very interesting in how to detect where/when/how to add items the best way to the VerticalScroller when scrolling, and how to update data contents to the existing items in the list the best way ?
    Roar Gronmo
    Bruno_
    +2
    16 replies
    Copy to Clipboard
  • d

    deactivateduser

    2 years ago
    Hey, I see that Semantic public API documentation is still in the works (https://issuetracker.google.com/issues/138173117)? I am wondering how to set accessibility label onto a view (or if I got the terminology right - a node on the semantic tree?)
    d
    r
    6 replies
    Copy to Clipboard
  • camkadev

    camkadev

    2 years ago
    How do you folks draw Rectangle stroke border without fill? it looks like when i try to draw 3 rectangle borders one of them hide somehow
    camkadev
    Yann Badoual
    8 replies
    Copy to Clipboard
  • l

    len

    2 years ago
    Trying to build any of the compose demos in the repo fails with a compiler error:
    Caused by: java.lang.AssertionError: lastLineNumber shall be not negative, but is -1
    	at org.jetbrains.kotlin.backend.jvm.codegen.IrSourceCompilerForInline.doCreateMethodNodeFromSource(IrSourceCompilerForInline.kt:98)
    	at org.jetbrains.kotlin.codegen.inline.InlineCodegen$Companion.createInlineMethodNode$backend(InlineCodegen.kt:538)
    	at org.jetbrains.kotlin.codegen.inline.InlineCodegen.performInline(InlineCodegen.kt:139)
    	...
    Not sure they currently don't compile and you're aware of this or my setup is wrong (I only followed the steps to clone the repo and ran
    repo sync
    ). I also tried applying the kotlinc 1.3.61 patch but nothing changed. The command I ran was
    ./gradlew :ui:ui-material:integration-tests:ui-material-demos:installDebug
    l
    l
    7 replies
    Copy to Clipboard
  • d

    Daniel Sandström

    2 years ago
    Hello! Is it possible to draw border only to 3(top right left) sides of a square?
    d
    Zach Klippenstein (he/him) [MOD]
    2 replies
    Copy to Clipboard