• Fudge

    Fudge

    2 years ago
    Maybe I’m misunderstanding the first parameter of
    state
    but it seems like it makes it so writes to the variable somehow get ignored, so I would change the value but after the recomposition the value is the same as it was before. I can’t really give a complete example since its in a middle of a lot of things and this only happens in exactly the second instance of this state variable. But the magical nature of remember {} and such make it impossible to debug. At this point it seems it would be easier to roll out my own implementation of state.
    Fudge
    Timo Drick
    +2
    25 replies
    Copy to Clipboard
  • Zach Klippenstein (he/him) [MOD]

    Zach Klippenstein (he/him) [MOD]

    2 years ago
    Pulling this out of the thread to avoid derailing it… What does this mean for
    savedInstanceState
    ? Looks like it’s stuck around for now?
    Zach Klippenstein (he/him) [MOD]
    l
    +4
    58 replies
    Copy to Clipboard
  • Patrick Yin

    Patrick Yin

    2 years ago
    About
    @Preview
    , will the @Preview marked method be removed (or changed) when assembling release build?
    Patrick Yin
    jim
    +1
    22 replies
    Copy to Clipboard
  • h

    Horv

    2 years ago
    I'm creating a "Sign in with Google"-button for my Android app and looking at https://developers.google.com/identity/branding-guidelines for guidence. However, when adding the icon it seems the image get's some sort of border/shadow. How do I remove that?
    Button(
                        onClick = {
                            Log.d("Login", "ButtonClicked!")
                            handleLoginButtonPress(loginFragment, context)
                        },
                        backgroundColor = Color.White,
                        padding = InnerPadding(8.dp)
                    ) {
                        Image(
                            asset = imageResource(id = R.drawable.btn_google_light_normal_hdpi),
                            modifier = Modifier.height(40.dp)
                                .padding(0.dp)
                                .absolutePadding(0.dp, 0.dp, 0.dp, 0.dp)
                                .drawShadow(0.dp),
                            contentScale = ContentScale.Inside
                        )
                        Text(
                            "Sign in with Google",
                            color = Color(75, 75, 75),
                            fontFamily = fontFamily(listOf(font(R.font.roboto_medium))),
                            modifier = Modifier.padding(24.dp, 0.dp, 0.dp, 0.dp)
                        )
                    }
    h
    Adam Powell
    3 replies
    Copy to Clipboard
  • c

    CLOVIS

    2 years ago
    Hi! I have heard a lot about Jetpack Compose from Google's devs, and it really seems to me like it's going to be a big change to how we view UI, as developers. Google has hinted multiple times that it was technically possible to run it on other platforms (web, desktop) but they're not planning (at least at the moment) on making that leap. I guess it's quite a big commitment and they'd rather be sure that it's working perfectly before adding a lot of work on their plates ^^ Well, I think that probably means it should be a community effort. I'd like to know if there's already an open source project working on this, or some other way I can contribute to make this a reality. I think Compose and Kotlin Multiplatform are the perfect blend that will finally make it possible to write a UI once for everything 😃
    c
    Fudge
    +1
    5 replies
    Copy to Clipboard
  • louiscad

    louiscad

    2 years ago
    Isn't
    Modifier
    the new
    LayoutParams
    in a way?
    louiscad
    v
    +3
    11 replies
    Copy to Clipboard
  • v

    Vinay Gaba

    2 years ago
    Random q: UI Components, Widgets, Views Is there anything on the list or elsewhere that you’ll use interchangeably with “Composable function”? I personally like “UI Component” when I’m speaking about a Composable function but wondering what this group thinks.
    v
    Zach Klippenstein (he/him) [MOD]
    +4
    11 replies
    Copy to Clipboard
  • Fudge

    Fudge

    2 years ago
    What was the function to check if we are currently in a
    @Preview
    ? I remember there was one but I can't find it. Something like
    Something.isInPreview()
    Fudge
    jim
    +5
    30 replies
    Copy to Clipboard
  • galex

    galex

    2 years ago
    How do we load images from the web? I thought I saw a Composable to do that, with a temporary image (placeholder)…
    galex
    Adam Powell
    2 replies
    Copy to Clipboard
  • r

    romainguy

    2 years ago
    launchInComposition()
    r
    galex
    +1
    3 replies
    Copy to Clipboard