I looked intensively on google, and here to find good code that works to show current date i've been through a few of the suggested questions, but they don't work to show the CURRENT date for the day the app runs. As well as I am doing the same for the current time. My goal is to basically be able to by tapping a textview of either DATE, or TIME, the user can then change the time to reflect what they choose. Then return that date/time chosen and return it to reflect in the textview.
The part I need help with is getting the current actual date of the app being opened, as well as the time separately.
Here is my code....
Date curDate = new Date();
SimpleDateFormat format = new SimpleDateFormat("EE, MM DD, yyyy");
String DateToStr = format.format(curDate);
Trying to get the output string to show in a textview which does work. I want to show the short hand of both Day of the week, and the month. I am thinking I might need a locale, but I am just not familiar with this.
Would appreciate some up to date code. Or even a tutorial that is up to date that I can follow. I believe i can figure out how to get the picker data after the user selects their date/time, but I am just having a hard time showing the picker when the user selects the textview. I can show it via OnClickListener but I tried Google's example of pickers and that didn't work. My code still came up with errors for the getSupportFragmentManger(). I am doing all of this code in a Fragment, Activity. NOT to be mistaken for a FRAGMENTACTIVITY.