• p

    PHondogo

    1 year ago
    Hello! Does Jetpack Compose contain any composables/templates for 'crud' operations? Like Scafold is a good template for whole application. I mean that there is standard behaviour for view list elements, tap on any to edit, etc.
    p
    1 replies
    Copy to Clipboard
  • d

    dimsuz

    1 year ago
    I have a horizontal
    LazyRow
    inside a particular page on an accompanyist
    Pager
    and while this lazy row is being horizontally scrolled I want to disable horizontal swipe of Pager's pages. How can this be achieved?
    d
    Ravi
    +1
    4 replies
    Copy to Clipboard
  • c

    Casey Brooks

    1 year ago
    Is there a guide anywhere for using Compose for non-UI stuff? I’m not quite sure where to even begin
    c
    1 replies
    Copy to Clipboard
  • Florian

    Florian

    1 year ago
    Is there a way to have a snackbar, shown via
    scaffoldState.snackbarHostState.showSnackbar
    appear above the keyboard without changing the
    windowSoftInputMode
    in the manifest?
    Florian
    b
    3 replies
    Copy to Clipboard
  • Florian

    Florian

    1 year ago
    What is the right way to create an error state for TextFields similar to the old TextInputEditText? I see there is an
    isError
    argument. Do I have to add the error message manually as a
    Text
    below my TextField?
    Florian
    Alexandre Elias [G]
    +2
    12 replies
    Copy to Clipboard
  • n

    nglauber

    1 year ago
    I’m trying to replace the
    NavHost
    by
    AnimatedNavHost
    , but I’m having an issue… Using
    NavHost
    I have this structure:
    @Composable
    fun AppNavHost(...){
        val navController = rememberNavController()
        NavHost(navController = navController, ...) {
            composable("A") { ScreenA() }
            composable("B") { Feature1NavHost() }
        }
    }
    In
    Feature1NavHost
    I have another
    NavHost
    which takes control of the feature navigation. So,
    ScreenA
    calls “B” and pops out of the stack. Everything works fine here. Using
    AnimatedNavHost
    , when I press back in the first screen of
    Feature1NavHost
    , the display blinks and the application does not finish… 😕 I have to press a lot to close the app.
    n
    i
    +1
    17 replies
    Copy to Clipboard
  • Billy Newman

    Billy Newman

    1 year ago
    Hello all, I am having some issues with a recompose not running when replacing an immutable list
    Billy Newman
    Colton Idle
    +1
    11 replies
    Copy to Clipboard
  • Colton Idle

    Colton Idle

    1 year ago
    I've got an interesting use case when it comes to viewModels and scoping. I've got a NewCreditCardScreen and it has it's own NewCreditCardViewModel. Everything works great. Now I want to add in a secret panel (in debug builds) where it can tell what screen you're on, and it'll provide additional actions for you. Internally we call it a debug panel with "screen shortcuts". The idea is when you're on the NewCreditCardScreen, you activate this debug panel (via shaking the phone) and then click a button for "Enter card data" and it'll update NewCreditCardViewModel with the info. 1. NewCreditCardScreen and NewCreditCardViewModel all work correctly by themselves 2. Implemented shake to show DebugPanelBottomSheet 3. cardNumber input field auto-fills 🚫 I thought this would work because ViewModels have a larger scope than a single composable so I thought calling hiltViewModel() will give me the same NewCreditCardViewModel instance that my NewCreditCardScreen is using. Can anyone correct me where my line of thinking is wrong? I think in a typical app I would say "okay, well this state just clearly needs to live somewhere higher up", but because this is a debug only panel I really did think that just requesting a VM that already should be existing would work.
    @Composable
    fun DebugPanelBottomSheet(viewModel: NewCreditCardViewModel = hiltViewModel()) {
        val myClickLambda = {
            viewModel.state.cardNumber = "1234 1234 1234 1234"
        }
    //button that passes myClickLamda
    Colton Idle
    i
    +1
    29 replies
    Copy to Clipboard
  • b

    Berkeli Alashov

    1 year ago
    Is there a way to animate Brush/gradient changes?
    b
    Nader Jawad
    +1
    5 replies
    Copy to Clipboard
  • theapache64

    theapache64

    1 year ago
    🧭 Compose Navigation : Currently, the
    launchSingleTop
    flag works based on the
    route
    pattern, but not route launched. For eg: if I’ve
    composable("page/{pageId}"){...}
    and if i
    navigate("page/1")
    and
    navigate("page/2")
    with
    launchSingleTop = true
    , only the
    page/1
    will load. Is there anyway to make it route based rather than router pattern based ? or How can I handle this scenario?
    theapache64
    i
    6 replies
    Copy to Clipboard