How to swipe xml layouts using ViewPager

后端 未结 2 1643
一个人的身影
一个人的身影 2021-01-25 06:27

I am building an app in which I want to enable swipe. I want to swipe xml layouts but in a single activity. Earlier I tried to put images, it worked. I created an ImageAdapter c

2条回答
  •  生来不讨喜
    2021-01-25 07:14

    enter image description hereI have answered a similar question here :

    How to use swipe gesture in a view pager's page with android? enter image description here Take a look at that and you will get what you are looking for.

    Hope that helps .. and don't forget to accept my answer :)

    Here's the images for that:

    http://imageshack.com/a/img547/6988/cpr5.png

    http://imageshack.com/a/img198/2594/tp58.png

    Here's what I found for your first question. Its the infinite scrolling. Its a good post here:

    Changing ViewPager to enable infinite page scrolling

提交回复
热议问题