Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to restart activity from fragment?

I have a MainActivity which has a navigation drawer. If I select an item in the navigation drawer, it launches a dialog fragment FragmentA. Now, if I change a few things in FragmentA, I want MainActivity to reflect the new changes once FragmentA is dismissed. What is the best way to restart MainActivity from FragmentA?

like image 611
Sammys Avatar asked Oct 12 '15 23:10

Sammys


1 Answers

use this code

getActivity().recreate();
like image 58
Hendro Pramono Avatar answered Oct 10 '22 13:10

Hendro Pramono