Created
March 1, 2017 19:46
-
-
Save josedlpozo/18b3325a84d9697e10120eaa88901d83 to your computer and use it in GitHub Desktop.
'Kotlin mutante subjects interface'
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
interface SubjectsListView : LoadingView { | |
val adapter: Adapter<SubjectViewModel> | |
val ctx: Context | |
fun showSubjects(subjects: SubjectsViewModel) { | |
adapter.clearAll() | |
adapter.addAll(subjects) | |
adapter.notifyDataSetChanged() | |
} | |
fun showMoreSubjects(subjects: SubjectsViewModel) { | |
adapter.addAll(subjects) | |
adapter.notifyDataSetChanged() | |
} | |
fun goToSubjectDetail(subject: SubjectViewModel) { | |
SubjectDetailActivity.open(ctx, subject) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment