Android Tabhost At The Bottom Of The Screen

Posted on 4 views

This is uncomplicated tip where, I am going to exhibit how to align android TabHost at the bottom of the screen. If yous bring already used uncomplicated TabHost inward your app in addition to thence align tabhost at the bottom of the covert is rattling simple. If yous haven’t used android tabhost, don’t worry. Here, I bring provided consummate XML in addition to coffee code. You tin every moment good acquire uncomplicated tabhost example here in addition to android actionbar tabs event here. To brand your tabs beautiful in addition to attractive, yous tin discovery android tabs user interface pattern at Beautiful Mobile Tabs UI Design alongside Amazing User Experience.

 I am going to exhibit how to align android TabHost at the bottom of the covert Android TabHost at the Bottom of the Screen

How to Align Android TabHost at the Bottom of the Screen

If yous are familiar alongside android TabHost in addition to thence to align tab at the bottom of the screen, only yous bring to add together android:layout_alignParentBottom=”true” inward your TabWidget in addition to layout margin bottom inward Frame Layout. Following are the uncomplicated steps to align your tabhost at the bottom of the screen.

Create a novel Android Project

Let’s outset yesteryear creating a novel android projection to align TabHost at the bottom of the covert alongside next information.
Application Name: Android Tabs at Bottom
Company Domain: viralandroid.com
Package Name: com.viralandroid.androidtabsatbottom
Minimum SDK: Android 2.2 (API eight Froyo)

Add TabHost inward XML Activity File

Just drag in addition to drib TabHost inward your XML layout file or only add together next XML code inward your XML layout. Again, I desire to remind yous non to forgot to add together android:layout_alignParentBottom=”true” inward your TabWidget. Following is the finally code of XML layout file.
res/layout/activity_main.xml

Modify Java Code

Now, to brand tabhost working, yous bring to add together picayune coffee code inward your activity file. Following is the finally code of coffee file.
src/MainActivity.java

Now, run your application. You volition run across tabhost at the bottom of the covert similar above.

Download Complete Example Project

Download consummate Android TabHost at the Bottom of the Screen event projection rootage code from GitHub.