{"id":19075419,"url":"https://github.com/developersunesis/android-week-view","last_synced_at":"2025-04-29T23:29:29.926Z","repository":{"id":123480768,"uuid":"231849484","full_name":"developersunesis/Android-Week-View","owner":"developersunesis","description":"Android WeekView Widget","archived":false,"fork":false,"pushed_at":"2020-01-05T13:56:16.000Z","size":331,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-18T19:42:02.289Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/developersunesis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-01-05T00:53:12.000Z","updated_at":"2023-10-09T06:44:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"ee9d6810-aed8-48f7-bb13-2add3aa0c0d4","html_url":"https://github.com/developersunesis/Android-Week-View","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developersunesis%2FAndroid-Week-View","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developersunesis%2FAndroid-Week-View/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developersunesis%2FAndroid-Week-View/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developersunesis%2FAndroid-Week-View/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/developersunesis","download_url":"https://codeload.github.com/developersunesis/Android-Week-View/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251599263,"owners_count":21615491,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T01:54:37.331Z","updated_at":"2025-04-29T23:29:29.918Z","avatar_url":"https://github.com/developersunesis.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Android Week View\n=================\n\n**Android Week View** is an android library to display calendars (week view or day view) within the app. It supports custom styling. Clone from [Android-Week-View](https://github.com/alamkanak/Android-Week-View/).\n\n++ Variation - Vertical divider Added\n\n![](images/device-2020-01-05-015714.png)\n\nFeatures\n------------\n\n* Week view calendar\n* Day view calendar\n* Custom styling\n* Horizontal and vertical scrolling\n* Infinite horizontal scrolling\n* Live preview of custom styling in xml preview window\n\nUsage\n---------\n1. Add WeekView in your xml layout.\n\n    ```xml\n    \u003ccom.alamkanak.weekview.WeekView\n        android:id=\"@+id/weekView\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        app:dayBackgroundColor=\"#FFFFFF\"\n        app:eventTextColor=\"@android:color/white\"\n        app:headerColumnBackground=\"#ffffffff\"\n        app:headerColumnPadding=\"8dp\"\n        app:headerColumnTextColor=\"@color/toolbar_text\"\n        app:headerRowBackgroundColor=\"#FFFFFF\"\n        app:headerRowPadding=\"12dp\"\n        app:hourHeight=\"60dp\"\n        app:futureBackgroundColor=\"@color/accent\"\n        app:noOfVisibleDays=\"5\"\n        app:textSize=\"12sp\"\n        app:nowLineColor=\"@color/accent\"\n        app:nowLineThickness=\"2dp\"\n        app:todayBackgroundColor=\"#1848adff\"\n        app:showNowLine=\"true\"\n        app:eventCornerRadius=\"5dp\"\n        app:todayHeaderTextColor=\"@color/accent\" /\u003e\n    ```\n2. Write the following code in your java file.\n\n    ```java\n    // Get a reference for the week view in the layout.\n    mWeekView = (WeekView) findViewById(R.id.weekView);\n\n    // Set an action when any event is clicked.\n    mWeekView.setOnEventClickListener(mEventClickListener);\n\n    // The week view has infinite scrolling horizontally. We have to provide the events of a\n    // month every time the month changes on the week view.\n    mWeekView.setMonthChangeListener(mMonthChangeListener);\n\n    // Set long press listener for events.\n    mWeekView.setEventLongPressListener(mEventLongPressListener);\n    ```\n3. Implement `WeekView.MonthChangeListener`, `WeekView.EventClickListener`, `WeekView.EventLongPressListener` according to your need.\n\n4. Provide the events for the `WeekView` in `WeekView.MonthChangeListener.onMonthChange()` callback. Please remember that the calendar pre-loads events of three consecutive months to enable lag-free scrolling.\n\n    ```java\n    MonthLoader.MonthChangeListener mMonthChangeListener = new MonthLoader.MonthChangeListener() {\n        @Override\n        public List\u003cWeekViewEvent\u003e onMonthChange(int newYear, int newMonth) {\n            // Populate the week view with some events.\n            List\u003cWeekViewEvent\u003e events = getEvents(newYear, newMonth);\n            return events;\n        }\n    };\n    ```\n\nCustomization\n-------------------\n\nYou can customize the look of the `WeekView` in xml. Use the following attributes in xml. All these attributes also have getters and setters to enable you to change the style dynamically.\n\n- `allDayEventHeight`\n- `columnGap`\n- `dayBackgroundColor`\n- `dayNameLength`\n- `eventMarginVertical`\n- `eventPadding`\n- `eventTextColor`\n- `eventTextSize`\n- `firstDayOfWeek`\n- `headerColumnBackground`\n- `headerColumnPadding`\n- `headerColumnTextColor`\n- `headerRowBackgroundColor`\n- `headerRowPadding`\n- `hourHeight`\n- `hourSeparatorColor`\n- `hourSeparatorHeight`\n- `noOfVisibleDays`\n- `overlappingEventGap`\n- `textSize`\n- `todayBackgroundColor`\n- `todayHeaderTextColor`\n- `showDistinctPastFutureColor`\n- `futureBackgroundColor`\n- `pastBackgroundColor`\n- `showDistinctWeekendColor`\n- `futureWeekendBackgroundColor`\n- `pastWeekendBackgroundColor`\n- `showNowLine`\n- `nowLineColor`\n- `nowLineThickness`\n- `scrollDuration`\n\nInterfaces\n----------\n\nUse the following interfaces according to your need.\n\n- `mWeekView.setWeekViewLoader()` to provide events to the calendar\n- `mWeekView.setMonthChangeListener()` to provide events to the calendar by months\n- `mWeekView.setOnEventClickListener()` to get a callback when an event is clicked\n- `mWeekView.setEventLongPressListener()` to get a callback when an event is long pressed\n- `mWeekView.setEmptyViewClickListener()` to get a callback when any empty space is clicked\n- `mWeekView.setEmptyViewLongPressListener()` to get a callback when any empty space is long pressed\n- `mWeekView.setDateTimeInterpreter()` to set your own labels for the calendar header row and header column\n- `mWeekView.setScrollListener()` to get an event every time the first visible day has changed\n- `mWeekView.setPinchListener()` to get an event when the zoom scale reaches maximum\n\nSample\n----------\n\nThere is also a [sample app](https://github.com/developersunesis/Android-Week-View/tree/master/sample) to get you started.\n\nSource\n-------\nOriginal source from [Android-Week-View](https://github.com/alamkanak/Android-Week-View/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevelopersunesis%2Fandroid-week-view","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevelopersunesis%2Fandroid-week-view","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevelopersunesis%2Fandroid-week-view/lists"}