0

i need to create tab in my application i've used the following working good... but i need it to display as tabs look into the iphone how it can possible it using android 1.6? thanks in advance..

<?xml version="1.0" encoding="utf-8"?><TabHost
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<RelativeLayout
    android:layout_height="fill_parent"
    android:layout_width="fill_parent">
    <TabWidget
        android:id="@android:id/tabs"
        android:layout_alignParentBottom="true"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" />
    <FrameLayout
        android:id="@android:id/tabcontent"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:padding="5dp" />
</RelativeLayout>

i've tried this but my application crashes

<?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>
Android
  • 8,995
  • 9
  • 67
  • 108

1 Answers1

1

I had customized android tab to look like iPhone UITabBar, found here:

OR you can implement your own tabs using RadioGroup but requires hell of work, to implement RadioGroup you can refer to this project. It uses Iphone like SegmentedControl, and you can use it by yourself to look like iphone tab.

Community
  • 1
  • 1
Adil Soomro
  • 37,609
  • 9
  • 103
  • 153
  • First two links lead to nowhere now. First gives 404, second leads to description but link for code gives 404. Dead end. – Bobrovsky Jul 26 '13 at 09:53