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
A simple calendar with events, customizable widgets and no ads.

Simple Calendar A simple calendar with events and a customizable widget. A simple calendar with optional CalDAV synchronization. You can easily create

Simple Mobile Tools 3k Jan 8, 2023
Quick photo and video camera with a flash, customizable resolution and no ads.

Simple Camera A camera with flash, zoom and no ads. The camera is usable for both photo taking and video recording. You can switch between front and r

Simple Mobile Tools 644 Dec 26, 2022
Tweaks - A customizable debug screen to view and edit flags that can be used for development

A customizable debug screen to view and edit flags that can be used for developm

Telefónica 10 Jun 28, 2022
MemoryGame - An Android memory game with customizable options

MemoryGame An Android memory game with customizable options Open source librarie

null 1 Feb 3, 2022
Highly customizable, 1.8.9 Forge Hypixel Duels bot!

What is Duck Dueller? Duck Dueller is a free and open-source Hypixel Duels bot, designed to work for Forge 1.8.9! It is planned to support many modes

null 9 Jan 1, 2023
Simple FOSS android app to help you plan and manage your savings goals easily and establish the habit of saving money.

GreenStash GreenStash is a simple FOSS android app to help you plan and manage your savings goals easily and establish the habit of saving money. ?? S

Pool-Of-Tears 112 Dec 3, 2022
A simple (and naive) RESTful API made with Ktor, jasync-sql and JWT.

A simple (and naive) RESTful API made with Ktor, jasync-sql and JWT. Route Method Description /account POST Create a new account /account DELETE Delet

null 2 Nov 4, 2021
Login-and-Signup - Simple Login-and-Signup with authentication using Firebase API

Simple Login-and-Signup with authentication using Firebase API. Log in Sign Up

Indresh Goswami 0 Mar 25, 2022
A Simple Android library to get the number of words and give you the time it will take you to finish an article/story.

MinRead A Simple Android library to get the number of words and give you the time it will take you to finish an article/story. Prerequisite Androidx K

Nwokocha wisdom maduabuchi 36 Nov 17, 2021
A simple MVI framework for Kotlin Multiplatform and Android

Orbit Multiplatform Get in touch What is Orbit Orbit is a Redux/MVI-like library - but without the baggage. It's so simple we think of it as MVVM+. Si

null 521 Jan 1, 2023
A sample code taking picture in android with app permission and simple ui

Android Taking Picture Sample Just sample code taking picture in android with ap

M. Hafizh Anbiya 2 Dec 29, 2021
Quiz Zone is a simple ✅ Quiz Android application 📱 using Firbase Firestore Database and Material Design.

Quiz Zone Quiz Zone is a simple ✅ Quiz Android application ?? using Firbase Firestore Database and Material Design. You can Install and test Quiz Zone

MOHIT GUPTA 6 Dec 24, 2022
A simple, lightweight and powerful field validation library for Android.

Convalida Convalida - (Italian for "validation") Convalida is a simple, lightweight and powerful field validation library for Android. Documentation G

Wellington Costa 203 Nov 18, 2022
XCore is a Open-Source , simple and lightweight API & Template for Android Apps.

XCore XCore is a Open-Source , simple and lightweight API & Template for Android Apps. Support XCore is compatible with Android Studio & Sketchware Pr

TherionRO 3 Dec 2, 2022
A simple android application for IQ tests, contains 40 questions and issues.

IQ-Android A simple android application for IQ tests, contains 40 questions and issues. Compatible with API Level 14 and higher Support only arabic la

Majd Zain AL Deen 2 Nov 4, 2022
A simple store project that includes a list of products, search on products, details of the product, and review submission.

AdidasTest A simple store project that includes a list of products, search on products, details of the product, and review submission. Summary Technol

Mohammad 5 May 8, 2021
A simple demo project based on MVVM clean architecture and material design & animations.

GithubFollows A simple demo project based on MVVM clean architecture and material design & animations. Architecture Specs & Open-source libraries Mini

Jaewoong Eum 288 Dec 25, 2022
This is an example of a simple application with layered software base on clean-architecture as application architecture and mvvm as presentation architecture

This is an example of a simple application with layered software base on clean-architecture as application architecture and mvvm as presentation archi

null 3 Jul 2, 2021