Skip to content

Instantly share code, notes, and snippets.

@andremion
Created July 18, 2017 09:16
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 andremion/6ada5def40cc1700aa166affb4acfe21 to your computer and use it in GitHub Desktop.
Save andremion/6ada5def40cc1700aa166affb4acfe21 to your computer and use it in GitHub Desktop.
@Override
public void finishAfterTransition() {
setResult();
super.finishAfterTransition();
}
private void setResult() {
int position = mViewPager.getCurrentItem();
Intent data = new Intent();
data.putExtra(EXTRA_POSITION, position);
setResult(RESULT_OK, data);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment