How can I add a gradient shadow from the right and left of the background?
The following layer-list
only adds black border from the right and left of the background, and not a gradient border.
<?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>
I am trying to add a black shadow from the right and left of the background.
I'm not very sure what you want, a gradient background or a gradient border? this will give you a gradient black shadow background
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<gradient
android:angle="0"
android:centerColor="#ffffff"
android:endColor="#000000"
android:startColor="#000000" />
</shape>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With