gpt4 book ai didi

android - 使用 cardslib 自定义阴影

转载 作者:行者123 更新时间:2023-11-30 02:11:08 25 4
gpt4 key购买 nike

我想用 Cardslib 更改 Material 卡的默认阴影。

我有卡

<it.gmariotti.cardslib.library.view.CardViewNative
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card="http://schemas.android.com/apk/res-auto"
android:id="@+id/list_cardId"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/native_recyclerview_card.base"
card:card_layout_resourceID="@layout/native_material_largeimage_card"/>

根据文档 https://github.com/gabrielemariotti/cardslib/blob/master/doc/SHADOW.md#customizing-shadow我将带有我的值的 card_shadow.xml 添加到/drawable 文件夹,但它没有任何意义。

怎么了?谢谢!

最佳答案

自定义阴影适用于 CardView 并且您正在创建 CardViewNative

阅读页首https://github.com/gabrielemariotti/cardslib/blob/master/doc/SHADOW.md

Pay attention: the CardViewNative doesn't use this view, because it is natively supported.

All the features below are supported only by CardView

关于android - 使用 cardslib 自定义阴影,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30072792/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com