I
I
Ilya2016-04-06 19:43:50
Android
Ilya, 2016-04-06 19:43:50

Why is drawable.xml not rendering correctly?

Hello!
Actually the problem is in the question. There is a drawalbe file with the content:

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <shape android:shape="rectangle">
            <stroke
                android:width="1dp"
                android:color="#c7b299">
            </stroke>
            <solid android:color="#00ffffff">
            </solid>
        </shape>
    </item>
    <item android:left="-5dp" android:top="-5dp" android:bottom="-5dp" android:width="59dp">
        <shape android:shape="rectangle">
            <stroke android:width="1dp" android:color="#c7b299"></stroke>
        </shape>
    </item>
    <item android:left="12dp" android:top="16dp" android:gravity="left" android:width="30dp" android:height="21dp">
        <bitmap
            android:src="@drawable/mini_dish"
            android:gravity="fill"></bitmap>
    </item>
</layer-list>

In Android Studio it is displayed as it should:
9b1b65deffe64f85bb0bce6bb6851f7f.PNG
And in the Genymotion emulator (API 16) it's completely different:
a9a1de0e0a9a4d129171dea97b995549.PNG
What's the problem, what's wrong?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question