Im getting an error on DatePickerDialog.show(); and TimePickerDialog.show(); Both .show are underlined in red. Compiler states that non static method show cannot be referenced from a static context Any clue?
DatePickerDialog.show(); should be datePickerDialog.show(); notice the lowercase letter at the start of the variable. same for the TimePickerDialog.show()
I spent almost 2 hours trying to find the error, looked at stackoverflow, android developers site, google, etc.. and it was just a lowercase. Thank you so much! Is it possible to use this code to set a reminder? I'm building a notepad app, and I want to use this date/time picker to set reminders.
Thank you... It got resolved.. Still 1 more.. I get following .. Error:(64, 128) error: cannot find symbol method is24HourFormat(MainActivity).. Can you tell? I search on google but no any good point..
Thank you. It is done now and works on the Phone... In my case the date,time,month,year view is in the corner and not in the middle. if you can comment on that!!
Thank you. It is done now and works on the Phone... In my case the date,time,month,year view is in the corner and not in the middle. if you can comment on that!!
Could you please tell me how can I save the "tv_result" in my firebase database, and how to prevent two users to pick same date and time. "if one person picked date and time this will be unavailable for other (conflict another person will be served)". You did great code.. Many thanks
I followed exactly your video, but after click choose date and click ok, the timeDialog doesn't appear and the dateDialog just closes and didn't nothing, please help :(
you should create a custom class that extends time picker and date picker and then in your main activity create two instances of this class. it's more advanced stuff but if you know java, nothing special.
import "import android.text.format.DateFormat;" instead of "import android.icu.text.DateFormat;" or "import java.text.DateFormat;" more info: stackoverflow.com/questions/41507754/cannot-resolve-method-dateformat-is24hourformat-in-timepickerdialog learn to search google for errors!
why my TimePickerDialog timePickerDialog = new TimePickerDialog(MainActivity.this, MainActivity.this, hour, minute, DateFormat.is24HourFormat(this)); timePickerDialog.show(); the DateFormat.is24HourFormat did'nt correct by the Android studio its not show after i type DateFormat.
master i have a Error when i click Pick button its turn to Unfortunately stop :( whats wrong to my work can i have your source code :( please for my thesis right now. my thesis is a Mobile secretary that notif and alarm your schedule save it from sqlite database can you please help me.
Si no les aparece el methodo DateFormat.is24HourFormat en TimePickerDIalog Importar import android.text.format.DateFormat; en vez de import android.icu.text.DateFormat; (ELIMINAR)