Please accept YouTube cookies to play this video. By accepting you will be accessing content from YouTube, a service provided by an external third party.

YouTube privacy policy

If you accept this notice, your choice will be saved and the page will refresh.


Show the video description

In this video we will use the ViewPager widget together with the Picasso image loading library to create an image slider that loads it’s images from the web. For this we will create a PagerAdapter and override the getCount, instantiateItem, isViewFromObject and destroyItem methods. We will then dynamically create ImageViews and add them as pages to our ViewPager. Into these ImageViews we load the images from URLs we store in a string array with help of Picasso.

Important Linksactivity_main.xmlViewPagerAdapter.javaMainActivity.javaAndroidManifest.xml

Library on GitHub with dependency + instructions: