• amar_1995

    amar_1995

    2 years ago
    I want to show data in screen after
    onCommit
    completes. What is the suggested ways to do this ?
    amar_1995
    Adam Powell
    9 replies
    Copy to Clipboard
  • Zhelyazko Atanasov

    Zhelyazko Atanasov

    2 years ago
    Any idea why Compose Preview is not working anymore in Android Studio? Is this a known issue? I'm using AS:
    Android Studio 4.2 Canary 7
    Build #AI-201.7846.76.42.6720134, built on July 30, 2020
    Runtime version: 1.8.0_242-release-1644-b3-6222593 x86_64
    with Gradle
    6.6
    , Android build tools
    4.2.0-alpha07
    , Kotlin
    1.4.0
    and Compose
    0.1.0-dev17
    . When I rebuild the project, the Preview doesn't show anything. It's a brand new project created using the "Compose Activity" template in AS and the Preview was working before updating to the latest dependencies (the template in AS was using Compose
    0.1.0-dev13
    ).
    Zhelyazko Atanasov
    gildor
    +4
    12 replies
    Copy to Clipboard
  • Archie

    Archie

    2 years ago
    Guys, is there a way to animate size set to
    .fillMaxSize()
    to
    setPrefferedSize(someValue, someValue)
    ?
    Archie
    Doris Liu
    9 replies
    Copy to Clipboard
  • v

    Vinay Gaba

    2 years ago
    Just played with
    AnimatedVisibility
    . Really like how simple the API is and fits really well to a host of different use cases. Here is what I implemented to demonstrate list deletion with animation. Thanks for your work on this @Doris Liu 👏🏼 Here is the code with comments if anyone is interested - https://github.com/vinaygaba/Learn-Jetpack-Compose-By-Example/blob/master/app/src/main/java/com/example/jetpackcompose/animation/ListAnimationActivity.kt#L53
    v
    Halil Ozercan
    +3
    8 replies
    Copy to Clipboard
  • d

    dimsuz

    2 years ago
    Hi! Do I miss some easier way to convert
    dp
    to pixels for Offsets? It's OK but I get a feeling that's a bit verbose.
    drawLine(
          color,
          size.bottomLeft(Offset(1.dp.toPx().value, -1.dp.toPx().value)),
          size.topLeft(Offset(0f, 1.dp.toPx().value)),
          Stroke(width = 2.dp.toPx().value)
        )
    d
    Zach Klippenstein (he/him) [MOD]
    +1
    4 replies
    Copy to Clipboard
  • d

    dimsuz

    2 years ago
    I have found a bug while using
    dev13
    , does anyone by chance know if its fixed, or should I report it? Asking because upgrading to later versions could require some effort.
    Button(
      modifier = if (enabled || MaterialTheme.colors.isLight) borderModifier else Modifier
    )
    Reversing the order of condition operands fixes compilation. This compiles OK:
    Button(
      modifier = if (MaterialTheme.colors.isLight || enabled) borderModifier else Modifier
    )
    I will post a reported exception in the thread >>
    d
    Adam Powell
    4 replies
    Copy to Clipboard
  • d

    dimsuz

    2 years ago
    I have upgraded to
    dev17
    and
    4.2 Canary 7
    and preview doesn't render anything. Running on emulator renders just fine. Is this a known issue? (Invalidate caches didn't help either)
    d
    Foso
    2 replies
    Copy to Clipboard
  • amar_1995

    amar_1995

    2 years ago
    I am trying to use
    ProvidableAmbient
    to pass data from screen1 to screen2. How to update data in screen2 and return back to screen1 ?
    amar_1995
    Adam Powell
    +1
    12 replies
    Copy to Clipboard
  • tjohnn

    tjohnn

    2 years ago
    In what scenario should I use
    remember { state }
    rather than just
    state
    ? I have tried and my app works thesame way.
    tjohnn
    Adam Powell
    10 replies
    Copy to Clipboard
  • caelum19

    caelum19

    2 years ago
    Is it usually a bad smell if a @Composable fun doesn't have a modifier parameter?
    caelum19
    1 replies
    Copy to Clipboard