How to refresh the current Android Fragment

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.


Sample Java

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

Related links:

How to reload a ViewController in IOS using Objective-C

To reload a UITableViewController in IOS using Objective-C you can simply use the reloadData method of the ViewController.

//MyTablViewController is a UITableViewController
[MyTableViewController.tableView reloadData]