Problem description
Starting from SDK 3.0.0, it is not possible anymore to customize the position of the TabGroup bar, in order to set it at bottom.
Steps to reproduce
1. Create the default tabbed app
2. add the file platform/android/res/layout/titanium_tabgroup.xml with the following content:
<?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">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="0dp">
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="0dp"
android:layout_weight="1"/>
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0"/>
</LinearLayout>
</TabHost>
Running on SDK 2.1.4, the TabGroup is shown on bottom; with SDK 3.0.0 and 3.1.0 this is not working anymore.
Before SDK 3.0, we used [TabActivity](http://developer.android.com/reference/android/app/TabActivity.html) to implement the TabGroup. Since TabActivity is deprecated, we now use [TabHost](http://developer.android.com/reference/android/widget/TabHost.html) to implement the TabGroup for API level < 11 in SDK 3.0. We define the TabHost layout in the code. That's why the custom TabHost layout xml file does not work anymore. Based on the guideline of [Pure Android](http://developer.android.com/design/patterns/pure-android.html), the bottom tab bars are not recommended. In addition, for API level >= 11 we use ActionBar to implement the TabGroup, in which case tab bars can only be on the top. In order to provide a consistent experience, we don't recommend using bottom tab bars.
Resolve the ticket as Won't fix since it's never been supported in our SDK and it's not a recommended way to design Android apps.
Hi. I understand and kind off agree to put tabs on top for a consistent experience. But since my app is multiplataform and I would like it to be the same experience on iOS, Android and HTML5, I must ask: With Ti SDK 3+, there is a way to render tabs at bottom on Android? Thank you.
Hi Allan, since the layout is hard coded in our code now I don't think there is a way to render tabs at bottom except writing your own module to do it.
Sorry, this doesn't mean only that you can't move it to the bottom, but even that you can't hide them (in case you want to still use the tabs for managing the windows), so you always HAVE to use them. Unless you open and close windows manually and lose the going back actions. (Es: if you open your windows using Ti.UI.currentTab.open(newWin) and then close it, you'll go back to your previous window, if you open it with newWin.open() you have a totally different behavior.) Saying that it's not possible and closing the ticket it's quite an easy solution.
Hi Ping Wang, you stated that you are using the TabHost layout , so why not at least enable controls on the tab such as for example hiding the Tabhost: http://kb.gosi.at/content/36/111/en/how-to-hide-tabwidget-of-tabhost.html