Android-5: Card and images with rounded corners in Android 4
Card and images with rounded corners in Android 4
As you know the CardView in support library has a different behaviour for API=21 and API < 21.
If you would like to have an image (full or partial) inside your cardView with Rounded corners it is by default only in Android 5.
This gist can be useful to achieve the same aspect also in Android V4 (and as always it can be improved)
Here the link.
The trick is to elaborate the image and obtain an image with rounded corners (I am using the snippet published by +Romain Guy)
Pay attention: you have to use
cardView.setPreventCornerOverlap(false); to avoid the internal padding in api<21.
As you know the CardView in support library has a different behaviour for API=21 and API < 21.
If you would like to have an image (full or partial) inside your cardView with Rounded corners it is by default only in Android 5.
This gist can be useful to achieve the same aspect also in Android V4 (and as always it can be improved)
Here the link.
The trick is to elaborate the image and obtain an image with rounded corners (I am using the snippet published by +Romain Guy)
Pay attention: you have to use
cardView.setPreventCornerOverlap(false); to avoid the internal padding in api<21.
Lovelly blog you have here
ReplyDeleteHello! Cards and images with rounded corners always look appealing to me. When I first joined university, I received a card with rounded corners, and I really liked it. This inspired me to start a business offering similar products. However, managing the business left my dissertation incomplete, so I had to seek assistance from dissertation help online. After using their service, I was really satisfied with the results.
ReplyDelete