Hi guys Today I am going to show you how to use ViewPager as a image slide gallery. In this example you can swipe left or right to view image.

I simply put the images to drawable folder and display on it ViewPager

First you need to create the PagerAdapter


Then create the xml file and add the ViewPager in layout


Then create main Activity and create the instance of ViewPager


Final Output