• j

    Jan Skrasek

    2 years ago
    Ambients - why sometimes ambients are "registered" with the value directly and sometimes you pass a remembered state of the value? What's is the logic/meaning behind this? I thought that there is already a logic in ambient how to compare new provided value to the previous.
    j
    Adam Powell
    9 replies
    Copy to Clipboard
  • j

    Jan Skrasek

    2 years ago
    Material's Colors has all its fields as a state - documented as an optimization to when the color changes not to recompose everything, but only composables depending on the particular color. But I can't find any place that would modify any color. So is this a preoptimized for some user-land use-cases? And what they could be?
    j
    Adam Powell
    +1
    7 replies
    Copy to Clipboard
  • Colton Idle

    Colton Idle

    2 years ago
    In the Layout Codelab I don't get this part
    For example, if you wanted to add some outer spacing, change the background color of the composable, and round the corners of the ripple, you could use the following code:
    specifically the "round the corners of the ripple". This is the code snippet they're talking about:
    Row(modifier
            .padding(8.dp)
            .clip(RoundedCornerShape(4.dp))
            .background(MaterialTheme.colors.surface)
            .clickable(onClick = { /* Ignoring onClick */ })
            .padding(16.dp)
        ) {
    We're not actually rounding the corner of the ripple, we're more so rounding the corner of the row, and so the ripple only goes up to the clipped area which gives you a rounded corner ripple... right?
    Colton Idle
    l
    3 replies
    Copy to Clipboard
  • Afzal Najam

    Afzal Najam

    2 years ago
    Also, a
    CircularProgressIndicator
    inside an
    AlertDialog
    seems like it's not as smooth outside of it. I'll post a video of this + sample code in a few hours.
    Afzal Najam
    1 replies
    Copy to Clipboard
  • Colton Idle

    Colton Idle

    2 years ago
    Layouts codelab; "Compose also comes with some predefined Material icons you can use, for example the closefavorite and menu icons." Does this mean my apk automatically includes all material icons? Or do they only get packaged in if I reference them in a composable?
    Colton Idle
    l
    +1
    3 replies
    Copy to Clipboard
  • j

    Jan Skrasek

    2 years ago
    I'd like to style my "components". Let's say I have specific color for my button. Ideally, I like to call
    Button(backgroundColor = Color.MyColor)
    , but of course, also content color has to be handled. Explicit passing of such seems to be pretty verbose, but there is not probably any way to modify contentColorFor() behavior for my color. Other options is to create own Button implementation but that's not much elegant.
    j
    Josh Feinberg
    +2
    8 replies
    Copy to Clipboard
  • Sergey Y.

    Sergey Y.

    2 years ago
    Sure. I didn't mean to sound inaccurate. I will file an issue on Kotlin issue tracker as well.
    Sergey Y.
    1 replies
    Copy to Clipboard
  • d

    dimsuz

    2 years ago
    Is there a way to make LazyColumn/LazyRow snap items after fling/scroll ended? If there was this would be a working view pager out of the box 😃
    d
    Adam Powell
    +1
    6 replies
    Copy to Clipboard
  • s

    Slackbot

    2 years ago
    This message was deleted.
    s
    r
    +1
    5 replies
    Copy to Clipboard
  • Mehdi Haghgoo

    Mehdi Haghgoo

    2 years ago
    I see a some discussion around Flow in this channel. Given my zero experience with Flow, is there any intrinsic connection between Compose and Flow?
    Mehdi Haghgoo
    gildor
    2 replies
    Copy to Clipboard