Skip to content

2. DeluxeSpeedView

Anas Altair edited this page Mar 11, 2017 · 5 revisions

Deluxe speedometer with Blur Effects.

simple usage

add to xml Layout:

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

define speedometer in the code.

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

// change speed to 140 Km/h
deluxeSpeedView.speedTo(140);

you can see all methods And Attributes at Get Started - Wiki.

special methods

// set or remove Blur Effects.
deluxeSpeedView.setWithEffects(false);

// change Background Color of speed text.
deluxeSpeedView.setSpeedBackgroundColor(Color.RED);

special Attributes

app:sv_withEffects="false" <!-- def : true -->
app:sv_speedBackgroundColor="#000077"