私が理解できないリスト項目のレイアウトに問題があります。私はリスト項目の高さを70dpに設定しますが、40dpの高さのコンテンツしか持たない場合は、android:layout_heightで設定した値を自動的に無視して、代わりに高さとしてwrap_contentのように見えます。代わりにwrap_contentを使用して、設定された高さを無視するリスト項目
私はリストの外でexakt同じレイアウトを使用する場合、それは意図したとおりに動作します。
以下は私のリストのリスト項目のレイアウトです。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_height="70dip"
android:layout_width="fill_parent">
<TextView android:id="@+id/name"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
style="@style/NormalText"/>
<TextView android:id="@+id/description"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
style="@style/VerySmallLightText"/></LinearLayout>
私のコードをよりよく反映するように編集しました。私はそこにスタイルの属性をいくつか持っているので、私は誤って手動でここにそれを結びつけたときに誤ってタイプミスをしたのです。
私は私の一部にここ –