Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indicator Does Not Move If withTremble Is Set to False #217

Closed
tillchen opened this issue Aug 15, 2021 · 7 comments
Closed

Indicator Does Not Move If withTremble Is Set to False #217

tillchen opened this issue Aug 15, 2021 · 7 comments
Labels
Bug bug!!

Comments

@tillchen
Copy link

tillchen commented Aug 15, 2021

Describe the bug
Neither the indicator nor the number text can change (by speedTo() or speedPercentTo()) if withTremble is set to False either in the XML or programmatically. The indicator and the number text can work properly if withTremble is True.

To Reproduce
Steps to reproduce the behavior:
I have tried with SpeedView and AwesomeSpeedView.

  1. Add the view in XML.
  2. speedTo() works.
  3. Now add app:sv_withTremble="true" or speedometer.withTremble = true.
  4. speedTo() does not work anymore as neither the indicator nor the number text can update.
    Note: I'm using the default 0 - 100 range, and the values I'm setting are within the range.

Update: Tried with 1.5.5, it's working correctly in that version. Seems to be a regression :)
XML & code
N/A

Screenshots
N/A

Smartphone (Optional):

  • OS: Tried both on Android 12 and 11.
  • Version 1.5.51

Additional context
None.

@tillchen tillchen added the Bug report Participants report a bug label Aug 15, 2021
@anastr
Copy link
Owner

anastr commented Aug 18, 2021

Hi @tillchen ,
Do you think this issue related to #213. I didn't face this issue, I need more details in order to find a solution.
Thanks!

@tillchen
Copy link
Author

Hi @anastr ,

Thanks for the reply! I looked into #213 and I think they could be related. But the difference is that mine does not move at all, while #213 moves fast.

@tillchen
Copy link
Author

My XML is below:

        <com.github.anastr.speedviewlib.SpeedView
            android:id="@+id/gauge"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="16dp"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:sv_withTremble="false"
            app:sv_speedTextColor="?android:attr/textColorPrimary"
            app:sv_speedTextFormat="INTEGER"
            app:sv_textColor="?android:attr/textColorPrimary"
            app:sv_unit=""
            app:sv_indicator="KiteIndicator"
            app:sv_tickNumber="5"
            app:sv_withIndicatorLight="true"
            app:sv_centerCircleRadius="0dp"
            app:sv_sectionStyle="ROUND"/>

And I'm simply calling binding.gauge.speedTo(50f) in onCreateView().

@anastr
Copy link
Owner

anastr commented Aug 18, 2021

Is your fragment part of a viewpager or it's just been added directly to a host fragment?
And what is the parent view group of your fragment?

@tillchen
Copy link
Author

I'm using the navigation component, so it's not part of a viewpager. The parent view group is the navhost container.

@anastr anastr added Bug bug!! and removed Bug report Participants report a bug labels Oct 9, 2021
@anastr
Copy link
Owner

anastr commented Oct 9, 2021

Version 1.5.52 has been released, this issue should have been fixed.

@tillchen
Copy link
Author

tillchen commented Oct 9, 2021

Version 1.5.52 has been released, this issue should have been fixed.

Great! I will confirm this later and then close the issue. Thank you!

@anastr anastr closed this as completed Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug bug!!
Projects
None yet
Development

No branches or pull requests

2 participants