update to Compose dev06

pull/8/head
geeksville 2020-03-04 11:44:17 -08:00
rodzic 29d87bffb3
commit fd17dcefe1
8 zmienionych plików z 15 dodań i 17 usunięć

Wyświetl plik

@ -45,7 +45,7 @@ android {
composeOptions {
kotlinCompilerVersion "1.3.61-dev-withExperimentalGoogleExtensions-20200129"
kotlinCompilerExtensionVersion "0.1.0-dev05"
kotlinCompilerExtensionVersion "0.1.0-dev06"
}
}

Wyświetl plik

@ -7,7 +7,6 @@ import androidx.ui.core.Text
import androidx.ui.foundation.shape.corner.RoundedCornerShape
import androidx.ui.graphics.Color
import androidx.ui.layout.*
import androidx.ui.material.Button
import androidx.ui.material.Divider
import androidx.ui.material.MaterialTheme
import androidx.ui.material.TextButton
@ -75,9 +74,9 @@ private fun DrawerButton(
Surface(
modifier = modifier + LayoutPadding(
left = 8.dp,
start = 8.dp,
top = 8.dp,
right = 8.dp,
end = 8.dp,
bottom = 0.dp
),
color = backgroundColor,

Wyświetl plik

@ -3,9 +3,9 @@ package com.geeksville.mesh.ui
import android.bluetooth.BluetoothDevice
import android.bluetooth.BluetoothManager
import android.bluetooth.le.*
import android.content.Context
import android.os.ParcelUuid
import androidx.compose.Composable
import androidx.compose.Context
import androidx.compose.Model
import androidx.compose.frames.modelMapOf
import androidx.compose.onCommit

Wyświetl plik

@ -5,7 +5,7 @@ import android.graphics.Bitmap
import androidx.compose.Composable
import androidx.ui.core.ContextAmbient
import androidx.ui.core.Text
import androidx.ui.foundation.DrawImage
import androidx.ui.foundation.SimpleImage
import androidx.ui.graphics.Image
import androidx.ui.graphics.ImageConfig
import androidx.ui.graphics.NativeImage
@ -88,12 +88,12 @@ fun ChannelContent(channel: Channel = Channel("Default", 7)) {
// val image = imageResource(id = R.drawable.qrcode)
val image = AndroidImage(UIState.getChannelQR(context))
Container(modifier = LayoutGravity.Center + LayoutSize.Min(200.dp, 200.dp)) {
DrawImage(image = image)
}
//Container(modifier = LayoutGravity.Center + LayoutSize.Min(200.dp, 200.dp)) {
SimpleImage(image = image)
//}
Ripple(bounded = false) {
OutlinedButton(modifier = LayoutGravity.Center + LayoutPadding(left = 24.dp),
OutlinedButton(modifier = LayoutGravity.Center + LayoutPadding(start = 24.dp),
onClick = {
GeeksvilleApplication.analytics.track(
"share",

Wyświetl plik

@ -39,7 +39,7 @@ fun MessageCard(msg: TextMessage, modifier: Modifier = Modifier.None) {
Row(modifier = modifier) {
UserIcon(NodeDB.nodes[msg.from])
Column(modifier = LayoutPadding(left = 12.dp)) {
Column(modifier = LayoutPadding(start = 12.dp)) {
Row {
val nodes = NodeDB.nodes
@ -51,7 +51,7 @@ fun MessageCard(msg: TextMessage, modifier: Modifier = Modifier.None) {
ProvideEmphasis(emphasis = TimestampEmphasis) {
Text(
text = dateFormat.format(msg.date),
modifier = LayoutPadding(left = 8.dp),
modifier = LayoutPadding(start = 8.dp),
style = MaterialTheme.typography().caption
)
}
@ -79,8 +79,8 @@ fun MessagesContent() {
messages.forEach { msg ->
MessageCard(
msg, modifier = LayoutPadding(
left = sidePad,
right = sidePad,
start = sidePad,
end = sidePad,
top = topPad,
bottom = topPad
)

Wyświetl plik

@ -69,7 +69,7 @@ fun NodeInfoCard(node: NodeInfo) {
// Text("Node: ${it.user?.longName}")
Row(modifier = LayoutPadding(16.dp)) {
UserIcon(
modifier = LayoutPadding(left = 0.dp, top = 0.dp, right = 0.dp, bottom = 0.dp),
modifier = LayoutPadding(start = 0.dp, top = 0.dp, end = 0.dp, bottom = 0.dp),
user = node
)

Wyświetl plik

@ -1,7 +1,6 @@
package com.geeksville.mesh.ui
import androidx.compose.Composable
import androidx.compose.ambient
import androidx.compose.state
import androidx.ui.core.ContextAmbient
import androidx.ui.core.Text

Wyświetl plik

@ -2,7 +2,7 @@
buildscript {
ext.kotlin_version = '1.3.61'
ext.compose_version = '0.1.0-dev05'
ext.compose_version = '0.1.0-dev06'
repositories {
google()
jcenter()