• Oussama Haff.

    Oussama Haff.

    1 year ago
    Hello 👋 Is there a runtime layout inspector for Compose ? I’m using
    onRoot().printToLog()
    for tests, but I can’t find the equivalent for a running app.
    Oussama Haff.
    v
    2 replies
    Copy to Clipboard
  • Christian

    Christian

    1 year ago
    Hi everyone, does anybody knew how to set gravity or align text to
    end
    ? basically, cursor starts from the right using
    BaseTextField
    Christian
    jim
    +1
    10 replies
    Copy to Clipboard
  • d

    Denis Sakhapov

    1 year ago
    Has anyone used 9patch images with compose? Can’t wrap my head around how to make it work. How can I set a 9patch as a background of, say, a
    Box
    ?
    d
    Sergey Y.
    4 replies
    Copy to Clipboard
  • p

    Philip Blandford

    1 year ago
    What am I missing here? I want the red box to fill the space between the parent top and the top of the green box, but it ends up aligned to the centre of the green box.
    ConstraintLayout(Modifier.fillMaxSize()) {
      val (box1, box2) = createRefs()
      Box(Modifier.constrainAs(box1){
        top.linkTo(parent.top); bottom.linkTo(box2.top)
      }.background(Color.Red).fillMaxSize())
      Box(Modifier.constrainAs(box2){
       bottom.linkTo(parent.bottom); centerHorizontallyTo(parent)
      }.size(200.dp,50.dp).background(Color.Green))
    }
    p
    Zach Klippenstein (he/him) [MOD]
    4 replies
    Copy to Clipboard
  • Hitanshu Dhawan

    Hitanshu Dhawan

    1 year ago
    Hey everyone, what’s the best way to have sizes in our theme? So that I can access it like
    MaterialTheme.sizes.medium
    And we can specify sizes like small, medium, large (similar to shapes).
    Hitanshu Dhawan
    s
    3 replies
    Copy to Clipboard
  • Rodri Represa

    Rodri Represa

    1 year ago
    Can I change the constrains of a component inside a
    ConstraintLayout
    in base of a
    mutableStateOf<Boolean>
    ? If the mutable value change, my component will have others constrains..
    Rodri Represa
    Zach Klippenstein (he/him) [MOD]
    4 replies
    Copy to Clipboard
  • Adriano Celentano

    Adriano Celentano

    1 year ago
    Following the Codelab about state / Step 6 / TodoItemInputhttps://developer.android.com/codelabs/jetpack-compose-state#5 As soon as i paste this code from the lab
    @Composable
    fun TodoItemInput(onItemComplete: (TodoItem) -> Unit) {
       // onItemComplete is an event will fire when an item is completed by the user
       Column {
           Row(Modifier
               .padding(horizontal = 16.dp)
               .padding(top = 16.dp)
           ) {
               TodoInputTextField(Modifier
                   .weight(1f)
                   .padding(end = 8.dp)
               )
               TodoEditButton(
                   onClick = { /* todo */ },
                   text = "Add",
                   modifier = Modifier.align(Alignment.CenterVertically)
               )
           }
       }
    }
    my app does not compile anymore
    w: ATTENTION!
    This build uses unsafe internal compiler arguments:
    
    -XXLanguage:+NonParenthesizedAnnotationsOnFunctionalTypes
    
    This mode is not recommended for production use,
    as no stability/compatibility guarantees are given on
    compiler or generated code. Use it at your own risk!
    
    e: warnings found and -Werror specified
    w: /Users/adrian/Workspace/Android/android-compose-codelabs-main/StateCodelab/start/src/main/java/com/codelabs/state/todo/TodoScreen.kt: (84, 19): Parameter 'onItemComplete' is never used
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':start:compileDebugKotlin'.
    > Compilation error. See log for more details
    Adriano Celentano
    s
    +2
    8 replies
    Copy to Clipboard
  • tcracknell

    tcracknell

    1 year ago
    Hello! The latest Jetpack Compose minor release, alpha05, is here! You can get it now on Google’s Maven Repository. Release notes are available at https://developer.android.com/jetpack/androidx/versions/all-channel. As always, feedback is welcome; please log issues at https://issuetracker.google.com/issues/new?component=612128.
    tcracknell
    Ash
    +7
    11 replies
    Copy to Clipboard
  • Gavin

    Gavin

    1 year ago
    I have a question surrounding the
    TextField
    and related components. I couldn't find a way to filter between an onFocus/blur event vs actual typing/keyboard actions. The
    onValueChange
    handler is firing when I click in and out of the TextField and causes some un-wanted side effects. Am I missing something or is there currently a way (or a way around) to only account for keyboard actions and ignore focus/blur actions?
    Gavin
    r
    6 replies
    Copy to Clipboard
  • Chethan

    Chethan

    1 year ago
    How can I have getQuantityString for plurals in Compose ?
    Chethan
    nickbutcher
    2 replies
    Copy to Clipboard