Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/qt/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android Cardview角(边)显示为深色,如何解决此问题?_Android_Android Viewpager_Android Cardview - Fatal编程技术网

Android Cardview角(边)显示为深色,如何解决此问题?

Android Cardview角(边)显示为深色,如何解决此问题?,android,android-viewpager,android-cardview,Android,Android Viewpager,Android Cardview,我使用card view作为自动滚动查看寻呼机的显示角,但card view角显示颜色不同,请帮助我解决此问题 <android.support.v7.widget.CardView android:layout_width="fill_parent" android:layout_height="fill_parent" app:cardElevation="0dp" app:cardCornerRadius="@dimen/_12sdp"> 在cardview中尝试属性 app

我使用card view作为自动滚动查看寻呼机的显示角,但card view角显示颜色不同,请帮助我解决此问题

<android.support.v7.widget.CardView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
app:cardElevation="0dp"
app:cardCornerRadius="@dimen/_12sdp">

在cardview中尝试属性

app:cardBackgroundColor="@android:color/transparent"
app:cardUseCompatPadding="true"

将此添加到可绘制文件

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <shape>
            <solid
                android:color="@color/grey_light">  // here you can change color to white
            </solid>
            <corners android:radius="@dimen/dimen10"
                />
        </shape>
    </item>
</selector>

//在这里你可以把颜色改成白色

然后将其用作任何布局的背景

我不知道为什么,但将透明背景色应用于内部视图是可行的。
如果您有exoplayer视图,请将其应用于快门背景颜色。

我设置了此参数,它对我有效


请附上一个屏幕截图,以便更好地理解。您能添加完整的布局代码吗?为卡片视图的所有侧面提供边距或将卡片高程设置为0@KrutikaChotara已添加app:cardElevation=“0dp”app:cardBackgroundColor=“@android:color/transparent”仍然不起作用您是否在carview中添加了标签,即背景?简单背景在card view中不起作用请尝试aap:CardBackground参考此链接-:其应用程序:cardBackgroundColor非应用程序:CardBackground您救了我的命!非常感谢。在添加了
app:cardBackgroundColor=“@android:color/transparent”
之后,这个漏洞就消失了,我在过去的两天里一直在关注这个问题!谢谢
android:outlineSpotShadowColor="@color/white"