<font class="popmake-631">Subscribe</font>Subscribe with Androidlift to get new post on mail.

Android Tabhost/TabActivity/TabWidget/tabLayout Example

Android Tabhost

Android tabhost. For apps developing against HONEYCOMB or later, tabs are typically presented in the UI using the new ActionBar.newTab() and related APIs for placing tabs within their action bar area.

A replacement for TabActivity can also be implemented by directly using TabHost. You will need to define a layout that correctly uses a TabHost with a TabWidget as well as an area in which to display your tab content. A typical example would be:

Android tabhost Output :

Android tabhost
Android simple TabHost

Let’s create project as name you want.In default activity_main.xml file put following code.

In MainActivity.java put following code.


Create  activity_software.xml and put following code.

Create Software.java and put following code.

Create activity_hardware.xml and put following code.

Create Hardware.java and put following code.

Create activity_networking.xml and put following code.

Create Networking.java and put following code.


That sit now run the project and you have finished with the tabhost.
Have a good day..!