open a new fragment from another fragment code example
Example: open new fragment from fragment
button.setOnClickListener {
activity!!
.supportFragmentManager
.beginTransaction()
.replace(R.id.container, NewFragment.newInstance())
.commitNow()
}