Created
September 23, 2015 07:41
-
-
Save orhanobut/df46fae72878be2bd81e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyFragment extends Fragment { | |
private static final String KEY_NAME = "KEY_NAME"; | |
public static Fragment newFragment(String name) { | |
Fragment fragment = new MyFragment(); | |
Bundle bundle = new Bundle(); | |
bundle.putExtra(KEY_NAME, name); | |
fragment.setArguments(bundle); | |
return fragment; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment