• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Is it possible to set up a CalendarView by just getting a JSON Array (Converted into Calendar-Format

Is it possible to Convert the JSON-Data and put it into a CalendarView

  • Yes sure it is!!!

    Votes: 0 0.0%
  • No it's not!!!

    Votes: 0 0.0%

  • Total voters
    0

Criinx

Lurker
I have a ListView which is receiving Data from JSON.

That looks like this:

m6IwR.png


Now my question is to set up this ListView to get this data into my calendar.

What I mean by that is just to scroll this ListView and getting the right date into the calendar.

Something like this:

lu3q2.png


Can I just convert the JSON-Data into CalendarDateFormat and parse it with calendar-scroll or something like that. Is it possible?

This is my code for the example:

Java:
try {
                        jsonArray = new JSONArray(FinalJsonResult);
                        JSONObject jsonObject;
                        Subject subject;

                        SubjectFullFormList = new ArrayList<Subject>();

                        for (int i = 0; i < jsonArray.length(); i++){
                            subject = new Subject();
                            jsonObject = jsonArray.getJSONObject(i);

                            subject.Subject_Name = jsonObject.getString("schift") + " " + jsonObject.getString("remark");
                            subject.Subject_Full_Form = jsonObject.getString("schift_s");
                            subject.Subject_Start_Date = jsonObject.getString("s_start");
                            subject.Subject_End_Date = jsonObject.getString("s_end");
                            SubjectFullFormList.add(subject);
 
Back
Top Bottom