Skip to content

Instantly share code, notes, and snippets.

@AmaroNeto
Created August 11, 2019 22:37
Show Gist options
  • Save AmaroNeto/0cc806d3980258c7bb13a108ee8af1c0 to your computer and use it in GitHub Desktop.
Save AmaroNeto/0cc806d3980258c7bb13a108ee8af1c0 to your computer and use it in GitHub Desktop.
Classe que define o modelo de um filme
class Movie(
val title: String,
val year: Int,
val director: String,
val studio: String): AdapterObject {
override fun layoutId(): Int {
return R.layout.movie_item_list
}
override fun isFilterable(filter: String): Boolean {
return title.toLowerCase().contains(filter) ||
year.toString().toLowerCase().contains(filter) ||
director.toLowerCase().contains(filter) ||
studio.toLowerCase().contains(filter)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment