Skip to content

Releases: anastr/SpeedView

Fix bugs

28 Jun 08:39
Compare
Choose a tag to compare

Flexible fulcrum point

26 Nov 06:06
Compare
Choose a tag to compare

Fulcrum point for indicator

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

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

Fixes

11 Nov 09:58
Compare
Choose a tag to compare
  • Fix ticks overlap #214 .
  • Fix speedometer animation not working on activity start.

Fix visibility

09 Oct 08:02
Compare
Choose a tag to compare

Fix problem with navigation and ViewPager.

Performance

21 Jul 14:31
Compare
Choose a tag to compare
  • Improve performance by stopping animations on some system events.
  • Sections list is now immutable.
  • Update kotlin to 1.5.20.
  • Update documentations.

1.5.5

17 Apr 14:03
Compare
Choose a tag to compare

Improve performance

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

Publish to mavenCentral

04 Apr 18:05
Compare
Choose a tag to compare
version 1.5.4

Signed-off-by: Anas Altair <[email protected]>

Marks, Ticks

27 Jul 06:24
e881608
Compare
Choose a tag to compare

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:

Sections policy

23 Feb 07:37
Compare
Choose a tag to compare

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 .

Sections

28 Dec 14:01
Compare
Choose a tag to compare
  • 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.