From bc964da1f809e8b9273b0e6bc2464ac140e96cb3 Mon Sep 17 00:00:00 2001 From: Rivu Date: Tue, 30 Jun 2020 22:56:04 +0530 Subject: [PATCH] feat: replace deprecated AdapterList with new LazyColumnItems --- .../mvijetpackcomposedemo/moviesearch/ui/MovieComposables.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/dev/rivu/mvijetpackcomposedemo/moviesearch/ui/MovieComposables.kt b/app/src/main/java/dev/rivu/mvijetpackcomposedemo/moviesearch/ui/MovieComposables.kt index 90278de..beb4b3a 100644 --- a/app/src/main/java/dev/rivu/mvijetpackcomposedemo/moviesearch/ui/MovieComposables.kt +++ b/app/src/main/java/dev/rivu/mvijetpackcomposedemo/moviesearch/ui/MovieComposables.kt @@ -7,6 +7,7 @@ import androidx.compose.state import androidx.lifecycle.LiveData import androidx.ui.core.* import androidx.ui.foundation.* +import androidx.ui.foundation.lazy.LazyColumnItems import androidx.ui.foundation.shape.corner.RoundedCornerShape import androidx.ui.graphics.Color import androidx.ui.graphics.imageFromResource @@ -204,7 +205,7 @@ fun DetailScreen(movieDetail: MovieDetail) { @Composable fun ListScreen(movieList: List, onMovieClick: (String) -> Unit) { - AdapterList(movieList) { movie -> + LazyColumnItems(movieList, modifier = Modifier.testTag("movieList")) { movie -> Box(modifier = Modifier.padding(5.dp).fillMaxWidth().heightIn(maxHeight = 150.dp).clickable(onClick = { onMovieClick(movie.imdbID) })) {