Alternatives to android.widget.Gallery (not the Gallery app) -


apology if has been asked before, i've tried googling topic without result. i'm trying find replacement gallery widget google has decided deprecate. far have following candidates:

  1. viewpager. unfortunately (as far know), can display 1 view @ time. know has posted workaround here: https://gist.github.com/devunwired/8cbe094bb7a783e37ad1. i'm having problem approach. on phone, 3 images shown (horizontally). left & right static, while middle 1 scrollable (like viewpager should do). i.e. left & right image doesnt scroll scroll viewpager. have turn down solution.

  2. gridview. seems good, seems gridview designed scrollable horizontally & vertically. want 1 row, , scroll horizontally. far know, gallery not designed in mind.

  3. horizontalscrollview. 1 google has suggested in javadocs (apart viewpager). seems 1 use, but... if understand correctly, using approach contents going instantiated front. there no lazy loading..

so i'm puzzled right here. seems best solution either use viewpager 1 view @ time (undesirable want), or stick gallery.

what people think??

thanks in advance!

android.support.v4.view.viewpager definitive answer.

you can display number of pages (views), depends on pageradapter. has method .getpagewidth(position), gets called each page. if returns 0.5, example, page half width of viewpager.

don't stick gallery, has memory leak issues.


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -