Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }