Skip to content

Instantly share code, notes, and snippets.

@KaustubhPatange
Created November 18, 2021 12:37
Show Gist options
  • Save KaustubhPatange/b53ced6007fc67ec37d0a3572e0b868e to your computer and use it in GitHub Desktop.
Save KaustubhPatange/b53ced6007fc67ec37d0a3572e0b868e to your computer and use it in GitHub Desktop.
// in :home-internal module,
// use the interface on the site where required
@AndroidEntryPoint
class HomeInternalFragment : Fragment(R.layout.fragment_home_internal) {
@Inject lateinit var homeInternalButtonClicked: HomeInternalButtonClicked // <-- Provide our `HomeInternalButtonClickedImpl`
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
...
val btnGoto = view.findViewById<Button>(R.id.btn_goto)
btnGoto.setOnClickListener {
homeInternalButtonClicked.goToNext() // <-- Navigate to `HomeInternal2Fragment` of :home-internal2 module
}
...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment