Search in sources :

Example 6 with TimePickerDialog

use of com.wdullaer.materialdatetimepicker.time.TimePickerDialog in project haven by guardianproject.

the class MonitorActivity method showTimeDelayDialog.

private void showTimeDelayDialog() {
    int totalSecs = preferences.getTimerDelay();
    int hours = totalSecs / 3600;
    int minutes = (totalSecs % 3600) / 60;
    int seconds = totalSecs % 60;
    TimePickerDialog mTimePickerDialog = TimePickerDialog.newInstance(this, hours, minutes, seconds, true);
    mTimePickerDialog.enableSeconds(true);
    mTimePickerDialog.show(getFragmentManager(), "TimePickerDialog");
}
Also used : TimePickerDialog(com.wdullaer.materialdatetimepicker.time.TimePickerDialog)

Aggregations

TimePickerDialog (com.wdullaer.materialdatetimepicker.time.TimePickerDialog)6 Calendar (java.util.Calendar)3 View (android.view.View)2 Button (android.widget.Button)2 TextView (android.widget.TextView)2 Fragment (android.app.Fragment)1 FragmentManager (android.app.FragmentManager)1 FragmentTransaction (android.app.FragmentTransaction)1 DialogInterface (android.content.DialogInterface)1 Color (android.graphics.Color)1 Bundle (android.os.Bundle)1 Log (android.util.Log)1 LayoutInflater (android.view.LayoutInflater)1 ViewGroup (android.view.ViewGroup)1 CheckBox (android.widget.CheckBox)1 NonNull (androidx.annotation.NonNull)1 Fragment (androidx.fragment.app.Fragment)1 DatePickerDialog (com.wdullaer.materialdatetimepicker.date.DatePickerDialog)1 Timepoint (com.wdullaer.materialdatetimepicker.time.Timepoint)1