I've also experienced tileMode on drawables being ignored (1.6 SDK), generally 
when extending the existing height of a ViewGroup by adding children after the 
initial layout pass. It doesn't always exhibit the behaviour.

I didn't have time to fully investigate the problem at the SDK code level just 
yet, but this quick workaround might help you in the meantime...

BitmapDrawable drawable = (BitmapDrawable)myList.getBackground();
drawable.setTileModeY(TileMode.REPEAT);

Rich

On 15 Feb 2011, at 13:25, Marco Alexander Schmitz wrote:

> hello :)
> 
> I've got a ListView and items with their own xml.
> 
> these items do have a xml background.
> 
> this xml background is a layer-list with 4 items, one of them is a
> <bitmap tileMode="repeat" />. the others are just an alpha-gradient
> and a blue rectangle painted on top.
> 
> sometimes my tile-bitmap (just a small cirlcle.png) is painted
> correctly (lots of small small circles everywhere), sometimes there is
> only one circle which is zoomed to fill_parent.
> 
> are there any workarounds for this bug ?
> 
> btw: tested on 1.5 1.6 2.1 2.2 emulators and lots of different devices
> (desire, nexus one, galaxy, galaxy tab, x10mini, wildfire, ...)
> 
> here comes my xml:
> <?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="@color/white" />
>        </shape>
>    </item>
> 
>    <item android:top="5dip" android:right="5dip"
> android:bottom="5dip" android:left="5dip">
>        <bitmap android:src="@drawable/background_tile_blue"
> android:tileMode="repeat" />
>    </item>
> 
>    <item android:top="5dip" android:right="5dip"
> android:bottom="5dip" android:left="5dip">
>        <shape android:shape="rectangle">
>            <gradient android:startColor="#ddffffff"
> android:endColor="#00ffffff" android:angle="0" android:type="linear" /
>> 
>        </shape>
>    </item>
> 
>    <item android:top="5dip" android:right="5dip"
> android:bottom="5dip" android:left="5dip">
>        <nine-patch android:src="@drawable/background_border_blue"
> android:dither="true" />
>    </item>
> 
> </layer-list>
> 
> greetings,
> marco schmitz
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to