如何在背景的右侧和左侧添加渐变阴影?
以下layer-list
仅在背景的右侧和左侧添加黑色边框,而不是渐变边框。
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<shape android:shape="rectangle" >
<gradient
android:angle="0"
android:centerColor="#ffffff"
android:endColor="#000000"
android:startColor="#000000" />
</shape>
</item>
<item
android:left="2dp"
android:right="2dp">
<shape android:shape="rectangle" >
<solid android:color="@color/blue" />
</shape>
</item>
</layer-list>
我正在尝试在背景的右侧和左侧添加黑色阴影。