I'm trying to create a background for a splash screen from 2 different colors one on top of the other, each exactly half of the screen, like so:
I have tried the following but it does not work for every device because of the specified size.
<?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="#abc123" />
</shape>
</item>
<item android:top="436dp">
<shape android:shape="rectangle">
<solid android:color="#456def" />
</shape>
</item>
</layer-list>
Does anyone know of a way to create that full screen drawable background?

It is not possible to use weight/percentage dimensions in this file, you have to implement this in your layout file