{"id":22763963,"url":"https://github.com/andyb129/clockscroller","last_synced_at":"2025-07-24T14:10:31.218Z","repository":{"id":57743620,"uuid":"69187085","full_name":"andyb129/ClockScroller","owner":"andyb129","description":"A cool animated RecyclerView clock face scroller handle inspired by the following MaterialUp submission - https://material.uplabs.com/posts/codepen-scrolling-clock","archived":false,"fork":false,"pushed_at":"2017-12-13T00:54:01.000Z","size":1296,"stargazers_count":75,"open_issues_count":2,"forks_count":9,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-14T22:09:01.620Z","etag":null,"topics":["android","clock","clock-scroller","gradle","materialup","recyclerview","scroll"],"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/andyb129.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}},"created_at":"2016-09-25T19:53:34.000Z","updated_at":"2022-11-25T16:30:53.000Z","dependencies_parsed_at":"2022-08-26T01:23:53.444Z","dependency_job_id":null,"html_url":"https://github.com/andyb129/ClockScroller","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/andyb129/ClockScroller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyb129%2FClockScroller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyb129%2FClockScroller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyb129%2FClockScroller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyb129%2FClockScroller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andyb129","download_url":"https://codeload.github.com/andyb129/ClockScroller/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyb129%2FClockScroller/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266854489,"owners_count":23995485,"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","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["android","clock","clock-scroller","gradle","materialup","recyclerview","scroll"],"created_at":"2024-12-11T11:13:21.904Z","updated_at":"2025-07-24T14:10:31.193Z","avatar_url":"https://github.com/andyb129.png","language":"Java","readme":"# Clock Scroller\n\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-ClockScroller-green.svg?style=true)](https://android-arsenal.com/details/1/4410)\n\u003cbr\u003e\u003ca href=\"http://www.methodscount.com/?lib=uk.co.barbuzz%3Aclockscroller%3A0.0.2\"\u003e\u003cimg src=\"https://img.shields.io/badge/Methods and size-core: 180 | deps: 9347 | 18 KB-e91e63.svg\"/\u003e\u003c/a\u003e\n\nA cool animated RecyclerView clock face scroller handle inspired by the following [MaterialUp](https://material.uplabs.com/) submission ~\u003e\n\n\u003ca href=\"https://material.uplabs.com/posts/codepen-scrolling-clock\"\u003ehttps://material.uplabs.com/posts/codepen-scrolling-clock\u003c/a\u003e\n\n* Scroll handle shows animated clock face when scrolling\n* Clock face animates to hours\n* Still a **WORK IN PROGRESS** so please submit a pull request if you can improve/find bugs! :-)\n\n\u003cp\u003e\n\u003ca href=\"https://play.google.com/store/apps/details?id=uk.co.barbuzz.clockscroller.sample\"\u003e\u003cimg src=\"https://github.com/andyb129/ClockScroller/blob/master/screenshots%2Fgoogle_play_badge.png\" height=\"80\" width=\"210\" alt=\"ClockScroller\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp\u003e\n\u003cimg src=\"https://github.com/andyb129/ClockScroller/blob/master/screenshots%2Fclock_scroller_anim.gif\" height=\"600\" alt=\"ClockScroller\"/\u003e\n\u003c/p\u003e\n  \n\u003c!--![optional caption text](screenshots/clock_scroller_anim.gif)--\u003e\n\n### Setup\nTo use **Clock Scroller** in your projects, simply add the library as a dependency to your build.\n\n##### Gradle\n```\ndependencies {\n  compile 'uk.co.barbuzz:clockscroller:0.0.2'\n}\n```\n\n##### Maven\n```\n\u003cdependency\u003e\n  \u003cgroupId\u003euk.co.barbuzz.clockscroller\u003c/groupId\u003e\n  \u003cartifactId\u003eclockscroller\u003c/artifactId\u003e\n  \u003cversion\u003e0.0.2\u003c/version\u003e\n  \u003ctype\u003epom\u003c/type\u003e\n\u003c/dependency\u003e\n```\n\nAlternatively you can directly import the /library project into your Android Studio project and add it as a dependency in your build.gradle.\n\nThe library is currently configured to be built via Gradle only. It has the following dependencies:\n\n* RecyclerView              - com.android.support:recyclerview-v7\n* Compiled SDK Version      - nougat-24\n* Minimum SDK Version       - jelly bean-16\n\n### Usage\nFor more detailed code example to use the library, Please refer to the `/sample` app.\n\nAdd the `DateGetter` interface to your RecyclerView and implement `getDateFromAdapter()` method to \nreturn a date from the position of the data set in your RecyclerView e.g.\n\n```\n@Override\npublic Date getDateFromAdapter(int pos) {\n    Calendar cal = Calendar.getInstance();\n    cal.set(Calendar.HOUR_OF_DAY, Integer.valueOf(dataSet.get(pos).time.substring(0,2)));\n    cal.set(Calendar.MINUTE, 0);\n    return cal.getTime();\n}\n```\n\nThen create your `RecyclerView` instance with a `FastScroller` instance and pass in the `RecyclerView` to it e.g.\n\n```\nmContactsRecyclerView = (RecyclerView) findViewById(R.id.contacts_recycler_view);\nmContactsRecyclerView.setLayoutManager(new LinearLayoutManager(this));\nmAdapter = new RecyclerViewAdapter(calendarTimeSlotsList, this);\nmContactsRecyclerView.setAdapter(mAdapter);\n\nFastScroller fastScroller = (FastScroller) findViewById(R.id.fast_scroller_view);\nfastScroller.setRecyclerView(mContactsRecyclerView);\n```\n\nYou'll also need to add the `FastScroller` view below your `RecyclerView` as a custom view to your layout e.g.\n\n```\n\u003cuk.co.barbuzz.clockscroller.FastScroller\n        android:id=\"@+id/fast_scroller_view\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"match_parent\"\n        android:layout_marginTop=\"10dp\"\n        android:layout_marginBottom=\"10dp\"\n        android:layout_alignParentRight=\"true\"\n        android:visibility=\"visible\"\n        app:clockFaceColor=\"@android:color/transparent\"\n        app:clockEdgeColor=\"@color/clock_edge\"\n        app:clockScrollBarColor=\"@color/colorPrimaryDark\"\n        app:clockScrollBarSelectedColor=\"@color/text_row\"/\u003e\n```\n\nYou can then either set the view parameters in xml as above or do it programmatically e.g.\n\n```\nFastScroller fastScroller = (FastScroller) findViewById(R.id.fast_scroller_view);\nfastScroller.setClockEdgeColor(getResources().getColor(R.color.clock_edge));\nfastScroller.setClockFaceColor(getResources().getColor(android.R.color.transparent));\nfastScroller.setClockLineWidth(getResources().getDimension(R.dimen.clock_stroke_width));\nfastScroller.setClockScrollBarColor(getResources().getColor(R.color.colorPrimaryDark));\nfastScroller.setClockScrollBarSelectedColor(getResources().getColor(R.color.text_row));\n```\n\n### TODO\n1. Work out how to add minutes to the scrolling clock\n2. Iron out any bugs\n\n### Thanks\n\nThis library has been made by pulling together two other open source libraries to get what I needed at the time. So huge thanks to the following libraries which this is based on.\n\n* Sticky Index by [edsilfer](https://github.com/edsilfer) - [https://github.com/edsilfer/sticky-index](https://github.com/edsilfer/sticky-index)\n* Clock Drawable Animation by [evelyne24](https://github.com/evelyne24) - [https://github.com/evelyne24/ClockDrawableAnimation](https://github.com/evelyne24/ClockDrawableAnimation)\n\n### Licence\n```\nCopyright (c) 2016 Andy Barber\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandyb129%2Fclockscroller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandyb129%2Fclockscroller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandyb129%2Fclockscroller/lists"}