Skip to content

Dynamic Speedometer UI for Android ⚡

License

Notifications You must be signed in to change notification settings

androidDamon/SpeedView

Repository files navigation

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 tobuild.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 :

SpeedViewspeedView = (SpeedView) findViewById(R.id.speedView); // change speed to 50 Km/hspeedView.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

DeluxeSpeedViewdeluxeSpeedView = (DeluxeSpeedView) findViewById(R.id.deluxeSpeedView); deluxeSpeedView.speedTo(50); deluxeSpeedView.setMaxSpeed(220);

special methods for DeluxeSpeedView :

deluxeSpeedView.setWithEffects(false); //def : truedeluxeSpeedView.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. 

About

Dynamic Speedometer UI for Android ⚡

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java100.0%