To refresh the current Android Fragment you can use the snippet below. The code must be placed inside the Fragment that needs to be updated. The snippet will call the onCreateView Method of the Fragment.

Samples

Sample Java

getFragmentManager().beginTransaction().detach(this).attach(this).commit();

If you have any questions or suggestions feel free to rate this snippet, post a comment or Contact Us via Email.

Related links:

4 thought on “How to refresh the current Android Fragment”

Leave a Reply