-
-
Notifications
You must be signed in to change notification settings - Fork 325
5. PointerSpeedometer
Anas Altair edited this page Mar 11, 2017
·
4 revisions
speedometer with pointer lite and Sweep color .
add to xml
Layout:
<com.github.anastr.speedviewlib.PointerSpeedometer
android:id="@+id/pointerSpeedometer"
android:layout_width="300dp"
android:layout_height="wrap_content" />
define speedometer in the code.
PointerSpeedometer pointerSpeedometer= (PointerSpeedometer) findViewById(R.id.pointerSpeedometer);
// change speed to 50 Km/h
pointerSpeedometer.speedTo(50);
you can see all methods And Attributes at Get Started - Wiki.
// in this speedometer, you can change UnitText Size
pointerSpeedometer.setUnitTextSize(15); //def : 5dp
// change the point color
pointerSpeedometer.setPointerColor(Color.RED);
// change Sweep speedometer color
pointerSpeedometer.setSpeedometerColor(Color.GREEN);
app:sv_speedometerColor="#ffb26b" <!-- def : #eeeeee -->
app:sv_pointerColor="#ffff00" <!-- def : WHITE -->
app:sv_unitTextSize="15dp" <!-- def : 11dp -->
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.