I am testing out a sample app where I am trying to achieve displaying time and date to a specific day.Currently, it just plots to the entire month even if the event if for a day. Say if the event if from 9:30am to 10:30am on Jan 5, it will show up for the entire month, rather than just for Jan 5th. Want to achieve something like this:
Currently my app shows it for the whole month, even if its jan 1 or jan 8 event ( here's a screenshot where it wrongly shows up on the week of jan 15 for instance, even if these 2 events belong to 2 different dates):
The code I am testing out, is here : https://github.com/raghunandankavi2010/SamplesAndroid/tree/master/CalendarTest
With the only difference where in the calendar.xml class I added : app:mcv_showOtherDates="all"
under <com.prolificinteractive.materialcalendarview.MaterialCalendarView
to show a weekly view.
Also, in calendarFragment.java class there is a function called : makeJsonObjectRequest , where the StartDate is parsed, I tried parsing the startTime StartTime and EndTime and EndDate to map the event respective to the date, but that didn't do much.
String EndDate = jsonObject.getString("EndTime");
Date date = simpleDateFormat.parse(EndDate);
String title = jsonObject.getString("Title");
Log.d("EndDate ",""+date);
CalendarDay day = CalendarDay.from(date);
Event event = new Event(date,title);
cal = Calendar.getInstance();
cal.setTime(date);
int month = cal.get(Calendar.DAY_OF_THE_MONTH);
Any idea how to go about this and update the code so I can display the event respective to the day of the month and within specific time frame (as shown in the outlook screenshot(first screenshot) above), instead of the whole month? (Also, the json class i testjson.json and included in the project assets folder)
Thanks!