Did you try using a layer-list for the background?
Something like this:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="@color/green" />
</shape>
</item>
<item android:top="400dp">
<shape
android:shape="rectangle">
<solid android:color="@color/white" />
<size android:height="100dp"/>
</shape>
</item>
<item android:top="600dp">
<shape
android:shape="rectangle">
<solid android:color="@color/red" />
<size android:height="200dp"/>
</shape>
</item>
</layer-list>
I think that if you want an actual percentage you'll need to calculate it yourself. see this answer -> link