public DateTimeEditor init(@NonNull final TextView dateView, @Nullable final TextView timeView, @Nullable final View resetButton, @NonNull final FragmentManager fragmentManager) {

        this.dateButton = dateView;
        this.timeButton = timeView;
        this.resetButton = resetButton;
        this.fragmentManager = fragmentManager;
        this.date = Calendar.getInstance();

        this.dateButton.setOnClickListener(new DateListener());
        this.dateButton.setOnLongClickListener(new DateLongListener());
        if (this.timeButton != null) {
            this.timeButton.setOnClickListener(new TimeListener());
        }
        if (this.resetButton != null) {
            this.resetButton.setOnClickListener(new ResetListener());
        }
        triggerChange();
        return this;
    }
Initializes the instance. Typically called in an activities 'onCreate' method.

@param dateView        textview to use for date display and picker handling. Usually this is a text button
@param timeView        textview to use for time display and picker handling. Might be null
@param resetButton     view to use for resetting the date. Might be null
@param fragmentManager manager to use for creating sub dialogs (date picker)
main/src/main/java/cgeo/geocaching/ui/DateTimeEditor.java