Отображение тонкой линии между элементами карты - PullRequest
1 голос
/ 08 июня 2019

enter image description here

Как показано на скриншоте выше, вы можете видеть номер обложки элемента по просмотру карты, но вопрос состоит в том, что представление карты содержит тонкий между двумя элементами

Как я могуудалите эту тонкую линию, мое свойство cardview xml

  <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <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="5dp"
        android:layout_marginLeft="10dp"
        android:layout_marginRight="10dp"
        android:layout_marginTop="5dp"
        card_view:cardPreventCornerOverlap="true"
        card_view:cardElevation="10dp"
        card_view:cardBackgroundColor="@color/white"
        card_view:cardCornerRadius="4dp">

    </android.support.v7.widget.CardView>
</RelativeLayout>

Ответы [ 2 ]

2 голосов
/ 08 июня 2019

изменение

card_view:cardElevation="10dp"

к этому:

card_view:cardElevation="2dp"
1 голос
/ 12 июня 2019

Вы должны уменьшить высоту карты. Измените код следующим образом

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <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="5dp"
        android:layout_marginLeft="10dp"
        android:layout_marginRight="10dp"
        android:layout_marginTop="5dp"
        card_view:cardPreventCornerOverlap="true"
        card_view:cardElevation="2dp"
        card_view:cardBackgroundColor="@color/white"
        card_view:cardCornerRadius="4dp">

    </android.support.v7.widget.CardView>
</RelativeLayout>
...