AnalogClockView is a custom view library for android development.

Overview

AnalogClockView License

Output:

Usage:

  1. Add it in your root build.gradle at the end of repositories:
	allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}
  1. Add the dependency in app-level build.gradle
dependencies {
          implementation 'com.github.Hemu43362:AnalogClockView:0.0.1'
  }
  1. Layout implementation
">
  <com.hemantpatel.clock_library.AnalogClockView
      android:id="@+id/clock_view"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      app:pointsColor="#EAC53E"
      app:dialColor="#CDFFD2"
      app:secondHandColor="#FD602F"
      app:minuteHandColor="#7789EF"
      app:hourHandColor="#29BC65"
      app:secondHandWidth="5"
      app:minuteHandWidth="10"
      app:hourHandWidth="15"
      app:layout_constraintBottom_toBottomOf="parent"
      app:layout_constraintLeft_toLeftOf="parent"
      app:layout_constraintRight_toRightOf="parent"
      app:layout_constraintTop_toTopOf="parent" />
  1. Don't forget to call startClock() in OnStart() and stopClock() in OnStop()
   // get reference of AnalogClockview
   private val mClockView: AnalogClockView
        get() = findViewById(R.id.clock_view)
   override fun onStart() {
        super.onStart()
        mClockView.startClock()
    }
   override fun onStop() {
        super.onStop()
        mClockView.stopClock()
    }

Attribute details:

Atrribute Properties Type Default Value̥
pointsColor color of points which indicates the numbers Color Color.WHITE
dialColor color of dial of watch Color Color.GRAY
secondHandColor color of second hand Color Color.RED
minuteHandColor color of minute hand Color Color.YELLOW
hourHandColor color of hour hand Color Color.GREEN
secondHandWidth width of second hand Float 8f
minuteHandWidth width of minute hand Float 12f
hourHandWidth width of hour hand Float 15f

Changelog:

0.0.1

  • Initial release
  • added attributes for customize clock hand, dial and points

License:

Copyright 2021 HemantPatel
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.
You might also like...
FloatingView can make the target view floating above the anchor view with cool animation
FloatingView can make the target view floating above the anchor view with cool animation

FloatingView FloatingView can make the target view floating above the anchor view with cool animation Links 中文版 README Blog about FloatingView demo.ap

用于做Path动画的自定义View。 I have a path.I have a view. (Oh~),Path(Anim)View.
用于做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

Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your development.
Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your development.

Bubbles for Android Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your

GreenDroid is a development library for the Android platform. It makes UI developments easier and consistent through your applications.

#GreenDroid Foreword : This project, initially initiated by me, Cyril Mottier, is not maintained anymore and can be considered as deprecated. As a con

Useful library to use custom fonts in your android app
Useful library to use custom fonts in your android app

EasyFonts A simple and useful android library to use custom fonts in android apps without adding fonts into asset/resource folder.Also by using this l

Android Library for Custom Switches.
Android Library for Custom Switches.

Android Library for Custom Switches.

DailyTags - a flexible markdown library that supports custom tags and markups
DailyTags - a flexible markdown library that supports custom tags and markups

The library parses a given markup into rich text for Jetpack Compose. DailyTags comes with Markdown and HTML support by default (please, see the supported features) and is very easy to extend to support custom markups.

[] A fast PDF reader component for Android development
[] A fast PDF reader component for Android development

This project is no longer maintained. You can find a good replacement here, which is a fork relying on Pdfium instead of Vudroid/MuPDF for decoding PD

Multiplatform UI DSL with screen management in common code for mobile (android & ios) Kotlin Multiplatform development
Multiplatform UI DSL with screen management in common code for mobile (android & ios) Kotlin Multiplatform development

Mobile Kotlin widgets This is a Kotlin MultiPlatform library that provides declarative UI and application screens management in common code. You can i

Releases(0.0.1)
Owner
Hemant Patel
Student at NIT, Raipur || Android developer || Competitive Programmer.
Hemant Patel
Custom android music player view.

InteractivePlayerView Custom android music player view. Screen Check it on youtube Usage(XML) Define it in your xml file. <co.mobiwise.library.Intera

Mert Şimşek 744 Dec 25, 2022
A beautiful Android custom View that works similar to a range or seekbar. With animations.

ValueBar A beautiful Android custom View that works similar to a range or seekbar. Selection by gesture. With animations. Supporting API level 11+. De

Philipp Jahoda 147 Nov 20, 2022
An android custom view that displays a circle with a colored arc given a mark

MarkView An android custom view that displays a circle with a colored arc given a mark. Usage Add as a dependency compile 'com.github.xiprox.markv

İhsan Işık 200 Nov 25, 2022
This is a android custom view , like a scratch card effect!

ScratchView This is a android custom view , like a scratch card effect! Last Update 采纳DearZack童鞋的优化思路,把计算擦除面积比例的操作放在手指离开屏幕时,以降低对CPU的占用。 Articles Scrat

D_clock爱吃葱花 316 Nov 29, 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
NumberPickerView - Custom Android View to provide a user friendly way of picking numbers. 🧪

?? Custom view for Android which provides a modern design and gestures for picking numbers in a user friendly way.

Mirkamal 6 Feb 16, 2022
(Deprecated) A custom view component that mimics the new Material Design Bottom Navigation pattern.

BottomBar (Deprecated) I don't have time to maintain this anymore. I basically wrote the whole library in a rush, without tests, while being a serious

Iiro Krankka 8.4k Dec 29, 2022
a custom view that provides dragged and scaled

DragScaleCircleView A custom imageview that provides the circle window can be dragged and scaled, crop image. How does it look? Why? Sometimes need to

null 514 Dec 22, 2022
A custom view, in which device contact list is displayed

Getting Started This repository contains a custom view, in which device contact list is displayed Implementation Go to Settings.gradle, inside reposit

Ankit Kumar 2 May 7, 2022
Android View for displaying and selecting values in a circle-shaped View, with animations and touch gestures.

CircleDisplay Android View for displaying and selecting (by touch) values / percentages in a circle-shaped View, with animations. Features Core featur

Philipp Jahoda 287 Nov 18, 2022