i get an error...
Error:Error: This fragment should provide a default constructor (a public constructor with no arguments) (com.jdpm.pmn.perfectmaterialnotes.fragments.NoteEditDialogFragment) [ValidFragment]
public class NoteEditDialogFragment extends DialogFragment implements OnClickListener{
private EditText mTitleText;
private EditText mBodyText;
private Long mRowId = null;
private NotesDbAdapter mDbHelper;
private boolean newNote = true;
private Spinner mCategorySpinner;
private String noteText = "";
private Button mSaveButton;
private Button mCancelButton;
public NoteEditDialogFragment(boolean b) {
this.newNote = b;
}
public static NoteEditDialogFragment newInstance(boolean b) {
return new NoteEditDialogFragment(b);
}
public static NoteEditDialogFragment newInstance() {
return new NoteEditDialogFragment(true);
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setStyle(DialogFragment.STYLE_NO_FRAME, R.style.Theme_Rymatenotes_Dialog);
mDbHelper = new NotesDbAdapter(this.getActivity());
mDbHelper.open();
how can i change this that the error message doesn't come?
public NoteEditDialogFragment(boolean b) {
this.newNote = b;
}
public static NoteEditDialogFragment newInstance(boolean b) {
return new NoteEditDialogFragment(b);
}
public static NoteEditDialogFragment newInstance() {
return new NoteEditDialogFragment(true);
}