problem in showing listview in horizontal layout?
I am trying to show a list view with calendar view in a linear layout. when i am using vertical layout then list view appears but in horizontal layout the same listview disaappears. I solved the problem using relative layout, but can i do this using linear layout.here is my xml...
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ScrollView01"
android:layout_height="fill_parent"
android:layout_width="fill_parent">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<com.exina.android.calendar.CalendarView
android:layout_height="wrap_content"
android:id="@+id/calendar" android:layout_width="wrap_content">
</com.exina.android.calendar.CalendarView>
<ListView android:layout_height="fill_parent" android:id="@+id/android:list"
android:layout_weight="1" android:scrollingCache="false"
android:layout_width="fill_parent" android:drawSelectorOnTop="false"
android:dividerHeight="4.0sp"></ListView>开发者_如何转开发;
</LinearLayout>
</ScrollView>
You need to set the fillviewport flag in the scrollview :
android:fillViewPort="true"
Check this link to know what fillviewport flag does: ScrollView
精彩评论