• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to Set Listener on View Pager swape pages?

 
Kishor Joshi
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there

I have used ViewPager in my android app to display images in my MainActivity.Know I have add a Adapter by extending PagerAdapter but Know I want to know How can i get Id of a Particular Item when it clicked?
I want to start a New Intent when a New Image is Clicked on ViewPager

Thanks
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You would call setOnPageChangeListener either on the ViewPager or the TabPageIndicator:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic