Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with CardView #7

Open
mradzinski opened this issue Aug 27, 2017 · 3 comments
Open

Issue with CardView #7

mradzinski opened this issue Aug 27, 2017 · 3 comments

Comments

@mradzinski
Copy link

mradzinski commented Aug 27, 2017

When used with CardView, the bottom of the cards gets blended and the top card loses its bottom shadow. Any idea why this can happen?

screenshot

@diogobernardino
Copy link
Owner

No, it comes with surprise as I don't recall seeing it. I'm also using CardView in the sample application so once I find the time I will try to round corners there and see it.

@mradzinski
Copy link
Author

mradzinski commented Aug 28, 2017

I ended up doing something like this in my adapter (using kotlin, but it's sort of clear enough):

        // holder is just a ViewHolder and card is the root view of the items, a CardView.
        if (position == 0) {
            holder.card?.cardElevation = 6.dp.toFloat()
        } else if (position == 1) {
            holder.card?.cardElevation = 4.dp.toFloat()
        }

I checked your "der die das" app and you seem to be doing something similar to this (when you move a card away you can see the next card elevation changing a bit). This pretty much solved up everything.

cards

@diogobernardino
Copy link
Owner

I'm sorry, when I first replied I was actually referring to a different open source project.

You're correct, I'm not handling the shadow in the rossdeckview library itself, but instead in the adapter. Pretty much as you have just done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants