-
-
Notifications
You must be signed in to change notification settings - Fork 325
8. ProgressiveGauge
Anas Altair edited this page Mar 9, 2017
·
1 revision
Linear Gauge.
add to xml
Layout:
<com.github.anastr.speedviewlib.ProgressiveGauge
android:id="@+id/progressiveGauge"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
define speedometer in the code.
ProgressiveGauge progressiveGauge= (ProgressiveGauge) findViewById(R.id.progressiveGauge);
// change speed to 50 Km/h
progressiveGauge.speedTo(50);
you can see all methods And Attributes at Get Started - Wiki.
// change Orientation
progressiveGauge.setOrientation(LinearGauge.Orientation.VERTICAL);
// change the color of progress
progressiveGauge.setSpeedometerColor(Color.GREEN);
// change the color of background progress
progressiveGauge.setSpeedometerBackColor(Color.GRAY);
app:sv_orientation="VERTICAL" <!-- def : HORIZONTAL -->
app:sv_speedometerColor="#dc4ae1" <!-- def : CYAN -->
app:sv_speedometerBackColor="#b3b3b3" <!-- def : #d6d7d7 -->
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, it must be possible to drawn, if you like this library you can support it.