我试图从Cardview中删除阴影。
我用支持Android V7 Cardview在Android v4.4.2Android 4.4从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"
但是你仍然可以在图像中看到我附上了显示的顶部阴影。
尝试删除cardBackgroundColor @ motis10 –
安卓cardBackgroundColor不存在,card_view:cardBackgroundColor既不 – motis10
card_view:cardBackgroundColor =“@色/透明“删除此 –