i'm trying to get a custom tab bar working on different screens and just saw a weird thing.
Trying on two HTC phones, the Legend and the new One X.
tab layout is in its own file (tab_indicator.xml) , looks like this:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="0dp"
android:layout_height="50dp"
android:layout_weight="1"
android:layout_marginBottom="0dp"
android:orientation="vertical"
android:background="@drawable/tab_indicator"
android:padding="3dp">
<ImageView android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:src="@drawable/icon"
/>
<TextView android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="11dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="0dp"
style="?android:attr/tabWidgetStyle"
/>
Now, my problem is the "layout_height"!
On the Legend, this works fine, my icons appear with some space under them before the text shows.
On the One X, however, the bar actually looks smaller and the text clashes into the icons, i.e. the height seems to small!
I would have expected the other way around since the screen is much larger on the One x...
if anybody has any thoughts, i'd appreciate it.