Creating swipe views with tabs

66 views.

Swipe views provide lateral navigation between sibling screens such as tabs with a horizontal finger gesture (a pattern sometimes known as horizontal paging).

Activity_main.xml

Activity_Main.xml

After this Add fragments and respected xml like below

OneFragment.class

fragment_one.xml

TwoFragment.class

fragment_two.xml

ThreeFragment.class

fragment_three.xml

After please add one theme (MyMaterialTheme.Base) in styles.xml like below

and  change the application theme to this new theme like below

Manifest.xml

output

You may also like...

Leave a Reply