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