• f

    Felix Schütz

    1 year ago
    When using Coil to load videos from URIs generated with
    ContentResolver
    , I need to explicitly pass the fetcher to the request builder, otherwise Coil cannot process the video (since the URI does not contain the file type). E.g.:
    Image(
        painter = rememberImagePainter(
            data = contentUri,
            builder = {
                fetcher(VideoFrameUriFetcher(LocalContext.current))
            },
        ),
        contentDescription = null,
    )
    Creating the
    VideoFrameUriFetcher
    instance for every video seems kind of inefficient. Is there a better Compose way?
    f
    Alex
    3 replies
    Copy to Clipboard
  • mario

    mario

    1 year ago
    👋 Hello, Any good article where navigation from the viewmodel is included? I'm definitely getting headaches from this. 🙏 A flow and a sealed class make that if I press return I immediately go forward again.
    mario
    1 replies
    Copy to Clipboard
  • K Merle

    K Merle

    1 year ago
    Is there any documentation on how to handle
    delay
    inside
    LaunchedEffect
    coroutine scope in androidTests? I am unable to test if following lambda has been called when
    delay
    is present.
    LaunchedEffect(Unit){
        delay(splashTime)
        navigate(viewModel.isAuthenticated())
    }
    K Merle
    Zach Klippenstein (he/him) [MOD]
    +1
    5 replies
    Copy to Clipboard
  • why

    why

    1 year ago
    Hi, so in a new Compose app project with only one
    OutlinedTextField
    , the memory profiler, after setting focus on/selecting the text field without typing anything, shows that Java allocations are happening non-stop, it keeps goin up until it gets GCed, then start going up again over n over, am I missing something?
    MyApplicationTheme {
        // A surface container using the 'background' color from the theme
        Surface(color = MaterialTheme.colors.background) {
            OutlinedTextField(value = "Ok", onValueChange = {})
        }
    }
    why
    Jesse Hill
    2 replies
    Copy to Clipboard
  • b

    Bacho Kurtanidze

    1 year ago
    constrainAs(title_textRef, { end.linkTo(parent.end, dimensionResource(id = R.dimen.dp_16)) } How can I reference dimensionResource inside of non-composable code block?
    b
    1 replies
    Copy to Clipboard
  • Scott Kruse

    Scott Kruse

    1 year ago
    Random thought, it would be useful to have a XML -> Compose conversion tool in the IDE
    Scott Kruse
    a
    +2
    4 replies
    Copy to Clipboard
  • t

    Tolriq

    1 year ago
    What would be the proper way to animate a bottomnavigationbar in a scaffold when expanding a bottomsheet? Applying an offset is not enough as it leaves the padding to the content and also changing the height via a modifier triggers too many recomposition and seems to break the swiping 😞
    t
    f
    +1
    11 replies
    Copy to Clipboard
  • Chris Johnson

    Chris Johnson

    1 year ago
    :android-wave: Is there a way to measure a child before placing it and then fill the screen with the available amount of those children? Currently I'm creating a
    Layout
    for measurement of the child and then another
    Layout
    that will place X amount of those children based on screen height. The problem I ran into was each child I'm placing needs to be unique/not being currently laid out for the system to not give me
    "Place was called on a node which was placed already"
    .
    Chris Johnson
    Zach Klippenstein (he/him) [MOD]
    10 replies
    Copy to Clipboard
  • a

    Anthony

    1 year ago
    Has anyone tried out
    androidx.navigation:navigation-compose:2.4.0-alpha08
    yet? I seem to be getting an error every time I navigate back to a composable using a navigation graph scope viewmodel.
    a
    i
    10 replies
    Copy to Clipboard
  • l

    Lilly

    1 year ago
    What is the right way to handle
    Flow
    that comes from view model? I have a
    Flow
    that produces values for
    LazyColumn
    . Do I have to put the values into a
    SnapshotStateList
    or can I feed the
    LazyColumn
    on the fly with the values? How would I do this?
    l
    Zach Klippenstein (he/him) [MOD]
    +1
    17 replies
    Copy to Clipboard