Domenico Giacomo Campanile

Sviluppatore e Consulente Informatico

Fragment or activity reload

Activity Reload

myActivity.finish()
            startActivity(myActivity.intent)

Fragment Reload

 val ft: FragmentTransaction =
                myFragment.fragmentManager!!.beginTransaction()
            ft.detach(myFragment).attach(myFragment).commit()