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

onSeeking 滑动时,根据progress给一个textview赋值导致.thumb只能区间跳,不能连贯的滑动 #170

Open
insomniastay opened this issue May 28, 2019 · 3 comments

Comments

@insomniastay
Copy link

<com.warkiz.widget.IndicatorSeekBar xmlns:app="http://schemas.android.com/apk/res-auto"         android:id="@+id/seekbar"         android:layout_width="match_parent"         android:layout_height="@dimen/dimen_24"         app:isb_seek_smoothly="true"         app:isb_show_indicator="none"         app:isb_show_thumb_text="false"         app:isb_show_tick_marks_type="square"         app:isb_show_tick_texts="false"         app:isb_thumb_adjust_auto="false"         app:isb_thumb_drawable="@drawable/trade_seekbar_red"         app:isb_tick_marks_color="@color/selector_tick_marks_color_red"         app:isb_tick_marks_size="6dp"         app:isb_ticks_count="5"         app:isb_track_progress_color="@color/tagColor_red"         app:isb_track_progress_size="2dp" />
@insomniastay
Copy link
Author

可能是view太复杂嵌套很深的缘故,加了很多延迟后发现seekbar在来回抖动
查看源码发现onMeasure 方法中一直在refreshSeekBarLocation
加入判断后解决
if (!mIsTouching)
{
initSeekBarInfo();
refreshSeekBarLocation();
}

@warkiz
Copy link
Owner

warkiz commented Jun 29, 2019

@insomniastay 感谢反馈,有时间会尝试重现这个issue.

@leguang
Copy link

leguang commented Jul 11, 2019

@warkiz 确实是这样的,在回调中操作其他view会抖动。
@insomniastay 非常感谢你的方案。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants