try this:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<solid android:color="#0f0" />
</shape>
</item>
<item>
<clip>
<shape>
<solid android:color="#f00" />
</shape>
</clip>
</item>
</layer-list>
make sure to call view.getBackground().setLevel(5000) in order to see half red half green output