GAMES PC DOWNLOAD FREE FULL

GAME

iPhone-Like Tab bar in Android

 

In a previous post we saw how to use the TabHost to create tabs in Android applications. Also we noticed that the Tabs in Android appear at the top of the activity.
but what if we want to give the tabs the look of the iPhone Tab Bar ?

this is possible by wrapping the TabWidget and the FrameLayout in a RelativeLayout container and adding android:layout_alignParentBottom="true" attribute to the TabWidget just like this:
<?xml version="1.0" encoding="utf-8"?>


<TabHost android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@android:id/tabhost"
xmlns:android="http://schemas.android.com/apk/res/android"
>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TabWidget
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@android:id/tabs"
android:layout_alignParentBottom="true"
/>
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@android:id/tabcontent"
>

</FrameLayout>
</RelativeLayout>
</TabHost>




iPhone-Like Tab bar in Android 4.5 5 Thanh Nguyen In a previous post we saw how to use the TabHost to create tabs in Android applications. Also we noticed that the Tabs in Android appear at ...


No comments:

Post a Comment

NEW GAME

Powered by Blogger.

Labels

Quotes

1. Những cô gái giống như những tên miền Internet, những tên đẹp mà ta thích đã có chủ nhân rồi!


Popular Posts