kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
fix message scrolling
rodzic
6f39ba1331
commit
e738b7692f
|
@ -5,10 +5,14 @@ import androidx.compose.state
|
||||||
import androidx.ui.core.Modifier
|
import androidx.ui.core.Modifier
|
||||||
import androidx.ui.core.Text
|
import androidx.ui.core.Text
|
||||||
import androidx.ui.core.TextField
|
import androidx.ui.core.TextField
|
||||||
|
import androidx.ui.foundation.VerticalScroller
|
||||||
import androidx.ui.foundation.shape.corner.RoundedCornerShape
|
import androidx.ui.foundation.shape.corner.RoundedCornerShape
|
||||||
import androidx.ui.graphics.Color
|
import androidx.ui.graphics.Color
|
||||||
import androidx.ui.input.ImeAction
|
import androidx.ui.input.ImeAction
|
||||||
import androidx.ui.layout.*
|
import androidx.ui.layout.Column
|
||||||
|
import androidx.ui.layout.LayoutPadding
|
||||||
|
import androidx.ui.layout.LayoutSize
|
||||||
|
import androidx.ui.layout.Row
|
||||||
import androidx.ui.material.Emphasis
|
import androidx.ui.material.Emphasis
|
||||||
import androidx.ui.material.MaterialTheme
|
import androidx.ui.material.MaterialTheme
|
||||||
import androidx.ui.material.ProvideEmphasis
|
import androidx.ui.material.ProvideEmphasis
|
||||||
|
@ -70,7 +74,9 @@ fun MessagesContent() {
|
||||||
val sidePad = 8.dp
|
val sidePad = 8.dp
|
||||||
val topPad = 4.dp
|
val topPad = 4.dp
|
||||||
|
|
||||||
// modifier = LayoutFlexible(1.0f)
|
VerticalScroller(
|
||||||
|
modifier = LayoutFlexible(1f)
|
||||||
|
) {
|
||||||
Column {
|
Column {
|
||||||
messages.value.forEach { msg ->
|
messages.value.forEach { msg ->
|
||||||
MessageCard(
|
MessageCard(
|
||||||
|
@ -83,8 +89,9 @@ fun MessagesContent() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Spacer(LayoutFlexible(1f))
|
// Spacer(LayoutFlexible(1f))
|
||||||
|
|
||||||
val message = state { "text message" }
|
val message = state { "text message" }
|
||||||
val backgroundColor = palette.secondary.copy(alpha = 0.12f)
|
val backgroundColor = palette.secondary.copy(alpha = 0.12f)
|
||||||
|
|
Ładowanie…
Reference in New Issue