0

I need to make a slider index like this:

enter image description here

(In this case it's indicating that the current index is 3).

Since it doesn't seem to be a finished solution, I have to make a custom one.

2 Possibilites come to my mind:

  • Create a custom component and draw/update the circles using onDraw. Only "geometric" drawing. But it has limitation in effects. Maybe I want a shiny circle or something, then that will not work. On the other size resize is easy.

  • Use bitmaps. But I don't know if this is maybe expensive... (If I have 30 or more). And from some count I have to scale down, and this could not look good anymore.

Or maybe something else?

Can anyone advice me what's the way to go to do this...

Thanks.

User
  • 31,811
  • 40
  • 131
  • 232
  • 1
    See [`ViewPagerIndicator`](http://viewpagerindicator.com/) for a "finished solution", if your intention is to use this in conjunction with `ViewPager`. – CommonsWare May 29 '12 at 17:54
  • Oh that's a great library, it does exactly what I need. And it works for older APIs (at least 7). Tested it already. Thanks a lot for the link! – User May 29 '12 at 20:56
  • I was using ViewFlipper but those examples with ViewPager also do what I need so I'll use it. – User May 29 '12 at 21:14
  • But ViewPager needs the support package with makes the .apk much bigger according at least with this page http://mobile.tutsplus.com/tutorials/android/android-compatibility-working-with-fragments/ but i'll use it anyways. – User May 29 '12 at 21:28
  • 1
    ProGuard will strip out unused stuff when you do a release build, so the resulting APK size should not be massively larger. – CommonsWare May 29 '12 at 21:36
  • You're right, the size of the app is the same (!) as before (I also changed my code a bit, it's maybe shorter). Didn't expect it. – User May 30 '12 at 11:35

0 Answers0