• Marcin Środa

    Marcin Środa

    1 year ago
    How to test LazyColumn items? Looks like items are not wrapped. See thread …
    Marcin Środa
    r
    +1
    8 replies
    Copy to Clipboard
  • Albert Chang

    Albert Chang

    1 year ago
    I'm curious why compose keeps using the old
    inline class
    syntax and suppressing the deprecated warning as shown here instead of replacing it with
    value class
    after supporting Kotlin 1.5? I tried using value classes (with snapshot version of compose) in my app and there seems no problem.
    Albert Chang
    Adam Powell
    2 replies
    Copy to Clipboard
  • d

    Daniel

    1 year ago
    Is there any way to set the width of an EditText in characters?
    d
    Halil Ozercan
    8 replies
    Copy to Clipboard
  • s

    Saiedmomen

    1 year ago
    A lot of classes and functions that we could use to build our own components are
    internal
    or
    private
    . I know the reason for limiting the public API but an optIn annotation might be enough. Right now we have to copy huge amounts of code in order to have a working custom component. Code that won't get maintained or fixed easily. If we could opt in to them, our code would break on upgrades but we would still get the benefits and fixes after fixing them.
    s
    Halil Ozercan
    +2
    25 replies
    Copy to Clipboard
  • Daniele Segato

    Daniele Segato

    1 year ago
    Testing with compose: is there a way to match a node by tag only if it's a child of another node? Hypothetical situation:
    Column: tag A
      TextField: tag field
      Text: tag error
    Column: tag B
      TextField: tag field
      Text: tag error
    Column: tag C
      TextField: tag field
      Text: tag error
    If i want to match the TextField tagged "field" inside the column tagged "B", how do I write the SemanticMatcher?
    Daniele Segato
    Zach Klippenstein (he/him) [MOD]
    3 replies
    Copy to Clipboard
  • Paul Woitaschek

    Paul Woitaschek

    1 year ago
    What would be a good way to react to an mvi-style events flow within a composable? The IDE tells me I need to use a launched effect but I don't understand why and what I should use as a key.
    Paul Woitaschek
    n
    +3
    11 replies
    Copy to Clipboard
  • iamthevoid

    iamthevoid

    1 year ago
    Did anybody meet exception [thread] on recomposition? Let me explain
    Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkNotNullParameter
    This parameter declared as default argument in function body and not passed in calling place. If i passing exactly the same value into funtion call app works well and not crashes on recomposition. Looks like default argument of composable function stores somewhere and GC (or somethig else) remove it when composable is recomposing, but ref stay the same and i get this error.
    iamthevoid
    l
    6 replies
    Copy to Clipboard
  • Zach Klippenstein (he/him) [MOD]

    Zach Klippenstein (he/him) [MOD]

    1 year ago
    I recently tried to explain some of the APIs that compose uses to make its state management work. It’s all based on something called “snapshots”. You probably won’t ever need to actually use these they’re a bit lower level, but knowing how this works might help you reason about how your code is running. Read more here.
    Zach Klippenstein (he/him) [MOD]
    Colton Idle
    +1
    8 replies
    Copy to Clipboard
  • Erlan Amanatov

    Erlan Amanatov

    1 year ago
    Can someone explain to me how this works? First of all, everything works fine, just as I need, but I don't understand why. I have a
    composable
    function
    @Composable
    fun modified(
    object1: A,
    object2: B) : Boolean {...}
    Where
    A
    is a Data Class,
    B
    is a regular class with
    MutableState
    variables. I use this function to control the
    Button
    , so it's enabled only if there are any differences between the objects.
    Button(
    ...
    enabled = modified(object1, object2)
    ...
    )
    How does it work? Any changes to
    MutableState
    variables of
    object2
    trigger the
    modified
    function?
    Erlan Amanatov
    Zach Klippenstein (he/him) [MOD]
    +1
    4 replies
    Copy to Clipboard
  • l

    len

    1 year ago
    Is there any difference between
    LaunchedEffect
    and
    DisposableEffect
    when you don't actually need any cleanup? I've seen in the official samples some DisposableEffects with an empty
    onDispose {}
    , and that makes me think
    LaunchedEffect
    should be a better option, but I'm in doubt 🤔
    l
    Adam Powell
    18 replies
    Copy to Clipboard