Skip to content

Instantly share code, notes, and snippets.

@canergulgec
Created January 24, 2021 21:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save canergulgec/e272ed6ee5cf1b2ab3ed477a64a81997 to your computer and use it in GitHub Desktop.
Save canergulgec/e272ed6ee5cf1b2ab3ed477a64a81997 to your computer and use it in GitHub Desktop.
class MovieScreen : Screen<MovieScreen>() {
val recycler = KRecyclerView({ withId(R.id.moviesRv) }, itemTypeBuilder = {
itemType(MovieScreen::Item)
})
class Item(parent: Matcher<View>) : KRecyclerItem<Item>(parent) {
val image: KImageView = KImageView(parent) { withId(R.id.movieIv) }
val name: KTextView = KTextView(parent) { withId(R.id.movieName) }
val rating: KRatingBar = KRatingBar(parent) { withId(R.id.movieRatingBar) }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment