我将尝试为 Cardview 移除阴影效果。
我在 Android v4.4.2 上使用了 android support v7 的 Cardview。
正如您所见,我使用了:
但是你仍然可以在我附上的图片中看到顶部显示的阴影。
我在 Android v4.4.2 上使用了 android support v7 的 Cardview。
我的布局如下所示:
<android.support.v7.widget.CardView
android:id="@+id/cardContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
card_view:cardBackgroundColor="@color/transparent"
card_view:cardCornerRadius="0dp"
card_view:cardElevation="0dp"
card_view:cardPreventCornerOverlap="false"
card_view:contentPadding="0dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<include layout="@layout/include_profile_header" />
<include layout="@layout/include_profile_footer" />
</RelativeLayout>
</android.support.v7.widget.CardView>
正如您所见,我使用了:
card_view:cardElevation="0dp"
目前为止尝试过的方法:
android:background="@null"
但是你仍然可以在我附上的图片中看到顶部显示的阴影。
![CardView Shadow](https://istack.dev59.com/piOto.webp)