Android search bar with tags at individual progress points

I want to have a search bar (e.g. int link: YUI library examples ) with labels at individual progress points, but the execution interval is not static. How can I achieve this?

+6
source share
1 answer

You can program your own View , which draws vertical lines at any points you want.

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

You just need to override onDraw(Canvas canvas) to draw your lines. As markers, you can use the proportions of the width of the view. Each vertical line will be at a point.

lineNumber * (viewWidth) / numLines

from lineNumber = 0 to lineNumber = numLines-1

Your progress will be made in a similar way, but yes .. you must do it yourself.

+3
source

Source: https://habr.com/ru/post/921288/


All Articles