2011-06-20 18 views
1

リストビューをカレンダービューで線形レイアウトで表示しようとしています。私は垂直レイアウトを使用しているときリストビューが表示されますが、水平レイアウトで同じlistview disaappears。私は相対的なレイアウトを使用して問題を解決したが、私はこの線形layout.hereを使用して行うことができますことは、私の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> 

答えて

1

あなたはscrollviewにfillviewportフラグを設定する必要があります。

android:fillViewPort="true" 

チェックこのリンクを知っているfillviewportフラグが何をするか:ScrollView

関連する問題