KdGaugeView is a simple and customizable Gauge / Speedometer control for Android.

Overview

KdGaugeView

KDGaugeView is a simple and customizable gauge control for Android inspired by LMGaugeView

open source Android Arsenal build number version number Size Method count License Apache

Motivation

I need some clean Guage view for my Android application.

Getting started

Installing

To use this library simply import it by placing the following line under dependencies in your app module's build.gradle file

This library is posted in jCenter

Gradle

implementation 'in.unicodelabs.sorbh:kdgaugeview:1.0.0'

Maven

<dependency>
  <groupId>in.unicodelabs.sorbh</groupId>
  <artifactId>kdgaugeview</artifactId>
  <version>1.0.0</version>
  <type>pom</type>
</dependency>

Usage

After Importing this library you can directly use this view in your view XML

<in.unicodelabs.kdgaugeview.KdGaugeView
                android:id="@+id/speedMeter"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                app:speed_limit="75" />

Customization

For now you can these custom attributes

  • app:maxSpeed="180" - max speed for gauge(default = 180)

  • app:minSpeed="0" - min speed for gauge(default = 0)

  • app:speed="60" - speed for gauge

  • app:speed_limit="90" - speed limit for gauge(default = 90)

  • app:unitOfMeasurement="km/hr" - Speed unit for measurment for gauge(default = Km/Hr)

  • app:animationTime="2000" - Animation time in ms

  • app:speedTextSize="100dp" - Speed text size in the center of the gauge

  • app:unitOfMeasurementTextSize="30dp" - Unit of measurement text size

  • app:speedLimitTextSize="15dp" - Speed limit text size

  • app:speedDialRingWidth="15dp" - Speed Dial ring width

  • app:speedDialRingInnerPadding="15dp" - Padding between speed dial and division doted ring

  • app:dialActiveColor="@color/dialActiveColor" - dial active ring color (default = #D3D3D3)

  • app:dialInactiveColor="@color/dialInactiveColor" - dial inactive ring color (default = #E0E0E0)

  • app:dialSpeedColor="@color/dialSpeedColor" - dial speed ring color (default = GREEN)

  • app:dialSpeedAlertColor="@color/dialSpeedAlertColor" - dial speed alert ring color (default = RED)

  • app:subDivisionCircleColor="@color/subDivisionCircleColor" - sub-division circle color (default = DKGRAY)

  • app:divisionCircleColor="@color/divisionCircleColor" - division circle color (default = BLUE)

  • app:speedTextColor="@color/speedTextColor" - speed text color (default = BLACK)

  • app:unitOfMeasurementTextColor="@color/unitOfMeasurementTextColor" - unit of measurement text color (default = BLACK)

  • app:speedLimitTextColor="@color/speedLimitTextColor" - speed limit text color (default = BLACK)

Screenshots

alt text

alt text

Author

  • Saurabh K Sharma - GIT

    I am very new to open source community. All suggestion and improvement are most welcomed.

Contributing

  1. Fork it (https://github.com/sorbh/kdgaugeView/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

License

Copyright 2018 Saurabh Kumar Sharma

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.
Comments
  • Rafayk7 java customization

    Rafayk7 java customization

    Allows you to programatically (from Java code) change features of the GaugeView. The mSpeed variable is not changeable as the setSpeed function allows that already.
    
    Example usage:
    
    var gauge = findViewById<KdGaugeView>(R.id.gauge)
    
    //Set variables
    gauge.maxSpeed = 120
    gauge.minSpeed = 40
    gauge.unitOfMeasurement = "mph"
    
    opened by rafayk7 0
  • Java Customization

    Java Customization

    Allows you to programatically (from Java code) change features of the GaugeView. The mSpeed variable is not changeable as the setSpeed function allows that already.

    Example usage:

    var gauge = findViewById<KdGaugeView>(R.id.gauge)
    
    //Set variables
    gauge.maxSpeed = 120
    gauge.minSpeed = 40
    gauge.unitOfMeasurement = "mph"
    
    opened by rafayk7 0
  • Added Multi-Colored Progress Bar

    Added Multi-Colored Progress Bar

    Allows customization for the progress bar to be multi-colored, and to specify the start/end for each color.

    To use, simply instantiate the gauge and allocate the colors and changeValues attributes and the gauge will follow the new progress bar drawing rules.

    gauge = findViewById<KdGaugeView>(R.id.gaugeView)
    var colors = intArrayOf(Color.RED, Color.YELLOW, Color.GREEN, Color.BLUE, Color.BLACK)
    var changeValues = floatArrayOf(0.1f, 0.3f, 0.5f, 0.7f, 1f)
    
    gauge.colors = colors
    gauge.changeValues = changeValues
    

    Preview: view1 view21

    opened by rafayk7 0
  • Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.

    Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.

    I am having issues getting the speed to update when Firestore Stream is triggered. I am getting the following error which I suspect is the issue.

    Built build/app/outputs/flutter-apk/app-debug.apk. : Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null. ../…/lib/kdgaugeview.dart:95

    • 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../../../../snap/flutter/common/flutter/packages/flutter/lib/src/widgets/binding.dart'). package:flutter/…/widgets/binding.dart:1 WidgetsBinding.instance!.addPostFrameCallback((timeStamp) {
    opened by ClecknerT 0
  • Error:Cause: deploy.properties (No such file or directory)

    Error:Cause: deploy.properties (No such file or directory)

    Following issue occurs when i try to import library manually

    Gradle '< PROJECT NAME >' project refresh failed Error:Cause: deploy.properties (No such file or directory)

    . could u please add values from 0 to 100.. For ex 0, 10, 20,30 ... 100 on the arc

    opened by ankit8315 0
Owner
Saurabh kumar
Android Developer | Tech Enthusiast
Saurabh kumar
Android library to control Transition animates. A simple way to create a interactive animation.

TransitionPlayer Android library to control Transition animates. A simple way to create a interactive animation. Demo1 SimpleTransition Code: ....

林法鑫 1.2k Dec 17, 2022
Android library to control Transition animates. A simple way to create a interactive animation.

TransitionPlayer Android library to control Transition animates. A simple way to create a interactive animation. Demo1 SimpleTransition Code: ....

林法鑫 1.2k Dec 17, 2022
A simple and customizable Android full-screen image viewer with shared image transition support, "pinch to zoom" and "swipe to dismiss" gestures

Stfalcon ImageViewer A simple and customizable full-screen image viewer with shared image transition support, "pinch to zoom" and "swipe to dismiss" g

Stfalcon LLC 1.9k Jan 5, 2023
Customizable bounce animation for any view like in Clash Royale app

Bounceview-Android Customizable bounce animation for any view updation Getting Started In your build.gradle dependencies { implementation 'hari.bo

Hariprasanth S 149 Nov 18, 2022
A Simple Todo app design in Flutter to keep track of your task on daily basis. Its build on BLoC Pattern. You can add a project, labels, and due-date to your task also you can sort your task on the basis of project, label, and dates

WhatTodo Life can feel overwhelming. But it doesn’t have to. A Simple To-do app design in flutter to keep track of your task on daily basis. You can a

Burhanuddin Rashid 1k Jan 1, 2023
Combine ViewPager and Animations to provide a simple way to create applications' guide pages.

WoWoViewPager WoWoViewPager combines ViewPager and Animations to provide a simple way to create applications' guide pages. When users are dragging WoW

Nightonke 2.7k Dec 30, 2022
A Photo Editor library with simple, easy support for image editing using paints,text,filters,emoji and Sticker like stories.

PhotoEditor A Photo Editor library with simple, easy support for image editing using Paints, Text, Filters, Emoji and Sticker like stories. Features D

Burhanuddin Rashid 3.6k Jan 9, 2023
Simple tool which help you to implement activity and fragment transition for pre-Lollipop devices.

PreLollipopTransition Simple tool which help you to implement activity and fragment transition for pre-Lollipop devices. Download In your app build.gr

Takahiro Menju 1.3k Nov 28, 2022
💳 Bank Card View is a simple and elegant card view with Flip animation.

Visualização de cartão bancário ?? Bank Card View é uma visualização de cartão simples e elegante com animação Flip. Versões Selecione a língua : Engl

Geovani Amaral 10 Dec 12, 2022
💳 Bank Card View is a simple and elegant card view with Flip animation.

Visualização de cartão bancário ?? Bank Card View é uma visualização de cartão simples e elegante com animação Flip. Versões Selecione a língua : Engl

Geovani Amaral 9 Aug 26, 2022
An Android library which provides simple Item animations to RecyclerView items

RecyclerViewItemAnimators Library Travis master: This repo provides: Appearance animations Simple animators for the item views Quick start You can now

Gabriele Mariotti 3.1k Dec 16, 2022
A simple animated step view for Android

StepView A simple animated step view for Android. Backward and forward animations is supported. Usage Add jcenter() to repositories block in your grad

Bogdan Kornev 833 Dec 30, 2022
Simple android library to present an animated ferris wheel

Ferris Wheel View Overview An Android Library used to implement an animated Ferris Wheel in android. API SDK 15+ Written in Kotlin Supports landscape

Igor Lashkov 318 Dec 7, 2022
Simple way to animate your views on Android with Rx 🚀

This is an Android library to make a simple way to animate your views on Android with Rx.

Lopez Mikhael 583 Dec 9, 2022
An simple & awesome animation library written in Kotlin for Android

An simple & awesome animation library written in Kotlin for Android

Romman Sabbir 53 Oct 17, 2022
This is a simple util to create Activity transition animation

TransitionHelper This is a simple util to create Activity transition animation API compatible with Android 2.2+ 中文说明 Screenshots How to use 1.startAct

ImmortalZ 1.6k Dec 12, 2022
ShimmerTextView is a simple library to integrate shimmer effect in your TextView.

ShimmerTextView ShimmerTextView is a simple library to integrate shimmer effect in your TextView. Key features Set a base color in ShimmerTextView. Se

MindInventory 22 Sep 7, 2022
Render After Effects animations natively on Android and iOS, Web, and React Native

Lottie for Android, iOS, React Native, Web, and Windows Lottie is a mobile library for Android and iOS that parses Adobe After Effects animations expo

Airbnb 33.5k Jan 4, 2023
Chandrasekar Kuppusamy 799 Nov 14, 2022