Compose alpha08 + Kotlin 1.4.20

This commit is contained in:
John O'Reilly 2020-12-02 19:40:58 +00:00
parent 4395ed1ade
commit e5a6de1e67
4 changed files with 13 additions and 13 deletions

View file

@ -21,7 +21,7 @@ android {
}
composeOptions {
kotlinCompilerVersion = "1.4.0"
kotlinCompilerVersion = "1.4.20"
kotlinCompilerExtensionVersion = Versions.compose
}

View file

@ -20,11 +20,11 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.setContent
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.tooling.preview.PreviewParameter
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.navigation.compose.*
import androidx.ui.tooling.preview.Preview
import androidx.ui.tooling.preview.PreviewParameter
import com.surrus.common.remote.Assignment
import com.surrus.common.remote.IssPosition
import com.surrus.common.repository.getLogger
@ -108,7 +108,7 @@ fun PersonList(peopleInSpaceViewModel: PeopleInSpaceViewModel, personSelected :
@Composable
fun ISSPosition(issPosition: IssPosition) {
Text(text = "ISS Position = (${issPosition.latitude}, ${issPosition.longitude})",
Modifier.padding(16.dp) + Modifier.fillMaxWidth(),
Modifier.padding(16.dp).fillMaxWidth(),
textAlign = TextAlign.Center,
style = typography.h6)
@ -119,8 +119,8 @@ fun ISSPosition(issPosition: IssPosition) {
@Composable
fun PersonView(personImageUrl: String, person: Assignment, personSelected : (person : Assignment) -> Unit) {
Row(
modifier = Modifier.fillMaxWidth() + Modifier.clickable(onClick = { personSelected(person) })
+ Modifier.padding(16.dp), verticalAlignment = Alignment.CenterVertically
modifier = Modifier.fillMaxWidth().clickable(onClick = { personSelected(person) })
.padding(16.dp), verticalAlignment = Alignment.CenterVertically
) {
if (personImageUrl.isNotEmpty()) {
@ -152,7 +152,7 @@ fun PersonDetailsView(peopleInSpaceViewModel: PeopleInSpaceViewModel, personName
)
},
bodyContent = {
ScrollableColumn(modifier = Modifier.padding(16.dp) + Modifier.fillMaxWidth(),
ScrollableColumn(modifier = Modifier.padding(16.dp).fillMaxWidth(),
horizontalAlignment = Alignment.CenterHorizontally
) {

View file

@ -1,6 +1,6 @@
package com.surrus.peopleinspace.ui
import androidx.ui.tooling.preview.datasource.CollectionPreviewParameterProvider
import androidx.compose.ui.tooling.preview.datasource.CollectionPreviewParameterProvider
import com.surrus.common.remote.Assignment
class PersonProvider : CollectionPreviewParameterProvider<Assignment>(

View file

@ -1,6 +1,6 @@
object Versions {
const val kotlin = "1.4.10"
const val kotlin = "1.4.20"
const val kotlinCoroutines = "1.4.2-native-mt"
const val ktor = "1.4.0"
const val kotlinxSerialization = "1.0.0-RC"
@ -10,9 +10,9 @@ object Versions {
const val sqliteJdbcDriver = "3.30.1"
const val slf4j = "1.7.30"
const val compose = "1.0.0-alpha07"
const val nav_compose = "1.0.0-alpha02"
const val accompanist = "0.3.3.1"
const val compose = "1.0.0-alpha08"
const val nav_compose = "1.0.0-alpha03"
const val accompanist = "0.4.0"
const val junit = "4.13"
const val testRunner = "1.3.0"
@ -36,7 +36,7 @@ object Test {
object Compose {
const val ui = "androidx.compose.ui:ui:${Versions.compose}"
const val uiGraphics = "androidx.compose.ui:ui-graphics:${Versions.compose}"
const val uiTooling = "androidx.ui:ui-tooling:${Versions.compose}"
const val uiTooling = "androidx.compose.ui:ui-tooling:${Versions.compose}"
const val foundationLayout = "androidx.compose.foundation:foundation-layout:${Versions.compose}"
const val material = "androidx.compose.material:material:${Versions.compose}"
const val runtimeLiveData = "androidx.compose.runtime:runtime-livedata:${Versions.compose}"