
Add a View Pager and Add Tab Layout View Pagers have built-in swipe gestures to transition through pages, and they display screen slide animations by default, so you don't need to create your own animation. View Pager uses Pager Adapters as a supply for new pages to display, so the Pager Adapter will use the fragment class that you created earlier. To begin, create a layout that contains a View Pager: activity_main.xml Create a layout file that you'll later use for the content of a fragment. You also need to define a string for the contents of the fragment. The following example contains a text view to display some text: first.xml Create a layout file that you'll later use for the content of a fragment. You also need to define a string for the contents of the fragment. The following example contains a text view to display some text: second.xml Create a layout file that you'll later use for the c...