Jainendra
Jainendra

Reputation: 25153

Create a calendar with precreated events

I want to create a calendar view which will have pre-created events(to come from the DB). Also I would be able to create events on each date with event duration. Is there any library(paid or free) or open source project to do so?

Upvotes: 1

Views: 133

Answers (1)

Srikanth Roopa
Srikanth Roopa

Reputation: 1790

I create simple DayView calendar github and for Monthview Implementation u can check out this Link you can modify this to display the events from the DB() make db calls in the below method create a hashmap and get the corresponding value in getView() method in gridcell adapter

private HashMap findNumberOfEventsPerMonth(int year, int month)
                    {
                        HashMap map = new HashMap<String, Integer>();
                        // DateFormat dateFormatter2 = new DateFormat();
                        //                      
                        // String day = dateFormatter2.format("dd", dateCreated).toString();
                        //
                        // if (map.containsKey(day))
                        // {
                        // Integer val = (Integer) map.get(day) + 1;
                        // map.put(day, val);
                        // }
                        // else
                        // {
                        // map.put(day, 1);
                        // }
                        return map;
                    }

Upvotes: 1

Related Questions