I have a very strange problem here. In the following xml section I'm trying to use include:
<!-- CONTENT --> <ScrollView android:layout_width="fill_parent" android:layout_height="fill_parent" android:fadingEdge="none"> <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent"> <include android:id="@+id/summary" layout="@layout/view_summary" android:layout_width="fill_parent" android:layout_height="fill_parent"/> </LinearLayout> </ScrollView>
(the section is in a main linear layout with vertical orientation and both width and height set to fill parent)
The included xml:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/white">
<ListView android:id="@+id/news_list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:cacheColorHint="@color/transparent"
android:background="@color/transparent" />
<Button android:id="@+id/news_load_more"
android:layout_width="fill_parent"
android:layout_height="40dip"
android:text="Load more..."/>
</LinearLayout>
The problem is that the ListView is not taking up the whole height (the height of the screen), only the size of one single list item. I have tried setting layout parameters from code, but it didn't helped.
Any idea is welcomed. Thanks.