Skip to content

Instantly share code, notes, and snippets.

@Zhuinden
Last active November 27, 2019 19:17
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 Zhuinden/fb0ebe1e114d94a642be836ad94b11c4 to your computer and use it in GitHub Desktop.
Save Zhuinden/fb0ebe1e114d94a642be836ad94b11c4 to your computer and use it in GitHub Desktop.
Anemic Repository 1
class MyFragment: Fragment(), MyView.Listener {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
myView.listener = this
}
override fun onDestroyView() {
super.onDestroyView()
myView.listener = null
}
override fun onButtonPressed() { ... }
override fun onTextChanged(text: String) { ... }
override fun onCheckBoxTicked() { ... }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment