Code example for DialogFragment

import android.view.ContextThemeWrapper; 
import android.view.View; 
import android.widget.EditText; 
public class EditNoteDialog extends DialogFragment {
    public interface EditNoteDialogListener { 
        void onFinishEditNoteDialog(final String inputText);
    public static final String ARGUMENT_INITIAL_NOTE = "initialNote";
    private EditText mEditText;
    private EditNoteDialogListener listener;
    public static EditNoteDialog newInstance(final String initialNote, EditNoteDialogListener listener) {
        EditNoteDialog dialog = new EditNoteDialog();
        Bundle arguments = new Bundle();
Connect your IDE to all the code out there  Get Codota for Java