Skip to content

Commit

Permalink
feat: replace deprecated AdapterList with new LazyColumnItems
Browse files Browse the repository at this point in the history
  • Loading branch information
RivuChk committed Jun 30, 2020
1 parent 6223dfe commit bc964da
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -204,7 +205,7 @@ fun DetailScreen(movieDetail: MovieDetail) {

@Composable
fun ListScreen(movieList: List<Movie>, 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)
})) {
Expand Down

0 comments on commit bc964da

Please sign in to comment.