If next button ID in the layout is "next" then you can make it like this:
val fragment = NextFragment()
next.setOnClickListener {
supportFragmentManager.beginTransaction().replace(R.id.fragmentContainer, fragment).commit()
}
Where "fragmentContainer" (which is FrameLayout view) is the layout ID of the container where your fragments will be placed.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments