Created
August 11, 2019 22:37
-
-
Save AmaroNeto/0cc806d3980258c7bb13a108ee8af1c0 to your computer and use it in GitHub Desktop.
Classe que define o modelo de um filme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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