What is easiest way to make this screen? Backgroun...
# compose
j
What is easiest way to make this screen? Background should be Box with fillMaxSize and image as content but how then to position title in center, logo and bottom part? Any advice? Thx in advance.
k
I'd have parent
Column
, with 2 nested children, of which one would be
.weight(4)
other
.weight(1)
, and children would have further children, depending what you wanna show.
j
Copy code
fun LandingView() {3
    Box(modifier = Modifier.fillMaxSize()) {
        Image(
            painter = painterResource(id = R.drawable.landing_background),
            contentDescription = null,
            modifier = Modifier
                .fillMaxSize(),
            contentScale = ContentScale.FillHeight
        )
    }
}
I have this and @K Merle you would put Column bellow Box ?
Ah made it 😄 thx for idea 🙂
k
Maybe it would even be better if you put only
.weight(1f)
to upper item, so bottom item is always visible with 100% height.