Path like scrollbar panel with clock.

Overview

ScrollBarPanelWithClock

Path 2.0 like scrollbar with clock widget for Android.

This is an open source library which uses the scroll bar library. I have added a Clock widget inside the scroll bar panel which gives a Path 2.0 like effect and can be customised according to your needs. Please see the screenshots below to get a better idea.

Screenshot

without second hand

with second hand

Android Arsenal

Usage

Check the attached demo sample app.

Layout

The ExtendedListView replaces a standard ListView widget and provides the ScrollBarPanel capability.

<com.learnNcode.android.ExtendedListView
    xmlns:clock="http://schemas.android.com/apk/res-auto"
    android:id="@android:id/list"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:choiceMode="singleChoice"
    clock:hand_second="@drawable/ic_timer_clock_minute_hand"
    clock:scrollBarPanel="@layout/scrollbarpanel"
    clock:scrollBarPanelInAnimation="@anim/in"
    clock:scrollBarPanelOutAnimation="@anim/out" />

You can use/edit the clock widget the following way, this should be done in the layout for scrollbar panel:

<com.learnNcode.android.Clock
    xmlns:clock="http://schemas.android.com/apk/res-auto"
    android:id="@+id/analogClockScroller"
    android:layout_width="25dp"
    android:layout_height="25dp"
    clock:hand_second="@drawable/ic_timer_clock_minute_hand"
    clock:hand_minute="@drawable/ic_timer_clock_minute_hand"
    clock:hand_hour="@drawable/ic_timer_clock_hour_hand"
    clock:hand_dial="@drawable/ic_timer_clock_dialer"/>

Activity

Set your scrollBarPanel

ExtendedListView mListView = (ExtendedListView) findViewById(android.R.id.list);

You can attach a position changed listener on the listview and write your desired implementation.

mListView.setOnPositionChangedListener(new OnPositionChangedListener() {

    @Override
    public void onPositionChanged(ExtendedListView listView, int firstVisiblePosition, View scrollBarPanel) {
         Clock analogClockInstance = (Clock) scrollBarPanel.findViewById(R.id.analogClockScroller);

        Time time = new Time();
        analogClockInstance.setSecondHandVisibility(true);  // to visible second hand
        time.set(position+3, position, 5, 0, 0, 0);
        analogClockInstance.onTimeChanged(time);

        }
    }

You can also directly implement the OnPositionChangedListener, and write your implementation in the overridden method.

public class MainActivity extends Activity implements OnPositionChangedListener {

    @Override
    public void onPositionChanged(ExtendedListView listView, int position, View scrollBarPanel) {
        Clock analogClockInstance = (Clock) scrollBarPanel.findViewById(R.id.analogClockScroller);
            
        Time time = new Time();
        analogClockInstance.setSecondHandVisibility(true);
        time.set(position+3, position, 5, 0, 0, 0);
        analogClockInstance.onTimeChanged(time);
        }
     }

This is how you initialize the clock widget, this should be done inside the OnPositionChanged().

Time timeObj = new Time();
analogClockObj.setSecondHandVisibility(true);
analogClockObj.setVisibility(View.VISIBLE);
timeObj.set(position+3, position, 5, 0, 0, 0); //pass respective values to the clock here.
analogClockObj.onTimeChanged(timeObj);

NOTE :

1] You can set visibility for the seconds hand by using setSecondHandVisibility method. Example: analogClockObj.setSecondHandVisibility(true); // To show second hand

2] You can set visibility for the clock widget by using setVisibility method. Example: analogClockObj.setVisibility(View.VISIBLE);

Acknowledgements

Android-ScrollBarPanel

License

Copyright 2013 learnNcode

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.

Thankyou

If you like our work say a hi :) Happy coding.

You might also like...
Created a Tinder like Card Deck & Captain Train like Toolbar

TinderView Created A Simple and Beautiful Tinder like card deck & Captain Train like toolbar. This is heavily based on AndroidSwipeableCardStack, wenc

:balloon: A lightweight popup like tooltips, fully customizable with an arrow and animations.
:balloon: A lightweight popup like tooltips, fully customizable with an arrow and animations.

Balloon 🎈 A lightweight popup like tooltips, fully customizable with arrow and animations. Including in your project Gradle Add below codes to your r

An Android library supports badge notification like iOS in Samsung, LG, Sony and HTC launchers.
An Android library supports badge notification like iOS in Samsung, LG, Sony and HTC launchers.

