Is it really to implement elevation of ImageView with png that contains transparent background? For example: i want to add elevation shadow to this pic:
Want make it like this:
Is it really to implement elevation of ImageView with png that contains transparent background? For example: i want to add elevation shadow to this pic:
Want make it like this:
In your XML add this:
android:elevation="2dp"
android:background="@drawable/myrect"
In your Drawable folder add this drawable:
<!-- res/drawable/myrect.xml -->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#42000000" />
<corners android:radius="5dp" />
</shape>
See here for more info: http://developer.android.com/training/material/shadows-clipping.html
© 2022 - 2024 — McMap. All rights reserved.