Advertisement

Android ViewPager Gallery Images and Texts Tutorial

Advertisement
  • Mavani Dharmik

    Your tutorial contain error.

    • Hi Mavani, show us your logcat error. Maybe we can help. 🙂

  • Mischa Gorinskat

    Nice tutorial, helped me to get started!

  • Dinesh Haribabu

    Excellent tutorial..

  • Vlad

    Thanks a lot, I was looking for the answer for so long..

  • NZT32

    Thank you for the code. But I don’t know why every time I try to run an example using viewpager the app starts then crashes.

    • Hi NZT32, could you show us your LogCat by pasting into pastebin.com 🙂

      • NZT32

        I am sorry am a noob. How can I get my Logcat?

  • Ahmed Ayashi

    How can i show one page and a piece of the next one in same view ?

  • Yansen Tan

    Hi, How can I set the background to transparent?

  • Jean DeSuis

    Hello,

    just wanted to ask how can I make floatin buttons on the bottom of the screen so it can be navigated through swiping and buttons?

    • AnujD

      Hey did you find solution for this? I also want to implement the same please help me.

    • AnujD

      Hey… I found solution. Its very easy we can navigate using viewPager.setCurrentItem(currItm+1)

      • Jean DeSuis

        Hi, just received Ur message. I’ve made it by making button on each item and having it’s onClick function give various outputs depending on current position.

        • AnujD

          I got my solution. Anyways, Thanks for your reply 🙂
          Cheers.

  • AnujD

    Great! Saved my day! Thanks a lot..

  • Juan Ramos Martinez

    How can show images and VIDEOS wih a MediaPlayer? Thanks

  • Khaled Yabroudi

    how can I auto slide ?

  • Sara M

    What if I wanted to delete one of the views using a button?

    • Harsh Bhakta

      If you are looking for such dynamic data structure that can be changed at runtime, you should use List of flag,population and all other instead of Array of it. Once you re-factor them to List. One option is, place a button with layout of screen, set OnClickListner() that triggers onDeleteClicked(int position){
      listFlag.remove(position);
      listRank.remove(position);
      listCountry.remove(position);
      listPopulation.remove(position);

      }

  • Sameer Sharma

    Hey Can i add videos instead of images. Please let me know, thanks

  • raykev

    How do I change the font of the letters? I tried to use Typeface but it says it has to be in OnCreate

  • Joshuar Nájera

    Wowuw !!! You explained very Easy and powerful the topic thanks !! Gracias 🙂 !!

  • Ambreen Khan

    Respectable Sir,
    how can I load Images from URLs or from (Parse.com), Please help ..

    • Vulovic Vukasin

      You can use Picasso library.

    • kunal

      Use Picasso Library to load Image

      Picasso.with(ShowVehicleAdvertisement.this)

      .load(actorlist.get(k).toString())

      .placeholder(R.drawable.ic_launcher)

      .error(R.drawable.ic_launcher)

      .into(dialog_image);

  • Harun Özdemir

    Thank you for beautiful expression

  • Neeraj Sahu

    Thanks a lot..

  • Pratik Hyomba

    thanks for your tutorial, its very useful. i was wondering how to implement the click event on flags. is there any way if i click the flag it gives country name?

  • Edoardo D’Ambrosio

    Hi when I follow this tutorial, I always get a blank screen where my pager should be. I’m pretty sure I followed it correctly, but I can’t yet figure out what went wrong, and the log doesn’t appear to show the cause either. What could cause this?

  • dwivedi gaurav

    Hi
    I followed your tutorial but when I compiled it shows Resource Error. (Symbol R cannot resolve)
    I cannot add my resources after getting this error. Please response soon.
    Thanks

    • vishal torgal

      normally occurs when there is issue in xml.
      check any blank space or something

  • romaopedro

    Thank you very much 😀

  • Soha Gamal
  • Uday Patel

    how can this tutorial work with sqlite
    pic image from galary and display it like upeer example

  • Marie-Anne Cadi

    thank you, this was very useful.
    The text is hidden by the pictures, can you give an explanation on how to move the text below the photos?
    Thanks

  • Jack

    Try to use it – SlidingTutorial-Android – https://github.com/Cleveroad/SlidingTutorial-Android