• Daniel Candeias

    Daniel Candeias

    1 year ago
    How can I have custom bullet point (color and size customisable), followed by multiline text, with bullet point aligned to first line? Something like this 👇 • This is a very long text which does not fit in one line
    Daniel Candeias
    Zach Klippenstein (he/him) [MOD]
    +1
    8 replies
    Copy to Clipboard
  • s

    Shawn Tucker

    1 year ago
    Is there a way to lock DrawerState open in compose?
    s
    matvei
    8 replies
    Copy to Clipboard
  • oday

    oday

    1 year ago
    I’m not sure how to refactor this code into the new SideEffect API’s which replace onCommit/onDispose as of alpha11
    @Composable
    internal fun Handler(
        enabled: Boolean = true,
        onBackPressed: () -> Unit
    ) {
        val dispatcher =
            (AmbientBackPressedDispatcher.current ?: return).onBackPressedDispatcher
    
        val handler = remember { ComposableBackHandler(enabled) }
    
        onCommit(dispatcher) {
            dispatcher.addCallback(handler)
    
            onDispose { handler.remove() }
        }
        onCommit(enabled) {
            handler.isEnabled = enabled
            handler.onBackPressed = onBackPressed
        }
    }
    the
    onCommit
    and
    onDispose
    methods are now unresolved, not sure what to replace them with or how
    oday
    i
    6 replies
    Copy to Clipboard
  • d

    Dylan

    1 year ago
    What's the best way to know the scroll direction of a LazyColumn? I'm currently using a LazyListState, and by keeping a reference of the last value of
    firstVisibleItemScrollOffset
    from LazyListState, I can compare it to the current value so if
    lastOffset
    is lower than
    firstVisibleItemScrollOffset
    , that means the user is scrolling down, however if
    lastOffset
    is higher than
    firstVisibleItemScrollOffset
    , that means the user is scrolling up. At least that's the result I was hoping for but unfortunately
    firstVisibleItemScrollOffset
    is often equal to
    lastOffset
    . So what is the best way to know the scroll direction of a LazyColumn? 🤔 (What I would like to achieve is similar to what we used to do with the XML Toolbar View using app:layout_scrollFlags)
    d
    Jorkoh
    +2
    4 replies
    Copy to Clipboard
  • t

    Tim Malseed

    1 year ago
    Hey all, I've got a bit of a code design problem, to do with holding observable state in a ViewModel, to be consumed by Composable functions..
    t
    d
    +2
    30 replies
    Copy to Clipboard
  • Klaas Kabini

    Klaas Kabini

    1 year ago
    Can someone explain to me how does nested navigation work in compose
    Klaas Kabini
    n
    2 replies
    Copy to Clipboard
  • Nathan Castlehow

    Nathan Castlehow

    1 year ago
    Hi, I have some values that are provided to my view model as a
    MutableStateFlow
    . I then want to “proxy” these through my view model to the view and expose them as something that the view can bind to. I want to avoid exposing them to the view as flows and then calling
    collectAsState
    inside the view as i want to keep most things inside the view model.
    Nathan Castlehow
    Adam Powell
    +1
    53 replies
    Copy to Clipboard
  • Jason Ankers

    Jason Ankers

    1 year ago
    Followup question to a discussion a while back: https://kotlinlang.slack.com/archives/CJLTWPH7S/p1614609620302500?thread_ts=1614345603.389700&cid=CJLTWPH7S What would be the best way to collect a cold data source like this (scoped to the composable), but also keep a reference to it in the viewmodel? The viewmodel needs to keep a reference because we keep a bunch of
    derivedStateOf
    business logic inside it
    Jason Ankers
    Adam Powell
    2 replies
    Copy to Clipboard
  • Rafs

    Rafs

    1 year ago
    How do I draw behind the status bar like this?
    Rafs
    Jason Ankers
    +3
    6 replies
    Copy to Clipboard
  • Deepak Gahlot

    Deepak Gahlot

    1 year ago
    Is there a way we can remove this default padding before the Text Cursor in Jetpack Compose
    Deepak Gahlot
    Colton Idle
    +1
    4 replies
    Copy to Clipboard