TileMode repeat in drawable will not work

I have this resource:

<?xml version="1.0" encoding="utf-8"?>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
    android:src="@drawable/bg_stripe"
    android:tileMode="repeat"
    android:antialias="true"
    android:dither="false"
    android:filter="false"
    android:gravity="left"
/>

used here as a background:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/bg_world_locked" >

Sometimes everything works well, sometimes not (the resource available for the resource appears in its real small size and does not repeat). What for? Is this an Android bug? I run this on my HTC Desire Android 2.3.

+5
source share
1 answer

Unfortunately, yes, this is an Android bug. Check this answer

Cut-out tiles sometimes stretch

In short: you should set repetition in Java code instead of XML.

+5
source

All Articles