• Jorge Domínguez

    Jorge Domínguez

    10 months ago
    hi all!, does anybody know how can I restart a Transition?
    val currentState = remember {
        MutableTransitionState(TransitionState.START)
            .apply { targetState = TransitionState.END }
    }
    val transition = updateTransition(currentState, label = "")
    the initial composition triggers the transition but I need to restart it whenever a Canvas draws something, which happens some time after the initial Transition is triggered. I've tried doing
    currentState.targetState = TransitionState.END
    right before drawing inside the Canvas but it doesn't work.
    Jorge Domínguez
    Doris Liu
    2 replies
    Copy to Clipboard
  • Rick Regan

    Rick Regan

    10 months ago
    I'm trying to (properly) implement Material Theming in my app so that it can support light and dark themes. One screen of my app requires additional colors beyond the Material primary, secondary, etc. I was looking at the Rally sample app as a model because it uses extra colors to color code the account types. However, it uses Colors, which appears to go against the advice to use
    MaterialTheme.colors
    instead. What is the recommended way to declare additional colors that are sensitive to theme changes? (References in 🧵.)
    Rick Regan
    a
    +1
    6 replies
    Copy to Clipboard
  • Colton Idle

    Colton Idle

    10 months ago
    I know the general rule of thumb is to not overuse composition locals. Would analytics be an "okay" reason to use them or should I just properly keep passing them down into all of my composables?
    Colton Idle
    Jason Ankers
    +1
    4 replies
    Copy to Clipboard
  • a

    Arpit Shukla

    10 months ago
    Why were flow layouts removed from jetpack compose and added to accompanist?
    a
    1 replies
    Copy to Clipboard
  • Mohamed Ahmed ALi

    Mohamed Ahmed ALi

    10 months ago
    Hello, In which container I can arrange tags element to fill the row first then start new row and not showing in a column or a row as the IMG shows
    Mohamed Ahmed ALi
    c
    2 replies
    Copy to Clipboard
  • bohregard

    bohregard

    10 months ago
    I have a data class that contains a mutableState property but when I create the object (through retrofit with a gson serializer) the mutableState property always ends with a the error
    "Attempt to invoke interface method 'java.lang.Object androidx.compose.runtime.State.getValue()' on a null object reference
    .
    data class ActivationResponder(
        val id: Long,
        val firstName: String,
        val lastName: String,
        @SerializedName("callSign")
        val callsign: String,
        val phoneNumber: String,
    ) {
    
        var isChecked: Boolean by mutableStateOf(false)
        val name: String
        get() = "$firstName $lastName"
    
    }
    Any insight on to why that would be the case?
    bohregard
    Zach Klippenstein (he/him) [MOD]
    4 replies
    Copy to Clipboard
  • Colton Idle

    Colton Idle

    10 months ago
    Trying to create a pinpad like this in compose and strugling more than I thought. Left is my "desired" look and the right is my implementation. My two main issues:1. The text doesn't seem centered in my button? 2. I don't know how to make "DEL" show instead of just the D that's showing now. code in 🧵
    Colton Idle
    Rick Regan
    +3
    9 replies
    Copy to Clipboard
  • Luis Daivid

    Luis Daivid

    10 months ago
    Is it possible to move cursor to end position in TextField with initial value? I set it to the end of the text using TextFieldValue’s selection, and the cursor stays fixed at the last position even if the user clicks in the middle of the text. What I want is for the cursor to be positioned at the last position only when it is first focused, and the user should be able to move the cursor.
    Luis Daivid
    Zoltan Demant
    9 replies
    Copy to Clipboard
  • Stylianos Gakis

    Stylianos Gakis

    10 months ago
    Trying to work on a custom
    Layout()
    . Have some problems with constraints, more in thread 🧵
    Stylianos Gakis
    2 replies
    Copy to Clipboard
  • Stefan Oltmann

    Stefan Oltmann

    10 months ago
    Is there a equivalent to SwiftUI
    .dynamicTypeSize(.large ... .xxxLarge)
    to limit the automatic scaling of the font size for regions where there largest font size may be too big?
    Stefan Oltmann
    1 replies
    Copy to Clipboard