Skip to content

Instantly share code, notes, and snippets.

@KaustubhPatange
Created November 18, 2021 09:59
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
// in :welcome module
@AndroidEntryPoint
class WelcomeFragment : Fragment(R.layout.fragment_welcome) {
@Inject lateinit var welcomeButtonClick: WelcomeButtonClick // <-- Injected (provides WelcomeButtonClickImpl)
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
...
val button = view.findViewById<Button>(R.id.btn)
button.setOnClickListener {
welcomeButtonClick.goToNext() // <-- Navigating to "HomeFragment"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment