-
-
Notifications
You must be signed in to change notification settings - Fork 324
9. ImageLinearGauge
Anas Altair edited this page Mar 9, 2017
·
1 revision
Linear Gauge with custom image.
add to xml
Layout:
<com.github.anastr.speedviewlib.ImageLinearGauge
android:id="@+id/imageLinearGauge"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
define speedometer in the code.
ImageLinearGauge imageLinearGauge= (ImageLinearGauge) findViewById(R.id.imageLinearGauge);
// change speed to 50 Km/h
imageLinearGauge.speedTo(50);
you can see all methods And Attributes at Get Started - Wiki.
// ...
app:sv_orientation="VERTICAL" <!-- def : HORIZONTAL -->
app:sv_image="@drawable/your_image"
app:sv_speedometerBackColor="#9e9e9e" <!-- def : #d6d7d7 -->
when yo change orientation, image will not flip.
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.