在cardview上设置白色发光

问题描述 投票:0回答:1

This is what I gotI假设,这是一个非常基本的问题,但我不得不问它,因为我试图找到在MaterialCardView上设置白色发光的相关答案,或者只是CardView徒劳无功,他们提供设置边框颜色,现在任何人都请打扰自己用适当的解决方案启发我。

android layout cardview
1个回答
0
投票

我白色的卡片周围有绿色的光芒

enter image description here

试试这个代码

  <android.support.v7.widget.CardView
        card_view:cardBackgroundColor="@color/green"
        xmlns:card_view="http://schemas.android.com/apk/res-auto"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        card_view:cardCornerRadius="10dp"
        card_view:cardElevation="5dp"
        card_view:cardUseCompatPadding="true">

    <android.support.v7.widget.CardView
        android:layout_margin="3dp"
        android:id="@+id/card_view"
        xmlns:card_view="http://schemas.android.com/apk/res-auto"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        card_view:cardBackgroundColor="@color/white"
        card_view:cardCornerRadius="10dp"
       >
 </android.support.v7.widget.CardView>
    </android.support.v7.widget.CardView>
© www.soinside.com 2019 - 2024. All rights reserved.