GithubHelp home page GithubHelp logo

speedview's Introduction

SpeedView

Dynamic Speedometer UI for Android โšก , you can change the color of everything.

minSdkVersion=11

Library Size ~ 9 Kb.

Android Arsenal


dependencies

add this line to build.gradle

dependencies {
	    compile 'com.github.anastr:speedviewlib:1.0.3'
}

Usage

we have two views :

1st SpeedView

add SpeedView to your layout

<com.github.anastr.speedviewlib.SpeedView
        android:id="@+id/speedView"
        android:layout_width="250dp"
        android:layout_height="wrap_content" />

change the speed from your code :

SpeedView speedView = (SpeedView) findViewById(R.id.speedView);

// change speed to 50 Km/h
speedView.speedTo(50);

you can change max speed by this line (default : 100)

speedView.setMaxSpeed(220);

/** 
  * see also:
  * speedView.setWithTremble(false);
  * speedView.setIndicatorColor(Color.BLUE);
  * speedView.setHighSpeedColor(Color.RED);
  * .....
  */

2nd DeluxeSpeedView

SpeedView with Blur Effects.

add DeluxeSpeedView to your layout

<com.github.anastr.speedviewlib.DeluxeSpeedView
        android:id="@+id/deluxeSpeedView"
        android:layout_width="250dp"
        android:layout_height="wrap_content" />

the same methods in SpeedView

DeluxeSpeedView deluxeSpeedView = (DeluxeSpeedView) findViewById(R.id.deluxeSpeedView);

deluxeSpeedView.speedTo(50);

deluxeSpeedView.setMaxSpeed(220);

special methods for DeluxeSpeedView :

deluxeSpeedView.setWithEffects(false); //def : true

deluxeSpeedView.setSpeedBackgroundColor(Color.YELLOW);

Attributes

and also you can change everything in XML, see this Attributes :

app:unit="m/s" <!-- def : Km/h -->
app:maxSpeed="220" <!-- def : 100 -->
app:withTremble="false" <!-- def : true -->
app:withBackgroundCircle="false" <!-- def : true -->
app:speedometerWidth="35dp" <!-- def : 30dp -->
app:indicatorColor="#2b38e6" 
app:centerCircleColor="#b2f941ff" 
app:lowSpeedColor="#58ed21"
app:mediumSpeedColor="#edd029"
app:highSpeedColor="#ec2f33"
app:markColor="#99000000"
app:textColor="#e23900"
app:backgroundCircleColor="#212121"

Attributes just for DeluxeSpeedView :

app:withEffects="false" <!-- def : true -->
app:speedBackgroundColor="#000077"
app:speedTextColor="#000000"

Coming Soon ...

i well try to draw this Speedometer. if you have any idea, image, template please open new issue and give me the image , and i well try to add it to the Library.

LICENSE


Copyright 2016 Anas ALtair

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.

speedview's People

Contributors

anastr avatar

Watchers

James Cloos avatar Lerist avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.