• a

    alorma

    1 year ago
    Hello! Test problem here! test methods cannot be annotated wit
    @Composable
    but they need some composable code... code in 🧵
    a
    Albert Chang
    6 replies
    Copy to Clipboard
  • p

    PHondogo

    1 year ago
    When composable decompose and there was focused input with keyboard opened, then keyboard stayed opened. How to force close keyboard on such case?
    p
    Rob Meeuwisse
    2 replies
    Copy to Clipboard
  • b

    bitkiller

    1 year ago
    Column
      TextField
      DropdownMenu (height set)
    (X is 183 in my tests, haven't tested on other devices to see if that changes) If height <= X, ok, DropdownMenu shows up below the textfield. But if height >= X + 1, then it moves up covering the TextField.
    b
    Colton Idle
    2 replies
    Copy to Clipboard
  • Stefan Oltmann

    Stefan Oltmann

    1 year ago
    I use the "fill everything up" spacer a lot and want to define this for a util, but the "weight" method is not found. I guess because it depends on the scope. How must I modify this code so I can use
    FillSpacer()
    everywhere I would write the long form instead?
    @Composable
    fun FillSpacer() =
        Spacer(modifier = Modifier.weight(1.0f))
    Stefan Oltmann
    Filip Wiesner
    2 replies
    Copy to Clipboard
  • estevanfick

    estevanfick

    1 year ago
    I’m facing some issues trying to do this kind of flip animation. I’m using
    graphicsLayer
    to flip the card component and it’s working. But the problem is with the content, I dont know how to sync the both sides with the flip. Any tips?
    estevanfick
    Zach Klippenstein (he/him) [MOD]
    +2
    16 replies
    Copy to Clipboard
  • b

    Bradleycorn

    1 year ago
    I have an app that uses a Material theme in light and dark variants … pretty standard stuff. The light theme uses a white surface color and a pretty dark (navy blue) primary color. So far so good… However, we have a few screens (formerly fragments) where the design calls for the color scheme to be inverted. That is, the dark (navy blue) color is used for the background (surface) and the content (text, textfields, etc) is white. I’m wondering what is the best way to deal with this? At first, I created a
    DarkSurface
    composable that wraps a surface and sets up some CompositionLocals to handle the color inversions. But the more I go down that path, the more cumbersome and wrong it seems. Now I’m wondering if I should create a new theme for these screens to use. Anyone else ran into something like this before and have any ideas on how to handle it?
    b
    Colton Idle
    +1
    4 replies
    Copy to Clipboard
  • Colton Idle

    Colton Idle

    1 year ago
    What's the quickest way to create a "theme overlay" in Compose? Like if I want my MaterialTheme, but I just want to swap color primary with Color.Red for example?
    Colton Idle
    Javier
    2 replies
    Copy to Clipboard
  • v

    Vinay Gaba

    1 year ago
    Just added a section for long form content on JetpackCompose.app. Kicking things off with an article about "donut-hole" skipping in Compose. Give it a read here - https://jetpackcompose.app/articles/donut-hole-skipping-in-jetpack-compose
    v
    1 replies
    Copy to Clipboard
  • j

    Jan Skrasek

    1 year ago
    What is an alternative for back handling in UI tests? Previously I used:
    Espresso.onView(ViewMatchers.isRoot()).perform(ViewActions.pressBack())
    With Compose I'm trying this:
    val keyEvent = NativeKeyEvent(NativeKeyEvent.ACTION_DOWN, NativeKeyEvent.KEYCODE_BACK)
    composeTestRule.onRoot().performKeyPress(KeyEvent(keyEvent))
    but getting:
    KeyEvent can't be processed because this key input node is not active.
    j
    i
    10 replies
    Copy to Clipboard
  • Sergey Y.

    Sergey Y.

    1 year ago