Skip to content
Snippets Groups Projects
Commit 3b6fad5f authored by Sebastian Kürten's avatar Sebastian Kürten
Browse files

Define weight for chat history to make column layout work

parent 832e3a29
No related branches found
No related tags found
No related merge requests found
...@@ -11,8 +11,6 @@ import androidx.compose.material.Icon ...@@ -11,8 +11,6 @@ import androidx.compose.material.Icon
import androidx.compose.material.OutlinedTextField import androidx.compose.material.OutlinedTextField
import androidx.compose.material.Text import androidx.compose.material.Text
import androidx.compose.material.icons.Icons import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Edit
import androidx.compose.material.icons.filled.Email
import androidx.compose.material.icons.filled.Send import androidx.compose.material.icons.filled.Send
import androidx.compose.runtime.* import androidx.compose.runtime.*
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
...@@ -26,6 +24,7 @@ fun Chat() { ...@@ -26,6 +24,7 @@ fun Chat() {
var text by remember { mutableStateOf(TextFieldValue("")) } var text by remember { mutableStateOf(TextFieldValue("")) }
Column { Column {
LazyColumn( LazyColumn(
Modifier.weight(1f),
contentPadding = PaddingValues(horizontal = 16.dp, vertical = 8.dp) contentPadding = PaddingValues(horizontal = 16.dp, vertical = 8.dp)
) { ) {
items( items(
......
...@@ -29,41 +29,40 @@ object DataProvider { ...@@ -29,41 +29,40 @@ object DataProvider {
title = "Brewery", title = "Brewery",
description = "Brewery loves fetching you your favorite homebrew.", description = "Brewery loves fetching you your favorite homebrew.",
), ),
// TODO: commented those to reduce the list size and make the text input visible Message(
// Message( id = 6,
// id = 6, title = "Lucy",
// title = "Lucy", description = "Picture yourself in a boat on a river, Lucy is a pup with kaleidoscope eyes.",
// description = "Picture yourself in a boat on a river, Lucy is a pup with kaleidoscope eyes.", ),
// ), Message(
// Message( id = 7,
// id = 7, title = "Astro",
// title = "Astro", description = "Is it a bird? A plane? No, it's Astro blasting off into your heart!",
// description = "Is it a bird? A plane? No, it's Astro blasting off into your heart!", ),
// ), Message(
// Message( id = 8,
// id = 8, title = "Boo",
// title = "Boo", description = "Boo is just a teddy bear in disguise. What he lacks in grace, he makes up in charm.",
// description = "Boo is just a teddy bear in disguise. What he lacks in grace, he makes up in charm.", ),
// ), Message(
// Message( id = 9,
// id = 9, title = "Pippa",
// title = "Pippa", description = "Pippa likes to look out the window and write pup-poetry.",
// description = "Pippa likes to look out the window and write pup-poetry.", ),
// ), Message(
// Message( id = 10,
// id = 10, title = "Coco",
// title = "Coco", description = "Coco enjoys getting pampered at the local puppy spa.",
// description = "Coco enjoys getting pampered at the local puppy spa.", ),
// ), Message(
// Message( id = 11,
// id = 11, title = "Brody",
// title = "Brody", description = "Brody is a good boy, waiting for your next command.",
// description = "Brody is a good boy, waiting for your next command.", ),
// ), Message(
// Message( id = 12,
// id = 12, title = "Stella",
// title = "Stella", description = "Stella! Calm and always up for a challenge, she's the perfect companion.",
// description = "Stella! Calm and always up for a challenge, she's the perfect companion.", ),
// ),
) )
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment