예제 #1
0
 public static NewPostFragment newInstance(String text) {
   NewPostFragment fragment = new NewPostFragment();
   Bundle args = new Bundle();
   args.putString(ARG_TEXT, text);
   fragment.setArguments(args);
   return fragment;
 }
예제 #2
0
 public static NewPostFragment newInstance(boolean isPrivate) {
   NewPostFragment fragment = new NewPostFragment();
   Bundle args = new Bundle();
   args.putBoolean(ARG_PRIVATE, isPrivate);
   fragment.setArguments(args);
   return fragment;
 }
예제 #3
0
 public static NewPostFragment newInstance(ArrayList<Parcelable> images, String mime) {
   NewPostFragment fragment = new NewPostFragment();
   Bundle args = new Bundle();
   args.putParcelableArrayList(ARG_IMAGES, images);
   args.putString(ARG_MIME, mime);
   fragment.setArguments(args);
   return fragment;
 }
예제 #4
0
 public static NewPostFragment newInstanceForEdit(
     String id, String text, String[] tags, boolean isPrivate) {
   NewPostFragment fragment = new NewPostFragment();
   Bundle args = new Bundle();
   args.putString(ARG_ID, id);
   args.putString(ARG_TEXT, text);
   args.putStringArray(ARG_TAGS, tags);
   args.putBoolean(ARG_PRIVATE, isPrivate);
   fragment.setArguments(args);
   return fragment;
 }