Where is the example code / tutorial for Viewpager that works great for everyone?

I searched for a while, and I cannot find a clear, simple example of a ViewPager that works. I think others have the same problem and I want to know. I know there are other questions about them, but I tried the websites, they are either outdated or crashing.

+4
source share
1 answer

I searched for a while and I cannot find a clear, simple example ViewPager that works

Here is an example ViewPager with a FragmentPagerAdapter .

Here is one of those above with the addition of PagerTabStrip .

Here is one that uses tabs in the action bar instead of PagerTabStrip .

The essence of all is the same:

  • Add ViewPager to action layout
  • Create a PagerAdapter that will return pages
  • Attach the adapter to the pager
+4
source

Source: https://habr.com/ru/post/1438965/


All Articles