lingochamp / MagicProgressWidget

MagicProgressCircle & MagicProgressBar
http://blog.dreamtobe.cn/2015/12/13/magic_progress_widget/
Apache License 2.0
729 stars 145 forks source link

not smoothly #1

Open borjaruiz opened 8 years ago

borjaruiz commented 8 years ago

Hi, very nice library, I have a problem: magicProgressCircle.setSmoothPercent(0.8f) is not working. The progressCircle isn't animated.

Thanks in advance

Jacksgong commented 8 years ago

Could you provide your code, Let me check it. I couldn't find out the cause from your said.

borjaruiz commented 8 years ago

I just use this in the onCreateView() of my fragment, the layout is like the example:

magicProgressCircle =(MagicProgressCircle) v.findViewById(R.id.demo_mpc); magicProgressCircle.setSmoothPercent(0.8f);

Sometimes it works and others not

Jacksgong commented 8 years ago

Sorry... I didn't encounter similar problems, could you provide your demo project source code(by Gmail: igzhenjie@gmail.com or GitHub project), I will do my best to find out the cause.


.... I suspect there may be the Smooth-Mechanism that leads to this problem.

if the current provider percent(the aim percent) compared to the last provider percent more than minInternalPercent(we use the default value: 0.03), it will be split to the several smoothInternalPercent(we use the default value: 0.01) and with the smoothIncreaseDelayMillis(we use the default value: 1ms).