Skip to content

Instantly share code, notes, and snippets.

@antew
Created February 10, 2013 06:19
Show Gist options
  • Save antew/4748606 to your computer and use it in GitHub Desktop.
Save antew/4748606 to your computer and use it in GitHub Desktop.
private static final String USERNAME = "Username";
...
public static LogoutDialogFragment newInstance(String username) {
LogoutDialogFragment fragment = new LogoutDialogFragment();
// Add the username to the bundle of arguments for the fragment
Bundle args = new Bundle();
args.putString(USERNAME, username);
fragment.setArguments(args);
return fragment;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment