{"action":"closed","issue":{"url":"https://api.github.com/repos/Applandeo/Material-Calendar-View/issues/45","repository_url":"https://api.github.com/repos/Applandeo/Material-Calendar-View","labels_url":"https://api.github.com/repos/Applandeo/Material-Calendar-View/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/Applandeo/Material-Calendar-View/issues/45/comments","events_url":"https://api.github.com/repos/Applandeo/Material-Calendar-View/issues/45/events","html_url":"https://github.com/Applandeo/Material-Calendar-View/issues/45","id":294379476,"number":45,"title":"How to add events from firebase database","user":{"login":"SimonPeter1909","id":24413796,"avatar_url":"https://avatars1.githubusercontent.com/u/24413796?v=4","gravatar_id":"","url":"https://api.github.com/users/SimonPeter1909","html_url":"https://github.com/SimonPeter1909","followers_url":"https://api.github.com/users/SimonPeter1909/followers","following_url":"https://api.github.com/users/SimonPeter1909/following{/other_user}","gists_url":"https://api.github.com/users/SimonPeter1909/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonPeter1909/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonPeter1909/subscriptions","organizations_url":"https://api.github.com/users/SimonPeter1909/orgs","repos_url":"https://api.github.com/users/SimonPeter1909/repos","events_url":"https://api.github.com/users/SimonPeter1909/events{/privacy}","received_events_url":"https://api.github.com/users/SimonPeter1909/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-05T12:41:33Z","updated_at":"2018-02-19T12:24:24Z","closed_at":"2018-02-19T12:24:24Z","author_association":"NONE","body":"I have been trying to add events to the calender with data from the firebase. And I have been using the below method, but my results are negative... \r\n**global variables :**\r\n```\r\n//widgets\r\n    private CalendarView calendarView;\r\n    private List<EventDay> eventDays = new ArrayList<>();\r\n    private Calendar calendar = Calendar.getInstance();\r\n    private SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy\", Locale.ENGLISH);\r\n```\r\n**method:**\r\n```\r\nnodes.getNodeDailyList().child(\"dateList\").addValueEventListener(new ValueEventListener() {\r\n            @Override\r\n            public void onDataChange(DataSnapshot dataSnapshot) {\r\n                for (DataSnapshot dataSnapshot1: dataSnapshot.getChildren()){\r\n                    String date = dataSnapshot1.getValue(String.class).replace(\",\",\"/\");\r\n                    Log.d(TAG, \"onDataChange: stringDate = \" + date);\r\n                    try {\r\n                        calendar.setTime(sdf.parse(date));\r\n                        eventDays.add(new EventDay(calendar,R.drawable.ic_add));\r\n                        calendarView.setEvents(eventDays);\r\n                    } catch (ParseException e) {\r\n                        e.printStackTrace();\r\n                    }\r\n                }\r\n                sweetAlertDialog.dismissWithAnimation();\r\n            }\r\n\r\n            @Override\r\n            public void onCancelled(DatabaseError databaseError) {\r\n\r\n            }\r\n        });\r\n```\r\n**log:**\r\n`02-05 18:10:49.400 19698-19698/trickandroid.cablevasul D/FragmentDailyList: onDataChange: stringDate = 05/02/2018`\r\n\r\n"}}
{"actor":{"display_login":"SimonPeter1909"}}