How to add elevation to transparent ImageView [android] -
is implement elevation of imageview png contains transparent background? example: want add elevation shadow pic:
want make this:
in xml add this:
android:elevation="2dp" android:background="@drawable/myrect"
in drawable folder add 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 more info: http://developer.android.com/training/material/shadows-clipping.html
Comments
Post a Comment