Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@KaustubhPatange
Created November 18, 2021 09:59
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 KaustubhPatange/fc0f3cecdf6e9d60a1b08856e1b7bed0 to your computer and use it in GitHub Desktop.
Save KaustubhPatange/fc0f3cecdf6e9d60a1b08856e1b7bed0 to your computer and use it in GitHub Desktop.
// 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