• j

    julioromano

    1 year ago
    In
    @Composable
    APIs, is it preferable to have a default
    onClick
    param as an empty lambda (
    onClick: () -> Unit = {}
    ) or as a nullable function (
    onclick: (() -> Unit)? = null
    )? Are there any pros and cons?
    j
    a
    +3
    12 replies
    Copy to Clipboard
  • nacholopez

    nacholopez

    1 year ago
    Hello folks! I was wondering if there is any way of forcing the Robolectric idling strategy to work on tests? RobolectricDetector in the Compose codebase checks specifically for Robolectric runners by looking for specific traits in your runner, however at my current company we use a custom runner with a bunch of extra configuration that we can't remove and it doesn't fall into the categories checked: this runner we use doesn't extend AndroidJUnit4 nor the robolectric ones, but it is indeed a Robolectric runner. Would it be possible to add some way of configuring the runner to let the composeTestRule know we are using Robolectric even if it doesn't seem so?
    nacholopez
    j
    9 replies
    Copy to Clipboard
  • Christopher Elías

    Christopher Elías

    1 year ago
    Can I build for wearables with Compose UI?
    Christopher Elías
    Albert Chang
    2 replies
    Copy to Clipboard
  • tylerwilson

    tylerwilson

    1 year ago
    Will the current Compose beta09 work with Kotlin 1.5.20, or should we wait for Compose beta10 to upgrade?
    tylerwilson
    Adam Powell
    3 replies
    Copy to Clipboard
  • m

    Marko Novakovic

    1 year ago
    when for example I want to redirect from my app to SMS app with
    Intent
    , how do I do it in Compose?
    m
    Zach Klippenstein (he/him) [MOD]
    +3
    12 replies
    Copy to Clipboard
  • Sergey Y.

    Sergey Y.

    1 year ago
    Sergey Y.
    Akram Bensalem
    +3
    7 replies
    Copy to Clipboard
  • a

    aoriani

    1 year ago
    How to set the Text's width in the same way we use to do with
    android:ems
    ?
    a
    Dominaezzz
    3 replies
    Copy to Clipboard
  • YASAN

    YASAN

    1 year ago
    When I show a
    Dialog
    , the phone's navigation bar buttons are still usable even though they are dimmed & they do not cause the
    Dialog
    to be dismissed automatically even though
    dismissOnClickOutside
    is set to
    true
    . Is this a bug or I am supposed to enable a specific behavior for it myself?
    YASAN
    1 replies
    Copy to Clipboard
  • b

    Berkeli Alashov

    1 year ago
    I'm trying to understand why this code doesn't work as expected without
    .copy()
    in remember { colors.copy() }:
    @Composable
    fun ProvideAppColors(
        colors: AppColors,
        content: @Composable () -> Unit
    ) {
        val appColors = remember { colors.copy() }.apply { update(colors) }
    
        CompositionLocalProvider(
        LocalAppColors provides appColors,
        content = content)
    }
    Without
    .copy()
    , it only works for the first change in state. Full code: https://gist.github.com/alashow/e67a75d662a13ce5529317bde3e241c2
    b
    Sean McQuillan [G]
    +1
    16 replies
    Copy to Clipboard
  • eneim

    eneim

    1 year ago
    Kinda tiny bug report:
    unregisterComposition
    is called twice in this screenshot (hope it is clear enough where it can be found. This is 1.0.0-beta09 by the way).
    eneim
    Alexandre Elias [G]
    +1
    4 replies
    Copy to Clipboard