How to align a column of Text composables in a Box...
# compose-android
a
How to align a column of Text composables in a Box as BottomStart when there are other composables in that Box aligned Center?
solved 1
Like in the photo attached (see name & location)
s
Don't understand the problem. Is it that you don't want them to overlap?
a
Photo is from an app that already implemented this. I do not know how to achieve it.
What I get (see attached screenshot)
s
Uhm, what did you try so far? Did you try doing exactly what you're saying, to put a modifier on that column like
.align(Alignment.BottomStart)
? If you want the card to take up more space, you need to make it bigger, then it should be more visible that your text is on the bottom start
a
My implementation is of the following:
Copy code
Box {
    Column(
    Column(
        modifier = Modifier
            .fillMaxWidth()
            .fillMaxWidth()
           .height(300.dp),
        verticalArrangement = Arrangement.Center,
        horizontalAlignment = Alignment.CenterHorizontally
        horizontalAlignment = Alignment.CenterHorizontally
    ) {
        // Composables here like button aligned Center to add a photo
        // Composables here like button aligned Center to add a photo
    }
    Column(
    Column(
        verticalArrangement = Arrangement.Bottom,
        horizontalAlignment = Alignment.Start
        horizontalAlignment = Alignment.Start
    ) {
        // Composables here to display full name, email address and location
        // Composables here to display full name, email address and location
    }
}}
Hmm. Sorry for the duplicate lines. Unsure why Slack post it that way. In any case, I've also tried Box with contentAlignment BottomStart
Thanks @Stylianos Gakis . Adding the
.align(Alignment.BottomStart)
Did the trickk
117 Views