diff --git a/app/src/androidTest/java/com/example/jetpack_compose_all_in_one/lessons/lesson_9/NumberScreenTest.kt b/app/src/androidTest/java/com/example/jetpack_compose_all_in_one/lessons/lesson_9/NumberScreenTest.kt index f4d5a6d6..0e1d586e 100644 --- a/app/src/androidTest/java/com/example/jetpack_compose_all_in_one/lessons/lesson_9/NumberScreenTest.kt +++ b/app/src/androidTest/java/com/example/jetpack_compose_all_in_one/lessons/lesson_9/NumberScreenTest.kt @@ -14,7 +14,6 @@ import org.junit.Test class NumberScreenTest { - @get:Rule val composeTestRule = createComposeRule() diff --git a/app/src/main/java/com/example/jetpack_compose_all_in_one/lessons/lesson_5/Lesson_5_Chapter_2_Map_Type.kt b/app/src/main/java/com/example/jetpack_compose_all_in_one/lessons/lesson_5/Lesson_5_Chapter_2_Map_Type.kt index 59c24daa..46fc6b89 100644 --- a/app/src/main/java/com/example/jetpack_compose_all_in_one/lessons/lesson_5/Lesson_5_Chapter_2_Map_Type.kt +++ b/app/src/main/java/com/example/jetpack_compose_all_in_one/lessons/lesson_5/Lesson_5_Chapter_2_Map_Type.kt @@ -7,7 +7,7 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.runtime.Composable import androidx.compose.runtime.derivedStateOf -import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.mutableIntStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.ui.Modifier @@ -40,10 +40,10 @@ private fun LessonContent() { Constants.MAP_DEFAULT_ZOOM_1 ) } - val currentPage = rememberSaveable { mutableStateOf(0) } + val currentPage = rememberSaveable { mutableIntStateOf(0) } val mapType = remember { derivedStateOf { - when (currentPage.value) { + when (currentPage.intValue) { 1 -> MapType.NORMAL 2 -> MapType.SATELLITE 3 -> MapType.HYBRID @@ -61,7 +61,8 @@ private fun LessonContent() { Modifier .fillMaxSize() .background(PAGER_BACKGROUND) - .padding(it)) { + .padding(it) + ) { LessonHeader( stringArrayResource(R.array.l5c2_header_text)[currentPage.value], Modifier