Skip to content

Instantly share code, notes, and snippets.

@marcherdiego
Created July 29, 2020 21:37
Show Gist options
  • Save marcherdiego/6a7596c152deba5309e9f6b4d2b5aadc to your computer and use it in GitHub Desktop.
Save marcherdiego/6a7596c152deba5309e9f6b4d2b5aadc to your computer and use it in GitHub Desktop.
class MainView(activity: MainActivity, private val bus: EventBus) {
private val activityRef = WeakReference(activity)
init {
activity.findViewById<View>(R.id.someButton_id).setOnClickListener {
bus.post(SomeKindOfEvent())
}
}
class SomeKindOfEvent
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment