Skip to content

Instantly share code, notes, and snippets.

@saturov
Created August 24, 2015 18:37
Show Gist options
  • Save saturov/292c5ef504cc55940a03 to your computer and use it in GitHub Desktop.
Save saturov/292c5ef504cc55940a03 to your computer and use it in GitHub Desktop.
public class TextFragment extends Fragment {
private static final String ARG_TEXT = "arg_text";
public static TextFragment newInstance(String text) {
TextFragment textFragment = new TextFragment();
Bundle bundle = new Bundle();
bundle.putString(ARG_TEXT, text);
textFragment.setArguments(bundle);
return textFragment;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment