Skip to content

Instantly share code, notes, and snippets.

@sonnguyen0310
Last active October 19, 2017 16:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sonnguyen0310/db7d669c4d75e444904f36298d0fdfe3 to your computer and use it in GitHub Desktop.
Save sonnguyen0310/db7d669c4d75e444904f36298d0fdfe3 to your computer and use it in GitHub Desktop.
Get current child fragment in viewpager
if (pageAdapter != null && viewpager != null && pageAdapter.instantiateItem(viewpager, viewpager.getCurrentItem()) instanceof Reloadable) {
((Reloadable) pageAdapter.get().instantiateItem(viewpager, viewpager.getCurrentItem())).reload();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment