• s

    Slackbot

    11 months ago
    This message was deleted.
    s
    1 replies
    Copy to Clipboard
  • Chris Fillmore

    Chris Fillmore

    11 months ago
    I have a
    LazyColumn
    with around ~75 items, including stickyHeaders, inside a bottom sheet, and the performance of
    LazyListState.animateScrollToItem()
    is noticeably bad. The animation is not smooth; it appears to just show a few frames before landing at the target index. Scrolling through the list manually otherwise works well enough. The items in the list have some state associated with them (they can be “favourited” (via a heart icon) or “toggled” (via a switch). They have other components which are visible (or interactive) conditionally. So they are perhaps relatively complex. Should I expect
    animateScrollToItem
    to be performant in this case? I’m wondering if others have encountered a similar situation. Thanks for the feedback.
    Chris Fillmore
    Adam Powell
    9 replies
    Copy to Clipboard
  • Ashu

    Ashu

    11 months ago
    Coroutine launch is showing error when launched from a composable function. I am trying to show/hide ModalBottomSheetLayout by observing a state flow. How can I resolve this. Also, how do I implement multiple bottom sheets in same Layout?
    Ashu
    Zach Klippenstein (he/him) [MOD]
    +1
    6 replies
    Copy to Clipboard
  • n

    nglauber

    11 months ago
    Is there a way to reassign the
    ViewModelStoreOwner
    of a
    hiltViewModel()
    ? 😛 Let’s say the user is in
    ScreenA
    and navigate to
    ScreenB
    . In
    ScreenB
    , I’m creating a viewmodel using
    hiltViewModel()
    . So, the scope of this viewmodel is
    ScreenB
    . Now, from
    ScreenB
    , I want to open
    ScreenC
    , pop
    ScreenB
    (therefore, the stack is
    ScreenA
    and
    ScreenC
    ), but reuse the viewmodel created in
    ScreenB
    . Is it possible? 🤔 (I wouldn’t create the viewmodel in
    ScreenA
    😞)
    n
    i
    +1
    6 replies
    Copy to Clipboard
  • c

    Casey Brooks

    11 months ago
    Is anyone aware of any libraries for displaying PDFs in Compose UI (specifically based on the built-in PdfRenderer)? A quick web search is flooded with paid libraries or View-based options, so it's not easy to find anything that's natively displayed in Compose if one even exists yet.
    c
    ian.shaun.thomas
    4 replies
    Copy to Clipboard
  • YASAN

    YASAN

    11 months ago
    I am using Compose navigation for my app. I have 3 screens: A, B (dynamic) & C (dynamic). The user can navigate to a new C screen from all 3 screens but I want there to be only 1 C screen. so anytime a new version is navigated to, the old C should be removed from back stack. Can anyone help me how I can achieve that? I have tried a few things but none worked properly
    YASAN
    d
    +2
    22 replies
    Copy to Clipboard
  • v

    Vinay Gaba

    11 months ago
    Has there been any conversation around when Compose will be able to target Kotlin 1.6?
    v
    j
    2 replies
    Copy to Clipboard
  • s

    Slackbot

    11 months ago
    This message was deleted.
    s
    1 replies
    Copy to Clipboard
  • Chintan Soni

    Chintan Soni

    11 months ago
    Hey guys,, Just wanted to know about the inspiration of creating Jetpack Compose UI toolkit? Whether they were: • Haunted by android View class (~15k lines of code) • Missing the flavour of Declarative UI Programming. Though they were too late to the party, as if we look at Web UI frameworks, ReactJS already adopted this back in 2013. • something else?
    Chintan Soni
    r
    2 replies
    Copy to Clipboard
  • Michael Marshall

    Michael Marshall

    11 months ago
    I’m using the Accompanist
    HorizontalPager
    and I’ve noticed that doing something like,
    val scope = rememberCoroutineScope()
    val pagerState = rememberPagerState()
    ...
    Tab (
        ...
        onClick = { scope.launch { pagerState.animateScrollToPage(index) } }
        ...
    )
    feels like a bit of an imperative programming anti-pattern compared to declaratively creating an
    AnimatedContent
    as described in the docs. I assume it’s doing something similar under the hood anyway, and this is just a convenience function, so it’s ok?
    Michael Marshall
    1 replies
    Copy to Clipboard