• escodro

    escodro

    1 year ago
    Hello, everyone! I’m having some issues with ViewModel + Hilt + Navigation. I already took a look at previous discussions but I need some advice. I have a
    Home
    screen that contains 4 tabs, each one with its own
    ViewModel
    . Today it is declared this way:
    composable(Destinations.Home) {
        Home(
            onTaskClicked = actions.openTaskDetail,
            onAboutClicked = actions.openAbout
        )
    }
    But since calling
    viewModel()
    to get the ViewModels for each Composable does not work, how should I proceed? Get the 4 ViewModels inside my
    NavGraph
    and pass then all to my
    Home
    ? Should I create a
    HomeViewModelProvider
    containing the 4 ViewModels? Is there a better approach? Thanks a lot in advance! ❤️
    escodro
    i
    4 replies
    Copy to Clipboard
  • Tony Kazanjian

    Tony Kazanjian

    1 year ago
    I am trying to add an auto-scroll effect to the example of a Pager seen in the Jetcaster sample (https://github.com/android/compose-samples/blob/main/Jetcaster/app/src/main/java/com/example/jetcaster/util/Pager.kt), but it seems like adding a
    ScrollableState
    to a modifier that also includes a
    DraggableState
    has no effect (also, seems like whichever modifier comes next pretty much overwrites the previous one). Code in thread
    Tony Kazanjian
    2 replies
    Copy to Clipboard
  • John O'Reilly

    John O'Reilly

    1 year ago
    Am updating a project here from alpha11 to beta01 and getting
    Unresolved reference: BottomDrawerLayout
    - I might be missing something obvious but I've searched this channel/web but didn't see anything about that changing
    John O'Reilly
    l
    2 replies
    Copy to Clipboard
  • Bryan Herbst

    Bryan Herbst

    1 year ago
    What is the right way to get a callback when a
    ModalBottomSheetLayout
    is dismissed, either from accessibility actions or from tapping on the scrim outside the sheet? Drop a
    DisposableEffect
    inside the sheet’s content? I don’t see any sort of callback or observable state.
    Bryan Herbst
    k
    +1
    5 replies
    Copy to Clipboard
  • z

    zoha131

    1 year ago
    Why do we have three different over load of
    AnimatedVisibility
    . More specifically why do we have
    RowScope
    and
    ColumnScope
    version of implementations? Isn’t without scope one is enough? I think I have seen this pattern for couple of other Composables. My curious minds wants to the reason behind it. 🧐
    z
    Jan Bína
    4 replies
    Copy to Clipboard
  • Orhan Tozan

    Orhan Tozan

    1 year ago
    What is the recommended way to respond to flows that act like events/side effects in Compose? E.g. a viewmodel with a Flow<NavigateToFoo>
    Orhan Tozan
    Sean McQuillan [G]
    59 replies
    Copy to Clipboard
  • Alexander Pataridze

    Alexander Pataridze

    1 year ago
    Any chance of getting Compose for iOS?
    Alexander Pataridze
    j
    +5
    9 replies
    Copy to Clipboard
  • d

    Daniel

    1 year ago
    Can I detect taps outside of a component? I want to have a dropdown collapse itself on tap outside of it, without needed to require every parent to listen for tap events and tell it to close
    d
    z
    +1
    7 replies
    Copy to Clipboard
  • s

    Sam

    1 year ago
    just came to say that upgrading from
    alpha11
    to
    beta01
    is borderline unconstitutional, 600+ compile time errors down, still 44 more to go — fingers crossed our app actually works at runtime
    s
    Zach Klippenstein (he/him) [MOD]
    +1
    4 replies
    Copy to Clipboard
  • Arkadii Ivanov

    Arkadii Ivanov

    1 year ago
    Puppy For You! My submission to #AndroidDevChallenge: GitHub. 🐕❤️
    Arkadii Ivanov
    Bryan L
    2 replies
    Copy to Clipboard