-
Notifications
You must be signed in to change notification settings - Fork 51
making the slider continuous. #20
Comments
Out of the box - no. You have to do it yourself. I can offer you some help though. -- What you can do is track previous positions to know whether you've moved the full circle. So for example, if you track one previous listener position... and let's say you get 0.999, but the next one you get is 0.111, without any other values in-between them... it means that user either looped the circle, or made an incredible jump that would be more than 0.9 long. At this point you can assume that they looped, and increase your counter. You can also do this with radians but it's a bit more complex. |
Hi When setting new position value, UI dose not update, I run on |
Off the top of my head, I think nobody complained about this before, so I
think you might be doing something wrong with that call on your side.
Perhaps try not to call it on UI thread? Just to test. Or the UI thread is
busy and is not able to process your call?
Or.. include the slider in a sample project where you have no other
business logic, and test again.
Or.. your position value is simply the same as the one you had? Value
format is in Pi/radians, you can check out other closed tickets and the
readme on how to convert from radians to degrees.
Or.. you can debug on your own by opening the slider class (it's just one
small class without proguard applied).
Either way I'd need more code to be able to guess what's wrong.
…On Thu, Jan 16, 2020, 22:04 Ali Sarkhosh ***@***.***> wrote:
Hi When setting new position value, UI dose not update, I run on
runOnUiThread
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#20?email_source=notifications&email_token=AANQTCTAFZXZUMQKHN2IIM3Q6DDWZA5CNFSM4HLTBIKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJFRKWY#issuecomment-575346011>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANQTCTIA7YP25Y2T4EHTITQ6DDWZANCNFSM4HLTBIKA>
.
|
Dear Milos, thank you for helping my project by this slider. But now i want to ask, how to invoke setPosition ?, i call it from button clickListener event, but nothing change on UI until i touch the slider.. is there any other ways to invoke / reanimate the slider position ? |
Try calling View's |
it works !.. there is should be invalidate(); after set the thumb position in order to invoke the changes on UI. |
If you want you can make a PR with this change to have it integrated :)
…On Thu, Mar 19, 2020, 04:00 hadepea16 ***@***.***> wrote:
Try calling View's invalidate function on it (after setting)? Also
pasting some code might help in debugging
it works !.. there is should be invalidate(); after set the thumb position
in order to invoke the changes on UI.
Thanks !
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#20 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANQTCQNOWUBG5TOACCRRJDRIGDFBANCNFSM4HLTBIKA>
.
|
The slider does not seem to have the capability of being a slider which keeps adding value or keeps removing the value. can someone help me with that?
The text was updated successfully, but these errors were encountered: