Swap android view

android

Solution

You can use gallery here. Inside gallery for each items, set the layout params (width) to fit with your requirement.

Problem with gallery is that it does not rotate the items. Which means that once you reach the end of the list, you do not get first item.

But there is a trick to over come that too. All you need to do is to set the list count to very large number (INT_MAX) and in your adapter carefully return proper views by % calculation.

This will ensure that you will not reach end of list soon.

Problem

I need to provide facility as shown in images. In first view when there is viewpager at bottom. When user swap from right to left the first should replace by second. That I can do. But My question is how to so half portion of next view at end of right side and and of left side. i.e.'irst' of first view and 'Thir' of second view.

Original source

Related problems