How to add elevation to transparent ImageView [android] -


is implement elevation of imageview png contains transparent background? example: want add elevation shadow pic:

enter image description here

want make this:

enter image description here

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

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -