Skip to content

Instantly share code, notes, and snippets.

@KaustubhPatange
Last active November 23, 2021 10:48
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/54bb59a32758b76dff850e0c656a0aae to your computer and use it in GitHub Desktop.
Save KaustubhPatange/54bb59a32758b76dff850e0c656a0aae to your computer and use it in GitHub Desktop.
// modify the existing one from the :home module
class HomeInternalButtonClickedImpl @Inject constructor(
// @HomeQualifier will correctly route this to our provider defined in `HomeDependencyModule` to provide
// the required instance of HomeFragment from Activity's backstack.
@HomeQualifier private val fragment: HomeFragment,
) : HomeInternalButtonClicked {
override fun goToNext() {
fragment.childFragmentManager.beginTransaction()
.addToBackStack("home-internal2")
.replace(R.id.frag_container, HomeInternal2Fragment::class.java, null)
.commit()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment