{"id":13643522,"url":"https://github.com/Yuncun/WeekViewSwipeable","last_synced_at":"2025-04-21T02:30:31.511Z","repository":{"id":74233827,"uuid":"70438569","full_name":"Yuncun/WeekViewSwipeable","owner":"Yuncun","description":"Custom android view for displaying weeks","archived":false,"fork":false,"pushed_at":"2017-01-16T21:54:17.000Z","size":342,"stargazers_count":76,"open_issues_count":0,"forks_count":20,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-09T15:42:49.565Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Yuncun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-10-10T00:24:09.000Z","updated_at":"2024-03-27T05:31:36.000Z","dependencies_parsed_at":"2024-01-14T11:11:03.768Z","dependency_job_id":null,"html_url":"https://github.com/Yuncun/WeekViewSwipeable","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/Yuncun%2FWeekViewSwipeable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yuncun%2FWeekViewSwipeable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yuncun%2FWeekViewSwipeable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yuncun%2FWeekViewSwipeable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yuncun","download_url":"https://codeload.github.com/Yuncun/WeekViewSwipeable/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249986022,"owners_count":21356310,"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-08-02T01:01:48.760Z","updated_at":"2025-04-21T02:30:31.054Z","avatar_url":"https://github.com/Yuncun.png","language":"Java","readme":"# WeekViewSwipeable\n\nWeekViewSwipeable is a simple Android view for displaying data in a weekly format. Given a list of data, the last element is bound to the current calendar day, the previous is bound to yesterday, and so forth. Simply override the adapter to customize the day circles based on your needs.\n\n![](wvswipeableanim.gif)\n\nUsage\n-----\n\n```xml\n    \u003ccom.yuncun.swipeableweekview.WeekViewSwipeable\n        android:id=\"@+id/calendar_component\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginBottom=\"16dp\"\n        app:circleDefaultFillColor=\"@color/grey_500\"\n        app:circleDefaultStrokeColor=\"@color/grey_500\"\n        app:circleDefaultTextColor=\"@color/grey_750\"\n        /\u003e\n```\n\nPut your data into the `WeekViewAdapter`, and override whichever functions you need to customize.\n\n```java\nList\u003cBoolean\u003e data = Arrays.asList(true, false); //Example set; use your own List\u003cT\u003e here\nWeekViewSwipeable wvs = (WeekViewSwipeable) findViewById(R.id.calendar_component);\nWeekViewAdapter\u003cBoolean\u003e adapter = new WeekViewAdapter(data) {\n    @Override\n    public int getStrokeColor(final int index){\n        //Override this to change circle stroke color\n    }\n\n    @Override\n    public int getFillColor(final int index){\n        //Override to change circle fill color\n    }\n\n    @Override\n    public TextView getTextView(TextView tv, int index){\n        //Gives you access to TextView\n        return tv;\n    }\n    \n    @Override\n    public CircleView getCircleView(CircleView cv, int index){\n        //Gives you access to CircleView\n        return cv;\n    }\n\n    @Override\n    public View getDayLayout(View dv, final int index){\n        //Returns entire dayview. This could be useful for setting an onclicklistener, for example\n        return dv;\n    }\n};\nwvs.setAdapter(adapter);\n```\nDownload\n--------\n\nGradle:\n\n```groovy\ncompile 'com.yuncun.weekviewswipeable:weekviewswipeable:1.0.0'\n\n```\n\nCredit\n--------\n\nMy thanks to Pavlos-Petros Tournaris for his CircleView library\n\nhttps://github.com/pavlospt/CircleView  (Apache-2.0)\n\nLicense\n--------\n\n    Copyright 2016 Yuncun\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","funding_links":[],"categories":["日历时间"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FYuncun%2FWeekViewSwipeable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FYuncun%2FWeekViewSwipeable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FYuncun%2FWeekViewSwipeable/lists"}