Пример #1
0
  public static EditEventFragment newInstance() {
    EditEventFragment f = new EditEventFragment();

    Bundle args = new Bundle();
    args.putBoolean("new", true);
    f.setArguments(args);

    return f;
  }
Пример #2
0
  public static EditEventFragment newInstance(Event event) {
    EditEventFragment f = new EditEventFragment();

    Bundle args = new Bundle();
    args.putBoolean("new", false);
    args.putString("name", event.getName());
    args.putString("info", event.getInfo());
    args.putLong("startTime", event.getStartTime().getTime());
    args.putLong("endTime", event.getEndTime().getTime());
    args.putInt("role", event.getRole());
    args.putInt("hackathon_id", event.getHackathon_id());
    args.putInt("location_id", event.getLocation_id());
    args.putInt("id", event.getId());
    f.setArguments(args);

    return f;
  }