I'm searching on google how to transform these shapes to java code but I can't find the way, also I checked the documentation and nothing...
These are the shapes:
shape1.xml:
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:dither="true"
android:shape="oval" >
<gradient
android:endColor="#ffff6600"
android:gradientRadius="150"
android:startColor="#ffffcc00"
android:type="radial"
android:useLevel="false" />
<size
android:height="100dp"
android:width="100dp" />
</shape>
shape2.xml:
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:dither="true"
android:shape="rectangle" >
<solid android:color="#339933"/>
</shape>
Which is the correct java code transformation for these simple shapes?