Question

I need to create listview which should displays as a photo slider. I mean that it have to be only one item at the screen. And when user starts swiping up or down item above or below become be visible, but doesn't fill the screen. And when user swipes it at some defined point, this item fulfills the screen. And so forth.

As a photo slider. You open it and see only one photo at the screen. Then you click on the photo and start swipe down. Accordingly to your swiping photo which is in bottom of current fulfills the screen. I want to implement such a principle at my listview items.

enter image description here enter image description here enter image description here

I attached the files which can describe what I want to implement. So position 1 - start position of the listview. Then user touches the screen and start to swipe left. You can see that on the 2-nd picture - user sees the item 1 yet, but also see 2-nd item. And, finally, when he swipe over 2-nd item to the end, he sees only it on the screen. I'm sorry for such strange explanation, but I think that it can make my question more clearly. Besides, I want to implement vertical swiping, not horizontal at my listview and it should be only one item on it.

Was it helpful?

Solution

I am still not sure if I got you, but from what I could gather? Are you looking for a View Pager? If yes, then a nice tutorial is given at this link. View Pager is used in the home page of the google play app. Try opening it and slide right left top bottom and see if thats what you want? Also, from the images it seems as if the headers have been added to the View Pager, that can easily be added by using view pager indicator. I hope i was of some help to you. If you have some doubt please feel free to ask.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top