ShortcutBadger: The ShortcutBadger makes your Android App show the count of unread messages as a badge on your App shortcut! Supported launchers: Sony

ScratchView 7.0 0.0 L4 Java  repo is UX Design involving scratch cards like views which are scratched to reveal the information they conceal.
ScratchView 7.0 0.0 L4 Java repo is UX Design involving scratch cards like views which are scratched to reveal the information they conceal.

ScratchView Intro ScratchView repo is UX Design involving scratch cards like views which are scratched to reveal the information they conceal. There a

Takes the input from the Android MediaPlayer and displays visualizations, like in iTunes or WinAmp
Takes the input from the Android MediaPlayer and displays visualizations, like in iTunes or WinAmp

Android Visualizer A View subclass that Takes the input from the Android MediaPlayer and displays visualizations, like in iTunes or WinAmp The Visuali

A tinder like swipeable card stack component
A tinder like swipeable card stack component

AndroidSwipeableCardStack Change log: provide option to infinitly swipe in a loop card rotation setting card gravity setting undo animation Thanks for

A simple implementation of swipe card like StreetView

A simple implementation of swipe card like StreetView!! DONATIONS This project needs you! If you would like to support this project's further developm

Code Guide: How to create Snapchat-like image stickers and text stickers.
Code Guide: How to create Snapchat-like image stickers and text stickers.

MotionViews-Android Code Guide : How to create Snapchat-like image stickers and text stickers After spending 2000+ hours and releasing 4+ successful a

💳 A quick and easy flip view through which you can create views with two sides like credit cards, poker cards etc.
💳 A quick and easy flip view through which you can create views with two sides like credit cards, poker cards etc.

The article on how this library was created is now published. You can read it on this link here. →. 💳 EasyFlipView Built with ❤︎ by Wajahat Karim and

Owner
learnNcode
learnNcode
用于做Path动画的自定义View。 I have a path.I have a view. (Oh~),Path(Anim)View.

PathAnimView 用于做Path动画的自定义View。 I have a path.I have a view. (Oh~),Path(Anim)View. 现已经找到图片->SVG->PATH的正确姿势, Now i have a pic.I have a view. Oh~,Path(A

张旭童 1.1k Oct 28, 2022
Scrollbar Indicator usign compose

Carousel Carousel is a scroll indicator for ScrollableState composes. Carousel can be vertial or horizontal indicator based on the size provided using

null 58 Oct 19, 2022
TileView is a subclass of android.view.ViewGroup that asynchronously displays, pans and zooms tile-based images. Plugins are available for features like markers, hotspots, and path drawing.

This project isn't maintained anymore. It is now recommended to use https://github.com/peterLaurence/MapView. MapView is maintained by Peter, one of o

Mike Dunn 1.5k Dec 29, 2022
Android-ScrollBarPanel allows to attach a View to a scroll indicator like it's done in Path 2.0

Path 2.0 like ScrollBarPanel for Android Android-ScrollBarPanel allows to attach a View to a scroll indicator like it's done in Path 2.0. Features Sup

Arnaud Vallat 551 Dec 22, 2022
This library provides a simple way to add a draggable sliding up panel (popularized by Google Music and Google Maps) to your Android application. Brought to you by Umano.

Note: we are not actively responding to issues right now. If you find a bug, please submit a PR. Android Sliding Up Panel This library provides a simp

Umano: News Read To You 9.4k Dec 31, 2022
An Android custom view to display digits rendered as dots in a grid, with a style like a 1970s LED clock.

#DotMatrixView This is an Android library project providing a custom view that can display things on a grid of dots. When the displayed value changes,

Mark Roberts 48 Apr 21, 2022
An Android application which visualizes some of the famous Algorithms for finding path from Source to Destination in a 2D grid.

Pathfinding-Visualizer An Android application which visualizes some of the famous Algorithms for finding path from Source to destination in a 2D grid.

Pranjal Mishra 37 Aug 8, 2022
A full options clock view

Clock View Full options Clock view. You are now able to create and design your own clock view with changing just attributes. Over 20 attributes are av

Belkilani Ahmed Radhouane 65 Dec 9, 2022
A simple use of canvas to make real life clock

ClockView A simple use of canvas to make real life clock PR-viewer

Kishan Kumar 0 Dec 18, 2021
A Tinder-like Android library to create the swipe cards effect. You can swipe left or right to like or dislike the content.

Swipecards Travis master: A Tinder-like cards effect as of August 2014. You can swipe left or right to like or dislike the content. The library create

Dionysis Lorentzos 2.3k Dec 9, 2022