Try this way, hope it helps you solve your problem
As we know, Tab-Activity is now depreciating in Android, but for a while we use it to create simple tab pages in our application. So these days we are using Host Activity in android
Android has many layouts available to the developer to present maximum functionality with a vibrant user interface (UI). The Layout tab is also one of them. There are several tabs in the tab layout that contain one activity on each tab. Simply, the user will receive four actions in only one event containing tabs. The current activity in the tab layout will appear according to the pressed tab. This section will focus on setting the layout of the tab.
We mainly used: -
1. TabHost 2. TabWidget 3. TabHost.TabSpec 4. FrameLayout 5. Intent
You must use tabHost to create tabs.
Here you can find more here. Thanks
Saveen
source share