22

My Task is to make clean scroll right to another screen then press on icon and show popup, I want to use ViewPager to make clean scroll right(swipe) between two pages, and then use Dialog to show the popup, I couldn't find any working sample on how to implement ViewPager between two layouts, someone has working sample??
Thanks. David

DonGru
  • 13,532
  • 8
  • 45
  • 55
BoazGarty
  • 1,410
  • 4
  • 18
  • 38
  • https://androidbeasts.wordpress.com/2015/08/11/tabs-with-swipe-views/#more-79 – Aakash Aug 11 '15 at 23:15
  • **Simplest way**. I cant answer because question is closed so I posted on Medium-> https://medium.com/@khermaj/android-viewpager-implementation-6c48c868a0e8 – Khemraj Sharma Nov 16 '18 at 09:52

1 Answers1

7

This helped me a lot: http://geekyouup.blogspot.com/2011/07/viewpager-example-from-paug.html

Theres a link to some googlecode you can download and paw through too.

Viewpagers work like list views. To use it with two layouts you're going to have to expand the layouts in a LayoutInflater and add as a view to each page.

Thomas Clayson
  • 29,657
  • 26
  • 147
  • 224