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

垂直进度条,thumb左侧显示不全 #138

Open
chensenhua opened this issue May 19, 2020 · 1 comment
Open

垂直进度条,thumb左侧显示不全 #138

chensenhua opened this issue May 19, 2020 · 1 comment
Labels

Comments

@chensenhua
Copy link

<style name="eq_seek_bar">
    <item name="android:layout_width">0dp</item>
    <item name="android:layout_height">match_parent</item>
    <item name="android:layout_weight">1</item>
    <item name="rsb_mode">single</item>
    <item name="rsb_min">-8</item>
    <item name="rsb_max">8</item>
    <item name="android:paddingTop">0dp</item>
    <item name="rsb_progress_radius">5dp</item>
    <item name="rsb_progress_height">4dp</item>
    <item name="rsb_thumb_width">24dp</item>
    <item name="rsb_thumb_height">24dp</item>

    <item name="rsb_progress_default_color">#ffe8e8e8</item>
    <item name="rsb_progress_color">@color/main_color_blue</item>

</style>
@chensenhua
Copy link
Author

SeekBar 中的onDrawThumb(Canvas canvas)
canvas.drawBitmap(thumbBitmap, 0, rangeSeekBar.getProgressTop() + (rangeSeekBar.getProgressHeight() - scaleThumbHeight) / 2f, null);
的rangeSeekBar.getProgressHeight() 导致了thumb左偏移了,这里不应该把这个高度纳入计算,progress和thumd是层叠而不是并列的关系

@JinJieGu JinJieGu added the bug label Dec 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants