-1

I'm trying to design a shape so that it has a drop shadow like on the picture below(that login shape).

enter image description here

Niklaus
  • 159
  • 1
  • 2
  • 11
  • did you tried using cardview and giving elevation to some 16. – vikas kumar Feb 16 '20 at 16:15
  • It may help to resolve your issue. Check this [drop shadow](https://stackoverflow.com/questions/5197892/add-shadow-to-custom-shape-on-android) – KAL Feb 16 '20 at 16:17

2 Answers2

0

Try using this github project by including dependency

compile 'com.h6ah4i.android.materialshadowninepatch:materialshadowninepatch:1.0.0'
Faisal Naseer
  • 4,110
  • 1
  • 37
  • 55
0

you can use "gradient",the "gradientRadius="30" is you view high, color "10" is alpha value.

<shape xmlns:android="http://schemas.android.com/apk/res/android">    
<gradient 
    android:startColor="#10ff0000"
    android:endColor="#10ffffff"
    android:centerX="0.5"
    android:centerY="0.5"
    android:gradientRadius="30"
    android:type="radial"
    /> 
igarasi
  • 137
  • 7