It seems like the view pager only does one view at a time and can't have multiple views.
Up vote 0 down vote favorite share g+ share fb share tw.
I'm using ViewPager according to this wonderful tutorial: thepseudocoder.wordpress.com/2011/10/05/... This tutorial show how to display only one "page" or view in every time/swip. How can I make something like the strip in Pulse app: That have the snapping effect like ViewPager but can have multiple views inside? Android gallery android-viewpager viewpager pulse link|improve this question edited Feb 26 at 23:35 asked Feb 26 at 23:22David1048 71% accept rate.
It seems like the view pager only does one view at a time and can't have multiple views. You can try to implement your own horizontal scroll view with your own fling and touch methods: blog.velir.com/index.php/2010/11/17/andr... Or you can extend a Gallery which I think is what Pulse app is doing. Notice the snapping to position similarity of each item with the Gallery.
– David Feb 28 at 8:45 1 Gallery comes prebuilt with fling and touch methods but has a feature of snapping to the center upon click. If that is not an issue, then definitely use the gallery. Horizontal Scroll View, you would have to implement your own fling and touch since is not prebuilt in.
– CLDev Feb 28 at 16:45.
Using LayoutInflater you can do what ever you want inside instantiateItem Create the xml you need to view Get and instance of LayoutInflater and inflate that xml on the page(s) you want Inside instantiateItem do the changes to the inflated views by calling inflatedviewname. Findviewbyid Checkout this line in my project Let me know in the comments if you still need help EDIT: Maybe forget about the viewpager and use a horizontalscrollview but be careful about the item count and how you load them as it may take lots of memory the horizontal scroll view does some optimizations but they are not as good as he viewpager.
I know I can add any view inside one page of my ViewPager, but then this view (and all his subviews) acts like one page/chunk. You can't scroll to the middle of this view and stop there (the snapping will take you to right/left) – David Feb 27 at 11:02 you can't have a horizontal scroll view in a viewpager but you can have a scroll view that scrolls vertically or an listview. – Shereef Feb 27 at 13:42 I recommend you use more pages to achieve your goal or elaborate more so we can help you find a solution,@David try the HorizontalScrollView Without a viewpager you will be able to make a scrolling strip without snapping – Shereef Feb 27 at 13:43 Thanks for advice.
I tried HorizontalScrollView, It's ok. But can I have a HorizontalScrollView with snapping effect? That will be great!
– David Feb 27 at 14:35 @david I don't get it, if you need the snapping effect why not use more pages on a view pager instead of more views? – Shereef Feb 27 at 19:26.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.