Tasks/src/main/java/com/dummies/tasks/fragment/TaskEditFragment.java
private void showDatePicker() {
        // Create a fragment transaction
        FragmentTransaction ft = getFragmentManager().beginTransaction();

        // Create the DatePickerDialogFragment and initialize it with
        // the appropriate values.
        DatePickerDialogFragment newFragment =
                DatePickerDialogFragment.newInstance( taskDateAndTime );

        // Show the dialog, and name it "datePicker".  By naming it,
        // Android can automatically manage its state for us if it
        // needs to be killed and recreated.
        newFragment.show(ft, "datePicker");
    }
/**
     * A helper method to show our Date picker
     */
A helper method to show our Date picker
A helper method to show our Date picker
private void showDatePicker() {
        FragmentTransaction ft = getFragmentManager().beginTransaction();
        DatePickerDialogFragment newFragment =
                DatePickerDialogFragment.newInstance( taskDateAndTime );
        newFragment.show(ft, "datePicker");
    }
private void showDatePicker ( ) { FragmentTransaction ft = getFragmentManager ( ) . beginTransaction ( ) ; DatePickerDialogFragment newFragment = DatePickerDialogFragment . newInstance ( taskDateAndTime ) ; newFragment . show ( ft , "datePicker" ) ; }
A helper method to show our Date picker
A helper method to show our Date picker
// Create a fragment transaction // Create the DatePickerDialogFragment and initialize it with // the appropriate values. // Show the dialog, and name it "datePicker".  By naming it, // Android can automatically manage its state for us if it // needs to be killed and recreated.