Releases: anastr/SpeedView
Releases · anastr/SpeedView
fix problem
- fix StakeOverflowException 1164674
- update Kotlin to v 1.3.50
Kotlin
Fix Bugs
- fix getter and setter methods of SpeedometerBackColor for TubeSpeedometer.
- fix color doesn't change at runtime for TubeSpeedometer.
- fix color changed in RecyclerView at runtime #100 .
- fix center circle color for PointerSpeedometer #106 .
- New custom number of decimal for speedText and Ticks #108 .
you can use:
// add 4 decimal places for speedText.
speedometer.setSpeedTextFormat(4);
new Effect
if you have been using old version of this library please read this to end.
this update coming with:
- fix text size attribute in AwesomeSpeedometer #70 .
- change the color of just one tick #71 .
now you can use SpannableString for Ticks just use custom tick label and returnSpannableString
like this:
speedometer.setOnPrintTickLabel(new OnPrintTickLabel() {
@Override
public CharSequence getTickLabel(int tickPosition, float tick) {
if (tick == 0) {
SpannableString s = new SpannableString(String.format(Locale.getDefault(), "%d", (int)tick));
s.setSpan(new ForegroundColorSpan(0xffff1117), 0, 1, 0); // change first char color to Red.
return s;
}
// null means draw default tick.
return null;
}
});
- min and max speed in float #64 .
- new indicator light effect #78 (beta).
new effect behind the indicator, it still unstable if you like to use this effect just usesv_withIndicatorLight="true"
and you can customize its colorsv_indicatorLightColor="#BB0000FF"
- new notes positions.
if you were usingCenterIndicator
for Note position, change toQuarterSpeedometer
if you were usingTopIndicator
, change toTopSpeedometer
.
Fix Bugs.
fix width and height, and add to ScrollView
53284d9 issue #56 ,Now you can use wrap_content
for both layout_width & layout_height for speedometer family:
<com.github.anastr.speedviewlib.SpeedView
android:id="@+id/speedView"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
fix font cut
ea2e6cb issue #50, speed text and unit text will no longer be incomplete for all fonts.
fix Indicator rotation
78965d7 issue #61, No more random rotation after using sv_minSpeed
and sv_maxSpeed
attributes.
Fix / New
- New : KiteIndicator, NeedleIndicator.
- Add : custom tick label dd4343f use
OnPrintTickLabel
interface #35 . - Add : custom ticks position 25a0cd9 use
setTicks(0, 10, 60, ...)
method #39. - delete deprecated methods (
getCorrectSpeed
,getCorrectIntSpeed
) use (getCurrentSpeed
,getCurrentIntSpeed
). - Add : ability to remove the pointer from PointerSpeedometer issue #42 use
sv_withPointer
attribute 5cc9e41. - Fix : speed value change to 0 when device rotation changed 324889e.
- Fix : padding issue 2bb20f2 #43.
- Fix : speedometerMode.
- Fix :
sv_indicatorColor
andsv_indicatorWidth
attributes ed09701.
New Tick Values
- new speed value label at each tick point #22 #31 .
- Deprecate
getCorrectSpeed(), getCorrectIntSpeed()
and replace withgetCurrentSpeed(), getCurrentIntSpeed()
, No correction anymore. - add
setMinMaxSpeed(minSpeed, maxSpeed)
method. - fix image scale in ImageLinearGauge.
- fix Render issues #32 #34 .
- fix blur effect for inactive marks for DeluxeSpeedView.
Improve Base, new Gauge
by now, Gauge
class is the base class for all Speedometers and Gauges,
and Speedometer
class is extended Gauge
to build custom Circle Speedometers.
- add "
sv_
" to all attributes to fix conflicts issue, #20 fixed. - create new
Gauge
class, the base class for all speedometers and gauges. - add base LinearGauge for custom gauge.
- new ProgressiveGauge.
- new ImageLinearGauge.
- add Notes For Unlimited Time.
- add
sv_speedTextPadding
attribute. - add
sv_cutPadding
attribute to fix indicator cutting #12 when change speedometerMod. - add sv_unitTextColor attribute, now speed text and unit text are different thing.
- safe handle speed in OnSpeedChangeListener with
getCorrectIntSpeed()
. - set default
decelerate
value to 0.1f. - update documentation.
- save CPU usage.
- fix realSpeedTo method.
- fix attributes issue with TubeSpeedometer.
Fix / Huge Update
- Support API 8.
- new image indicator.
- new OnSectionChangeListener.
- new speedometerMode: change size, style, indicator's position.
- speed text:
- new speedTextPosition: change speed text's position.
- ability to change speed text's format (INTEGER, FLOAT).
- new
unitUnderSpeedText
(boolean) change relationship between unitText and speedText, (Under each, side by side). - new
unitSpeedInterval
space between unitText and speedText.
- change typeface for speed text, new attributes
speedTextTypeface
,textTypeface
. - add
speedPercentTo(percent, moveDuration)
method. - add
setIndicator(Indicator indicator)
method. - add resource image contractor to ImageNote.
- add
setIndicatorAt(int speed)
method (move the indicator without Animation). - default
indicatorColor
is material blue. - update Documentation.
- remove Tremble Data range.
- fix:
- PointerSpeedometer (
startDegree and endDegree
issues). - methods:
speedPercentTo(int)
,setStartDegree(int)
,setEndDegree(int)
. - some setter methods (
setSpeedometerWidth
,setPadding
). - change
startDegree and endDegree
together using newsetStartEndDegree (int startDegree, int endDegree)
method.
- PointerSpeedometer (
new Speedoeters
- new TubeSpeedometer.
- new ImageSpeedometer.
- fix Create Speedometer Programmatically.
- fix padding.
- Ability to change indicators.
- add left and right Align to Notes.
- add Locale control.
- check sections.
- add Accelerate and Decelerate for realSpeedTo method.
- fix
setSpeedTextColor()
method.