Tiled drawable sometimes stretches

前端 未结 8 630
余生分开走
余生分开走 2020-11-29 20:59

I have a ListView whose items have a tiled background. To accomplish this, I use the following drawable xml:



        
8条回答
  •  既然无缘
    2020-11-29 21:37

    This blog entry discusses the issue

    combined with this solution from Tapas listed by Ivo van der Wijk, it works for me.

    The key was to remove the tiled setting from the XML, then set it to tiled at runtime. It does not work for me if they are both set to tiled.

    Edit: actually, I lied. Even with this it seems to sometimes fail to tile.

    Would be very nice to have a reliable work-around.

    Edit 2: setting it to something else (eg. CLAMPED) then setting it back so far seems to be working.

提交回复
热议问题