SpeedView

Dynamic Speedometer and Gauge for Android. amazing, powerful, and multi shape

APACHE-2.0 License

Stars
1.3K
Committers
1

Bot releases are hidden (Show)

SpeedView - Fix bugs Latest Release

Published by anastr over 1 year ago

  • Fix #230.
SpeedView - Flexible fulcrum point

Published by anastr almost 3 years ago

Fulcrum point for indicator

New feature to change the indicator position and the rotation point #45.

speedometer.setFulcrum(xOffset = .5f, yOffset = .7f)
SpeedView - Fixes

Published by anastr almost 3 years ago

  • Fix ticks overlap #214 .
  • Fix speedometer animation not working on activity start.
SpeedView - Fix visibility

Published by anastr about 3 years ago

Fix problem with navigation and ViewPager.

  • Fix #217 .
  • Fix #213 .
SpeedView - Performance

Published by anastr about 3 years ago

  • Improve performance by stopping animations on some system events.
  • Sections list is now immutable.
  • Update kotlin to 1.5.20.
  • Update documentations.
SpeedView - 1.5.5

Published by anastr over 3 years ago

Improve performance

  • Stop all animations when the view isn't visible to the user.
  • Improve drawing performance.
SpeedView - Publish to mavenCentral

Published by anastr over 3 years ago

SpeedView - Marks, Ticks

Published by anastr about 4 years ago

new in this version:

  • dynamic marks #59 :
    • sv_marksNumber: set custom number of marks.
    • sv_marksPadding: padding from speedometer edge.
    • sv_markHeight and sv_markWidth: size of marks.
    • sv_markStyle: ROUND or BUTT.
    • markColor: color of marks.
  • enum Style class now moved out of Section class.
  • Style.SQUARE is Deprecated, use Style.BUTT.
  • for RaySpeedometer: sv_rayMarkWidth now points to the ray marks instead of sv_markWidth.
  • change custom ticks from list of speed values to list of speed offset scale [0 -1]:
    speedometer.ticks = arrayListOf(0f, .25f, .5f, .75f, 1f), old way speedometer.ticks = arrayListOf(0f, 25f, 50f, 75f, 100f)

fixes:

  • fix null custom tick label.
  • fix preview with custom font.
  • fix #177 .
  • fix #178 .
  • fix #185 .
SpeedView - Sections policy

Published by anastr over 4 years ago

Sections

  • add start and end value:
    Section(0f, .6f, 0xFF00FF00.toInt())
  • add width and padding to every section.
    every section may have custom width and padding.
    section.width = ..
    section.padding = ..
    
  • support transparent color.
  • support NoSection.
  • new style, also available in XML sv_sectionStyle:
    • Section.Style.SQUARE
    • Section.Style.ROUND
  • add doOnSections extension.

fixes and enhancement

  • ImageIndicator accept drawable #171.
  • change Interfaces to Function types.
  • change OnPrintTickLabel interface to OnPrintTickLabelListener 'typealias'.
  • replace SpeedTextFormat with SpeedTextListener 'typealias' #173.
  • access to minSpeed & maxSpeed directly.
  • fix #169 #172 #174 .
SpeedView - Sections

Published by anastr almost 5 years ago

  • new multi-sections:
speedView.addSections(Section(.25f, Color.LTGRAY) // section from 0% to 25%
        , Section(.50f, Color.YELLOW) // section from 25% to 50%
        , Section(.75f, Color.BLUE)// section from 50% to 75%
        , Section(1f, Color.RED)// section from 75% to 100%

// or simply if you need to add 5 sections equal to each others:
speedView.makeSections(5)
)
  • new support of (no section)
  • OnSectionChangeListener now used Section class:
speedView.onSectionChangeListener = object :OnSectionChangeListener {
    override fun onSectionChangeListener(previousSection: Section?, newSection: Section?) {
        if (newSection == null)
            // there is no section here!
            return
        if (newSection.speedOffset == 1f)
            // last section
            speedView.addNote(TextNote(context, "slow down"))
    }
}
  • remove 3D Effects from TubeSpeedometer (isWithEffects3D) .
  • change indicator width and color:
speedView.indicator.width = ...
speedView.indicator.color = ...
  • Sections and indicator are now Observable by its speedometer.
  • add sv_centerCircleRadius.
  • custom default ticks.
  • all speedometers are open.
SpeedView - fix problem

Published by anastr about 5 years ago

  • fix StakeOverflowException 1164674
  • update Kotlin to v 1.3.50
SpeedView - Kotlin

Published by anastr over 5 years ago

rewrite the library in kotlin

  • easy to understand.
  • less NullPointerException.
  • smaller size.

this version may be unstable.. if you had any issue with kotlin Go back to version 1.3.1

SpeedView - Fix Bugs

Published by anastr about 6 years ago

  • 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);
SpeedView - new Effect

Published by anastr over 6 years ago

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 return SpannableString 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 use sv_withIndicatorLight="true" and you can customize its color sv_indicatorLightColor="#BB0000FF"
  • new notes positions.
    if you were using CenterIndicator for Note position, change to QuarterSpeedometer
    if you were using TopIndicator, change to TopSpeedometer.
SpeedView - Fix Bugs.

Published by anastr almost 7 years ago

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.

SpeedView - Fix / New

Published by anastr about 7 years ago

  • 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 and sv_indicatorWidth attributes ed09701.
SpeedView - New Tick Values

Published by anastr over 7 years ago

  • new speed value label at each tick point #22 #31 .
  • Deprecate getCorrectSpeed(), getCorrectIntSpeed() and replace with getCurrentSpeed(), 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.
SpeedView - Improve Base, new Gauge

Published by anastr over 7 years ago

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.
SpeedView - Fix / Huge Update

Published by anastr almost 8 years ago

  • 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 new setStartEndDegree (int startDegree, int endDegree) method.
SpeedView - new Speedoeters

Published by anastr almost 8 years ago

  • 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.