Issue
I want create custom background and i want create this in drawable
folder.
For this background i write below codes :
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="1dp"
android:color="@color/gradient_center" />
<corners android:radius="5dp" />
</shape>
but in this code i just set sold color for stroke
, i want set gradient color for stroke
color.
how can i it?
Solution
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:angle="90"
android:endColor="#b5b6d2"
android:startColor="#555994"
android:type="linear" />
<corners android:radius="5dp" />
</shape>
Answered By - Hamed Nabizadeh
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.