diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 123439f..6b4a33e 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -21,7 +21,7 @@ android { } composeOptions { - kotlinCompilerVersion = "1.4.0" + kotlinCompilerVersion = "1.4.20" kotlinCompilerExtensionVersion = Versions.compose } diff --git a/app/src/main/java/com/surrus/peopleinspace/ui/MainActivity.kt b/app/src/main/java/com/surrus/peopleinspace/ui/MainActivity.kt index ee05716..564e7c7 100644 --- a/app/src/main/java/com/surrus/peopleinspace/ui/MainActivity.kt +++ b/app/src/main/java/com/surrus/peopleinspace/ui/MainActivity.kt @@ -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 ) { diff --git a/app/src/main/java/com/surrus/peopleinspace/ui/PersonData.kt b/app/src/main/java/com/surrus/peopleinspace/ui/PersonData.kt index 525bdd0..ffe7642 100644 --- a/app/src/main/java/com/surrus/peopleinspace/ui/PersonData.kt +++ b/app/src/main/java/com/surrus/peopleinspace/ui/PersonData.kt @@ -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( diff --git a/buildSrc/src/main/java/Dependencies.kt b/buildSrc/src/main/java/Dependencies.kt index 0f06e33..ee884c4 100644 --- a/buildSrc/src/main/java/Dependencies.kt +++ b/buildSrc/src/main/java/Dependencies.kt @@ -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}"