• Vitaliy Zarubin

    Vitaliy Zarubin

    1 year ago
    Is this normal behavior? Why is refresh random? (Swipe Refresh & Paging)
    Vitaliy Zarubin
    cb
    +1
    9 replies
    Copy to Clipboard
  • iamthevoid

    iamthevoid

    1 year ago
    Does anybody met next exception [thread] ? Why can it be? I have code with finite loops just for represent button styles from design system [thread]
    iamthevoid
    Adam Powell
    7 replies
    Copy to Clipboard
  • c

    Ciprian Grigor

    1 year ago
    Is kotlin.serialization compatible with compose? I get this: org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during code generation
    c
    Vitaliy Zarubin
    3 replies
    Copy to Clipboard
  • Zach Klippenstein (he/him) [MOD]

    Zach Klippenstein (he/him) [MOD]

    1 year ago
    I just published another post in (what is turning out to be) a series on Compose’s state management model. Feedback welcome! A historical introduction to the Compose reactive state model
    Zach Klippenstein (he/him) [MOD]
    Adam Powell
    +2
    6 replies
    Copy to Clipboard
  • b

    Benny Özcetin

    1 year ago
    Hi everyone, I was playing with the AnimatedVisibility() today, and wonder if there is a way to figure out when the animation end. Does anyone know something about this?
    b
    Doris Liu
    2 replies
    Copy to Clipboard
  • n

    nglauber

    1 year ago
    I saw this question here and makes me think: How’s
    match_parent
    in Compose? 🤔 https://stackoverflow.com/questions/67677125/fill-height-for-child-in-row
    n
    1 replies
    Copy to Clipboard
  • s

    Spiral123

    1 year ago
    has anyone had experience of enabling list scrolling in compose using a rotary encoder (e.g. twisting a watch crown)? I’m starting to suspect it may not be supported.
    s
    Zach Klippenstein (he/him) [MOD]
    +1
    8 replies
    Copy to Clipboard
  • Arkadii Ivanov

    Arkadii Ivanov

    1 year ago
    A question: shouldn't the
    State
    interface have
    out T
    and not just
    T
    ? Like
    State<out T> { ... }
    Arkadii Ivanov
    louiscad
    +2
    31 replies
    Copy to Clipboard
  • Clément Jean

    Clément Jean

    1 year ago
    Hi guys, I'm trying to put the following jetpack-compose code in a separate gradle module called
    ui_components
    (android library)
    /**
     * Display a vertical list of [OutlinedTextField]
     */
    @Composable
    fun Form(fields: List<FormField>) {
        LazyColumn(content = {
            items(fields) { item ->
                OutlinedTextField(
                    value = item.mutableState.value,
                    onValueChange = { item.mutableState.value = it },
                    label = { Text(text = stringResource(id = item.label)) },
                    isError = item.isError(item.mutableState.value)
                )
            }
        })
    }
    However, when I compile the logs show me the following error:
    e: org.jetbrains.kotlin.codegen.CompilationException: Back-end (JVM) Internal error: Couldn't inline method call 'items' into
    local final fun androidx.compose.foundation.lazy.LazyListScope.<anonymous>(): kotlin.Unit defined in com.xxx.xxx.ui_components.Form
    {
            items(fields) { item ->
                OutlinedTextField(
                    value = item.mutableState.value,
                    onValueChange = { item.mutableState.value = it },
                    label = { Text(text = stringResource(id = item.label)) },
                    isError = item.isError(item.mutableState.value)
                )
            }
        }
    Am I doing something wrong here? Because individually the module compile (so no dependency missing, I guess) and without the dependency to
    ui_components
    the app compiles. Would be great if you can explain me, thanks in advance! 🙏
    Clément Jean
    Zach Klippenstein (he/him) [MOD]
    +1
    3 replies
    Copy to Clipboard
  • Ryan Simon

    Ryan Simon

    1 year ago
    Hey guys, question about handling one-off events in Compose. I normally would deal with this by using a
    SingleLiveEvent
    and observing changes in my
    Fragment
    . Now that I’m in Compose world, it seems that using a
    SingleLiveEvent
    isn’t something that’s supported. What are your recommendations for handling one-off events coming from the ViewModel like showing a Snackbar, navigation, etc? Sample code in the thread of what I’m doing now.
    Ryan Simon
    Adam Powell
    +4
    54 replies
    Copy to Clipboard