Thread
#compose
    Marc

    Marc

    11 months ago
    Perhaps it would be a quite basic question there I go: I’m implementing a custom graphic view with 2 possible cases:1. Infinite width (and fixed height) in such case the width is taken from the number of elements of the graphic and the i just allow horizontal scrolling. 2. Fixed with and height where in this case I need to know the width and height of the component to properly fit the graphic in the canvas rect. Can anyone help me out with the second point? (I’m just starting so there are many things yet that I don’t know exist) Thanks!
    Zach Klippenstein (he/him) [MOD]

    Zach Klippenstein (he/him) [MOD]

    11 months ago
    Not quite sure what you're asking, but the max constraints give you that information. If you have something like this:
    Canvas(Modifier.fillMaxSize()) {
      // inside here you have access to the size
    }
    Marc

    Marc

    11 months ago
    omg, yes hahaha, this is exactly what i wanted thanks!