1
我有一個ListView,其中我添加了一個標題。該標題包含另一個ListView。我希望頭部中的ListView增長,而不是有限大小的滾動。如何使列表視圖增長而不是滾動?
此我膨脹在頭
<ListView android:id="@+id/songinfo_geninfolist"
android:isScrollContainer="false" android:layout_marginLeft="10dip"
android:layout_margin="5dip" android:padding="5dip"
android:scrollbars="none"
android:layout_height="wrap_content" android:layout_width="match_parent">
</ListView>
和該XML是用於主列表
<ListView android:id="@+id/songinfo_linklist"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_marginTop="10dip" android:layout_margin="5dip"
android:layout_height="match_parent" android:layout_width="match_parent">
</ListView>
但我得到含有標題列表一個小高的名單。我希望頭中的列表隨內容一起增長。
我可以在運行時更新列表高度嗎? 我需要一個列表視圖,因爲我希望它的項目得到專注和點擊。 – rohit
問題解決了。我根據內容設置高度。 – rohit