Android Programming

Android ViewPager - Swipe Fragments With CardViews

Android ViewPager tutorial. Making swipeable fragments that contain CardViews with images.


This tutorial explores how to use ViewPager to make swipeable fragments that have cardviews with images and text. Please watch the video tutorial below.   [caption id="" align="alignnone" width="429"] Android Swipeable Cards[/caption]   [caption id="" align="alignnone" width="328"] Project Structure[/caption]

Tools Used

This example was written with the following tools:
  • Windows 8
  • AndroidStudio IDE
  • Genymotion Emulator
  • Language : Java

Source Code

Lets jump directly to the source code. Source code is well commented. [su_tabs]

Video Tutorial

  • We have a YouTube channel with almost a thousand tutorials, this one below being one of them.


  • You can Download the full Project below. Source code is well commented.

How To Run

  1. Download the project above.
  2. You'll get a zipped file,extract it.
  3. Open the Android Studio.
  4. Now close, already open project.
  5. From the Menu bar click on File >New> Import Project.
  6. Now Choose a Destination Folder, from where you want to import project.
  7. Choose an Android Project.
  8. Now Click on “OK“.
  9. Done, your done importing the project,now edit it.



  • Visit our channel for more examples like these.