Hey guys,
I'm trying to build an interface and I'm having some trouble with the
ScrollView component. Basically, no matter what height I set the
ScrollView, it only renders 45px high. Even if I set the height to a
fixed pixel number (like, 200px) it still only renders into a tiny
area of the screen.
Generally, I've got a pair of tabs at the top, then the FrameLayout.
Inside of that, my first tab is a vertical LinearLayout, with a
horizontal LinearLayout holding small labels, then a ScrollView with a
ListView inside of that. The FrameLayout appears to be rendering the
full height, as my second tab fills the space as you would expect.
Here is the XML:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TabHost
android:id="@+id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TabWidget
android:id="@android:id/tabs"
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:paddingTop="35px">
<LinearLayout
android:id="@+id/packageTab"
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<include
layout="@layout/review_collection_header" />
<ScrollView
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="200px">
<ListView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/listByPackage"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:drawSelectorOnTop="false"
/>
</ScrollView>
</LinearLayout>
<Button
android:id="@+id/brandTab"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="A semi-random button"
/>
</FrameLayout>
</TabHost>
</LinearLayout>
also, here is the included review_collection_header layout:
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#FF000000"
xmlns:android="http://schemas.android.com/apk/res/android">
<TextView
android:text="Name"
android:gravity="left"
android:layout_width="152px"
android:layout_height="wrap_content"
android:textColor="#FFFFFFFF"
android:textSize="10px"
android:textStyle="bold"
/>
<TextView
android:text="Max"
android:gravity="left"
android:layout_width="50px"
android:layout_height="wrap_content"
android:textColor="#FFFFFFFF"
android:textSize="10px"
android:textStyle="bold"
/>
<TextView
android:text="Qty"
android:gravity="left"
android:layout_width="50px"
android:layout_height="wrap_content"
android:textColor="#FFFFFFFF"
android:textSize="10px"
android:textStyle="bold"
/>
<TextView
android:text="Price"
android:gravity="left"
android:layout_width="78px"
android:layout_height="wrap_content"
android:textColor="#FFFFFFFF"
android:textSize="10px"
android:textStyle="bold"
/>
</LinearLayout>
Can anyone shed some light on what could be happening here?
Thanks a lot!
E
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---