-
-
Notifications
You must be signed in to change notification settings - Fork 327
Indicators
from version 1.1.2
you can change the indicator, or remove it for All Speedometers.
add app:indicator="" attribute (enum value) to your speedometer to change the indicator. like so:
<com.github.anastr.speedviewlib.SpeedView
android:layout_width="300dp"
android:layout_height="wrap_content"
app:indicator="TriangleIndicator" />
speedometer.setIndicator(Indicator.Indicators.SpindleIndicator);
indicator Name | Screenshot | indicator Name | Screenshot |
---|---|---|---|
NoIndicator | NormalIndicator | ![]() |
|
TriangleIndicator | ![]() |
NormalSmallIndicator | ![]() |
SpindleIndicator | ![]() |
LineIndicator | ![]() |
HalfLineIndicator | ![]() |
QuarterLineIndicator | ![]() |
you can add custom indicator, just add indicator's image to your drawable folder, and use ImageIndicator Object.
to create object you cans use: new ImageIndicator(Context context, int resource)
eysly, but we Recommend to use new ImageIndicator(Context context, int resource, int width, int height)
to add custom width and height for indicator.
ImageIndicator imageIndicator = new ImageIndicator(getApplicationContext(), R.drawable.image_indicator1);
speedometer.setIndicator(imageIndicator);
look at Style page to see how you can change the color and width.
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.