I made a background for my application that includes two images. The first one has a height of 480px; the second one should be displayed at the bottom of the first one.
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<bitmap
android:src="@drawable/bg_top"
android:tileMode="repeat" />
</item>
<item
android:top="480px">
<bitmap
android:src="@drawable/bg_bottom"
android:tileMode="repeat" />
</item>
</layer-list>
But this doesn't work on my Smartphone - it interprets the px wrong (actually it looks like the top-value is about 200px)
I know that working with dp is recommended, but how do I convert this px value into dp? I can't do it programmatically, since it's saved in a xml-document.