Alex
Alex

Reputation: 11

Customize shadows with cardslib

I'd like to change default shadow for material card with Cardslib.

I have card

<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"/>

According to documentation https://github.com/gabrielemariotti/cardslib/blob/master/doc/SHADOW.md#customizing-shadow I added card_shadow.xml with my values to /drawable folder and it's doesn't make any sense.

What's wrong? Thank you!

Upvotes: 1

Views: 72

Answers (1)

Sharjeel
Sharjeel

Reputation: 15798

Custom shadow works with CardView and you are creating CardViewNative

Read at the start of the page 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

Upvotes: 1

Related Questions