特定の高さでリストビュー内のアイテムを調整したい。
私が行うアダプター: ?android:attr/listPreferredItemHeight、リストビューの高さがfill_parentの場合にうまく機能します。
<TextView
android:id="@+id/FirstText"
android:layout_width="wrap_content"
android:layout_height="?android:attr/listPreferredItemHeight"
android:layout_weight="1"
android:gravity="center_vertical"
android:paddingBottom="10dip"
android:paddingLeft="6dip"
android:paddingTop="12dip"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textSize="18dip"
android:textColor="#000000" />
<ListView
android:id="@+id/android:list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#ffffff"
android:cacheColorHint="#ffffff"
android:divider="#4436f2"
android:dividerHeight="1px"
android:scrollbars="none"
android:fadingEdge="none"/>
しかし、リストビューの高さが特定のサイズの場合、項目が収まりません。
<ListView
android:id="@+id/android:list"
android:layout_width="fill_parent"
android:layout_height="200sp"
android:background="#ffffff"
android:cacheColorHint="#ffffff"
android:divider="#4436f2"
android:dividerHeight="1px"
android:scrollbars="none"
android:fadingEdge="none"/>
特定のリストビューで項目の高さを調整するにはどうすればよいですか?