[英]How to make drop shadow for shape in Android?
尝试通过包含依赖来使用这个github 项目
compile 'com.h6ah4i.android.materialshadowninepatch:materialshadowninepatch:1.0.0'
您可以使用“渐变”,“gradientRadius=”30”是您查看的高度,颜色“10”是alpha值。
<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"
/>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.