Android seekbar with marks at discrete progress points

☆樱花仙子☆ 提交于 2019-12-05 08:15:30

You can code up a custom View that draws the vertical lines at whatever points you want.

See: http://developer.android.com/guide/topics/ui/custom-components.html

You'll just need to override onDraw(Canvas canvas) to draw your lines. You can use proportions of the width of the view as your markers. Each vertical line would be at the point

lineNumber * (viewWidth) / numLines

from lineNumber = 0 to lineNumber = numLines-1

Your progress would be drawn in a similar manner, but yeah.. you've gotta do this yourself.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!