【问题标题】:Customize shadows with cardslib使用 cardlib 自定义阴影
【发布时间】:2015-05-06 09:30:39
【问题描述】:

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

我有卡

<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 文件夹中,这没有任何意义。

怎么了?谢谢!

【问题讨论】:

    标签: android cardslib


    【解决方案1】:

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

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

    注意:CardViewNative 不使用这个视图,因为它是 本机支持。

    只有 CardView 支持以下所有功能

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-04-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-03-27
      相关资源
      最近更新 更多