• Adrian Landborn

    Adrian Landborn

    1 year ago
    Hi! Is there a way to remove/replace the
    Ripple
    -indication for Buttons and Cards? Or to override
    rememberRipple
    in a custom theme?
    Adrian Landborn
    Ravi
    +1
    7 replies
    Copy to Clipboard
  • YASAN

    YASAN

    1 year ago
    Is it possible to request focus on a TextField after opening a composable screen using Compose navigation? I want the keyboard to automatically open and focus on the TextField instead of the user having to tap on the TextField
    YASAN
    Cicero
    +1
    9 replies
    Copy to Clipboard
  • a

    allan.conda

    1 year ago
    How could I prevent a reload taking a parameter from the composable on the viewModel on configuration change?
    Profile(userId: String) {
      val viewModel = hiltNavGraphViewModel<ProfileViewModel>()
      DisposableEffect(userId) {
        viewModel.loadProfile(userId) // don't trigger on config change
        onDispose { }
      }
      val profile = viewModel.profile.collectAsState(...)
    }
    Actually, with compose-navigation it seems the backstack arguments are also in the ViewModel savedStateHandle. I’m wondering if it would be better to extract the userId from there instead.
    a
    Zach Klippenstein (he/him) [MOD]
    +1
    15 replies
    Copy to Clipboard
  • m

    MaxUt

    1 year ago
    Hi there, I'm struggling to figure out how to make a mutable
    NavHostController
    . I have several NavHostController so I can navigate through sub-pages and would like to send an event to the root Composable so I get the current NavHostController. The idea behind is to use it in a topBar so I can pop element off the stack and go back to the previous view. Do you guys have any experience with that ?
    m
    i
    7 replies
    Copy to Clipboard
  • Colton Idle

    Colton Idle

    1 year ago
    Saw this comment on reddit with a bunch of upvotes.
    I'm building a new app with no DI. It's a breath of fresh air, to be frank.
    CompositionLocalProvider currently serves the need I had for DI, and there's no sacrifice in testability (so far).
    Is it find to use CompositionLocalProvider for this sort of stuff? https://www.reddit.com/r/androiddev/comments/mwjut9/dagger_hilt_is_now_stable_with_235/gvj2beu?utm_source=share&amp;utm_medium=web2x&amp;context=3
    Colton Idle
    Adam Powell
    3 replies
    Copy to Clipboard
  • grandstaish

    grandstaish

    1 year ago
    Hi all, I’m trying to run a fake layout pass and then capture a screenshot in my test. I’m grabbing the root Window View, and then calling measure/layout/draw manually on it to get the bitmap in the size I want. The problem I’m running into is that subcomposed composables aren’t positioned correctly in my screenshots. In my specific case, I have a LazyList with 3 items. When I run the test, the 3 items are drawn on top of each other (instead of stacked vertically in a column) in the screenshot. (Screenshots in :thread-please: ) Anyone know if there’s anything else I need to do to draw View/Composable content into a Bitmap correctly?
    grandstaish
    2 replies
    Copy to Clipboard
  • Bryan Herbst

    Bryan Herbst

    1 year ago
    I’d like to have my
    Text()
    measure as though its text is bold even when its not so that the size of the
    Text()
    component doesn’t change as text gets bolded/unbolded. What’s the best way to accomplish that? Here’s an example of the behavior I don’t want:
    Bryan Herbst
    grandstaish
    +4
    19 replies
    Copy to Clipboard
  • escodro

    escodro

    1 year ago
    Hello, everyone! 👋 I’m facing some issues regarding Instrumented Tests with Compose. My tests passes on multiple emulators locally, but it fails on GitHub Actions (I’m using ReactiveCircus/android-emulator-runner). The fails are simple ones like
    Reason: Expected exactly '1' node but could not find any node that satisfies
    for screens I’m sure are working. Has anyone faced any issue with it? Is there any recommended configuration for Compose Test or Android Emulator? Thanks a lot in advance! ❤️
    escodro
    Zach Klippenstein (he/him) [MOD]
    6 replies
    Copy to Clipboard
  • Muhammad Zaryab Rafique

    Muhammad Zaryab Rafique

    1 year ago
    Hey Devs, how to recompose function after every ten seconds. Kindly guide me.
    Muhammad Zaryab Rafique
    Zach Klippenstein (he/him) [MOD]
    +1
    7 replies
    Copy to Clipboard
  • Colton Idle

    Colton Idle

    1 year ago
    To create a "text area" in compose, should I actually set a fixed height, or is there a way to set a max number of lines, or should I calculate height based dynamically by measuring font size or something.
    Colton Idle
    d
    2 replies
    Copy to Clipboard