Thread
#compose
    Artur Schwarz

    Artur Schwarz

    1 year ago
    I’ve got a Column, inside this Column are 2 other Columns. The first inner Column is Scrollable and the content height is higher than the screen height. How can i achieve that both inner Columns are still visible? Current situtation: first inner scrollable Column is visible, other Column is drawn outside the visible Area.
    So basically imagine this: Column(modifier = Modifier.fillMaxSize()) { Column() { // Content that is scrollable and exceeds the viewport height } Column() { // Other content that has to be visible in any case } }
    t

    Tin Tran

    1 year ago
    Try adding both inner col with
    Modifier.weight(1f)
    Artur Schwarz

    Artur Schwarz

    1 year ago
    @Tin Tran Tried this. This leads to both columns fill 50% of the screen. What i have is a scrollable column with different contents in the first inner column and 2 Buttons in the second inner column. Obviously i want to have the second column wrapped with the height of the 2 buttons (weight 1f on both columns will give the second column a lot of whitespace)
    t

    Tin Tran

    1 year ago
    You can try setting the second col with fixed height and remove the
    weight
    on both col
    Or you can set the first col weight with 9f and second col with 1f
    Albert Chang

    Albert Chang

    1 year ago
    Only setting a weight on the first column should work.
    Artur Schwarz

    Artur Schwarz

    1 year ago
    Thank you everyone for you input! I’ve managed to solve this using compose ConstraintLayout
    It seems that this is simply impossible using Columns
    Albert Chang

    Albert Chang

    1 year ago
    ContstraintLayout seems an overkill. Have you tried setting a weight on the first column?
    Artur Schwarz

    Artur Schwarz

    1 year ago
    I’ve tried this. Same results
    Zach Klippenstein (he/him) [MOD]

    Zach Klippenstein (he/him) [MOD]

    1 year ago
    I just tried this, and setting a weight for the first (scrolling) child column does work. I wonder if there was some other layout modifiers that were getting in the way?
    Artur Schwarz

    Artur Schwarz

    1 year ago
    @Zach Klippenstein (he/him) [MOD] Sounds great! I stuck to the constraint layout solution though 🙂