リスト項目のサイズが、電話機が21+であるかどうかによって異なる問題があります。リスト項目のサイズを一致させる
21より前のデバイスでアイテム間の間隔が同じになるようにするにはどうすればよいですか?
一覧:
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:clipToPadding="false"
android:divider="@color/transparent"
android:dividerHeight="0dp"
android:listSelector="@drawable/list_selector_transparent"
android:paddingBottom="1dp"
android:paddingTop="3dp"
android:scrollbarAlwaysDrawVerticalTrack="false"
android:smoothScrollbar="true"
android:visibility="visible" />
アイテム:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusable="false">
<android.support.v7.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:id="@+id/card_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="3.5dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginTop="1.5dp"
card_view:cardCornerRadius="3dp"
card_view:cardElevation="1.7dp">
</android.support.v7.widget.CardView>
</LinearLayout>
あなたが解決策を知っていれば、私は非常に感謝されます。おかげ
ここでは、私が何を意味するかの写真です: