Tasks/src/main/java/com/dummies/tasks/fragment/TaskEditFragment.java
private void updateDateAndTimeButtons() {
        // Set the time button text
        DateFormat timeFormat =
                DateFormat.getTimeInstance(DateFormat.SHORT);
        String timeForButton = timeFormat.format(
                taskDateAndTime.getTime());
        timeButton.setText(timeForButton);

        // Set the date button text
        DateFormat dateFormat = DateFormat.getDateInstance();
        String dateForButton = dateFormat.format(
                taskDateAndTime.getTime());
        dateButton.setText(dateForButton);
    }
/**
     * Call this method whenever the task's date/time has changed and
     * we need to update our date and time buttons.
     */
Call this method whenever the task's date/time has changed and
we need to update our date and time buttons.
Call this method whenever the task ' s date / time has changed and we need to update our date and time buttons .
private void updateDateAndTimeButtons() {
        DateFormat timeFormat =
                DateFormat.getTimeInstance(DateFormat.SHORT);
        String timeForButton = timeFormat.format(
                taskDateAndTime.getTime());
        timeButton.setText(timeForButton);
        DateFormat dateFormat = DateFormat.getDateInstance();
        String dateForButton = dateFormat.format(
                taskDateAndTime.getTime());
        dateButton.setText(dateForButton);
    }
private void updateDateAndTimeButtons ( ) { DateFormat timeFormat = DateFormat . getTimeInstance ( DateFormat . SHORT ) ; String timeForButton = timeFormat . format ( taskDateAndTime . getTime ( ) ) ; timeButton . setText ( timeForButton ) ; DateFormat dateFormat = DateFormat . getDateInstance ( ) ; String dateForButton = dateFormat . format ( taskDateAndTime . getTime ( ) ) ; dateButton . setText ( dateForButton ) ; }
Call this method whenever the task's date/time has changed and
 we need to update our date and time buttons.
Call this method whenever the task ' s date / time has changed and we need to update our date and time buttons .
// Set the time button text // Set the date button text