Issue
i want something like following image
i tried it using drawable shape
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<gradient
android:angle="360"
android:centerX="50%"
android:centerY="50%"
android:gradientRadius="50%"
android:endColor="#000000"
android:centerColor="#FFFFFF"
android:startColor="#000000" >
</gradient>
</shape>
Solution
Make a new Android xml file (say GreyRadial.xml) file in your drawable folder
In your xml file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<gradient
android:centerColor="#c1c1c1"
android:endColor="#4f4f4f"
android:gradientRadius="400"
android:startColor="#c1c1c1"
android:type="radial" >
</gradient>
</shape>
Use this xml in your layout background using
android:background="@drawable/GreyRadial"
Answered By - Himanshu Joshi
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.