Skip to content

Instantly share code, notes, and snippets.

@josedlpozo
Created March 1, 2017 15:07
Show Gist options
  • Save josedlpozo/a6741e7add4fc7533f98906e0f612ff2 to your computer and use it in GitHub Desktop.
Save josedlpozo/a6741e7add4fc7533f98906e0f612ff2 to your computer and use it in GitHub Desktop.
'Koltin mutante interface'
interface ProfessorsListView : LoadingView {
val adapter: Adapter<ProfessorViewModel>
val ctx: Context
fun showProfessors(professors: ProfessorsViewModel) {
adapter.clearAll()
adapter.addAll(professors)
adapter.notifyDataSetChanged()
}
fun goToProfessorDetail(professor: ProfessorViewModel) {
ProfessorDetailActivity.open(ctx, professor.name, professor.objectId)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment