• d

    dewildte

    1 year ago
    I have 3 composables need to be laid out in a column. I need one aligned to the top. I need one aligned to the bottom. And I need one in between that takes up the rest of the available space. How would one achieve that? Perhaps the
    BoxWithConstraints()
    ?
    d
    Halil Ozercan
    2 replies
    Copy to Clipboard
  • m

    ms

    1 year ago
    Is there any way to get
    Application
    reference in a composable, just like
    LocalContext.current
    ??
    m
    2 replies
    Copy to Clipboard
  • o

    Olivier Patry

    1 year ago
    I try to animate a transition between current data state and previous one. I have difficulties to put everything in place in my mind to achieve the transition considering the previous state. I read https://developer.android.com/jetpack/compose/animation but it didn't help so far. I have a 4x4 grid compound of cells. I can move cells in all directions (imagine a 2048-like game). I'd like to do 3 transitions:1. animate "slide" of tiles 2. animate "transform" of tiles (2 identical tiles are merged together creating a new one with higher value) 3. new tile appearance (one new tile appears at each move) I struggle on how to achieve this…
    o
    Doris Liu
    23 replies
    Copy to Clipboard
  • Arsen

    Arsen

    1 year ago
    Seems like my slack thread gets broken with infinite "loading history". Does anyone experienced same stuff or it's problem on my side?
    Arsen
    orangy
    3 replies
    Copy to Clipboard
  • SrSouza

    SrSouza

    1 year ago
    Hi folks, I trying to embed Compose runtime in a project and I'm not getting it to recompose when a state change and updating my tree, what I'm missing? Source: https://github.com/DevSrSouza/compose-tree-test/blob/master/src/main/kotlin/Test.kt
    SrSouza
    Adam Powell
    4 replies
    Copy to Clipboard
  • Alejo

    Alejo

    1 year ago
    Hi everyone! I'm working in a composable that receives an hour in Unix, UTC ( a Long value like 1608124431 ). I want to check if the next hour the composable receives is before or after the current hour displayed. How could I achieve this? My first approach was trying to remember the last hour but I missed up on how to access the last hour displayed...
    Alejo
    Adam Powell
    3 replies
    Copy to Clipboard
  • YASAN

    YASAN

    1 year ago
    Is it possible to make the height of all items in one LazyVerticalGrid row match the largest ones?
    YASAN
    d
    +1
    8 replies
    Copy to Clipboard
  • j

    Jan Skrasek

    1 year ago
    Is there a way to add padding to composable content's (direct) children? for example by a modifier? Something like
    @Composable
    fun Content() {
       Column(Modifier.childPadding(inner = 4.dp)) {
           Text("...")
           Text("...")
           Text("...")
       }
    }
    j
    g
    +1
    4 replies
    Copy to Clipboard
  • Ravi

    Ravi

    1 year ago
    when clicking back after bottom sheet collapsed app is crashing. I've used Backhandler present in activity compose lib to collapse the sheet on back click.
    java.lang.IllegalArgumentException: The target value must have an associated anchor.
            at androidx.compose.material.SwipeableState$animateTo$$inlined$collect$1.emit(Collect.kt:135)
    Ravi
    1 replies
    Copy to Clipboard
  • d

    dimsuz

    1 year ago
    Hello! If I do
    Content(viewStates.collectAsState().value)
    
    @Composable fun Content(state: ViewState) {
      Text(text = state.title)
      Text(text = state.description)
    }
    Would both Texts be always recomposed even if (for example) there were 5 emissions and in all 5 only title was changing?
    d
    Adam Powell
    +1
    4 replies
    Copy to Clipboard