It is required to obtain a point indicator in the form of an attached image. I want if the elements are more than 5 then a small dot should appear, and during sliding it changes. Check Instagram for live viewing (find any post that has more than 5 images uploaded)
I tried to play only with the size of the dots and redraw them (on invalidate() ) each time the page was changed, however I could not reach to maintain the dots in the middle. Playing with left and right points will not cause big problems. but when the active point is in the middle, a scroll effect occurs. How can i achieve this?
I keep a list of points and play with point sizes and positions when the page changes, which is invalid and I draw circles based on the properties of the points in the list. However, it is not possible to find an idea on how to maintain midpoints so that I can make this scroll effect. Any other idea appreciated
Point indicator

java android viewpagerindicator
Amresh rananjan
source share