All Projects → andyb129 → ClockScroller

andyb129 / ClockScroller

Licence: other
A cool animated RecyclerView clock face scroller handle inspired by the following MaterialUp submission - https://material.uplabs.com/posts/codepen-scrolling-clock

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to ClockScroller

Snappyrecyclerview
An extension to RecyclerView which will snap to child Views to the specified anchor, START, CENTER or END.
Stars: ✭ 178 (+137.33%)
Mutual labels:  recyclerview, scroll
Recyclerview Fastscroller
A fully customizable Fast Scroller for the RecyclerView in Android, written in Kotlin
Stars: ✭ 585 (+680%)
Mutual labels:  recyclerview, scroll
Android scroll endless
Scroll endless for Android recyclerview
Stars: ✭ 12 (-84%)
Mutual labels:  recyclerview, scroll
Infinitescroll
Infinite Scroll (Endless Scrolling) for RecyclerView in Android
Stars: ✭ 183 (+144%)
Mutual labels:  recyclerview, scroll
RecyclerELE
Android Library for easy addition of Empty, Loading and Error views in a RecyclerView
Stars: ✭ 27 (-64%)
Mutual labels:  gradle, recyclerview
Candyview
Implement any RecyclerView in just 1 Line. CandyView handles everything for you.
Stars: ✭ 15 (-80%)
Mutual labels:  gradle, recyclerview
Boardview
A draggable boardview for java android (Kanban style)
Stars: ✭ 309 (+312%)
Mutual labels:  gradle, recyclerview
volx-recyclerview-fast-scroll
An easy to use implementation for fast scroll recyclerview
Stars: ✭ 34 (-54.67%)
Mutual labels:  recyclerview, scroll
recyclerview-list-drag-and-drop
No description or website provided.
Stars: ✭ 50 (-33.33%)
Mutual labels:  recyclerview
WheelPickerByRecyclerView
用RecyclerView实现的滚轮选择器
Stars: ✭ 14 (-81.33%)
Mutual labels:  recyclerview
RxDiffUtil
A lightweight Rx wrapper around DiffUtil with Activity lifecycle support (Deprecated)
Stars: ✭ 30 (-60%)
Mutual labels:  recyclerview
broom
A disk cleaning utility for developers.
Stars: ✭ 38 (-49.33%)
Mutual labels:  gradle
linux-scroll-speed-fix
A Chrome app that fixes the slow scroll speed in Chrome for Linux.
Stars: ✭ 33 (-56%)
Mutual labels:  scroll
Launcher-OnePlus
Customizable and Open Source Launcher for Android
Stars: ✭ 73 (-2.67%)
Mutual labels:  recyclerview
adapster
Android library designed to enrich and make your RecyclerView adapters more SOLID
Stars: ✭ 17 (-77.33%)
Mutual labels:  recyclerview
Android-RecyclerViewHelper
RecyclerView的工具类,更方便的实现Adapter,item点击事件,更快的实现加载提示,分页加载。
Stars: ✭ 31 (-58.67%)
Mutual labels:  recyclerview
GhostAdapter
No description or website provided.
Stars: ✭ 15 (-80%)
Mutual labels:  recyclerview
owl2neo4j
Convert OWL to labeled property graph and import into Neo4J
Stars: ✭ 42 (-44%)
Mutual labels:  gradle
srraf
Monitor scrolling and resizing without event listeners.
Stars: ✭ 26 (-65.33%)
Mutual labels:  scroll
jooq-plugin
Plugin for generating jOOQ classes using dockerized databases
Stars: ✭ 55 (-26.67%)
Mutual labels:  gradle

Clock Scroller

Android Arsenal

A cool animated RecyclerView clock face scroller handle inspired by the following MaterialUp submission ~>

https://material.uplabs.com/posts/codepen-scrolling-clock

  • Scroll handle shows animated clock face when scrolling
  • Clock face animates to hours
  • Still a WORK IN PROGRESS so please submit a pull request if you can improve/find bugs! :-)

ClockScroller

ClockScroller

Setup

To use Clock Scroller in your projects, simply add the library as a dependency to your build.

Gradle
dependencies {
  compile 'uk.co.barbuzz:clockscroller:0.0.2'
}
Maven
<dependency>
  <groupId>uk.co.barbuzz.clockscroller</groupId>
  <artifactId>clockscroller</artifactId>
  <version>0.0.2</version>
  <type>pom</type>
</dependency>

Alternatively you can directly import the /library project into your Android Studio project and add it as a dependency in your build.gradle.

The library is currently configured to be built via Gradle only. It has the following dependencies:

  • RecyclerView - com.android.support:recyclerview-v7
  • Compiled SDK Version - nougat-24
  • Minimum SDK Version - jelly bean-16

Usage

For more detailed code example to use the library, Please refer to the /sample app.

Add the DateGetter interface to your RecyclerView and implement getDateFromAdapter() method to return a date from the position of the data set in your RecyclerView e.g.

@Override
public Date getDateFromAdapter(int pos) {
    Calendar cal = Calendar.getInstance();
    cal.set(Calendar.HOUR_OF_DAY, Integer.valueOf(dataSet.get(pos).time.substring(0,2)));
    cal.set(Calendar.MINUTE, 0);
    return cal.getTime();
}

Then create your RecyclerView instance with a FastScroller instance and pass in the RecyclerView to it e.g.

mContactsRecyclerView = (RecyclerView) findViewById(R.id.contacts_recycler_view);
mContactsRecyclerView.setLayoutManager(new LinearLayoutManager(this));
mAdapter = new RecyclerViewAdapter(calendarTimeSlotsList, this);
mContactsRecyclerView.setAdapter(mAdapter);

FastScroller fastScroller = (FastScroller) findViewById(R.id.fast_scroller_view);
fastScroller.setRecyclerView(mContactsRecyclerView);

You'll also need to add the FastScroller view below your RecyclerView as a custom view to your layout e.g.

<uk.co.barbuzz.clockscroller.FastScroller
        android:id="@+id/fast_scroller_view"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_marginTop="10dp"
        android:layout_marginBottom="10dp"
        android:layout_alignParentRight="true"
        android:visibility="visible"
        app:clockFaceColor="@android:color/transparent"
        app:clockEdgeColor="@color/clock_edge"
        app:clockScrollBarColor="@color/colorPrimaryDark"
        app:clockScrollBarSelectedColor="@color/text_row"/>

You can then either set the view parameters in xml as above or do it programmatically e.g.

FastScroller fastScroller = (FastScroller) findViewById(R.id.fast_scroller_view);
fastScroller.setClockEdgeColor(getResources().getColor(R.color.clock_edge));
fastScroller.setClockFaceColor(getResources().getColor(android.R.color.transparent));
fastScroller.setClockLineWidth(getResources().getDimension(R.dimen.clock_stroke_width));
fastScroller.setClockScrollBarColor(getResources().getColor(R.color.colorPrimaryDark));
fastScroller.setClockScrollBarSelectedColor(getResources().getColor(R.color.text_row));

TODO

  1. Work out how to add minutes to the scrolling clock
  2. Iron out any bugs

Thanks

This 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.

Licence

Copyright (c) 2016 Andy Barber

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].