Android - 平铺背景偶尔会拉长

时间:2011-11-06 22:33:36

标签: android drawable tiles

我使用了几个平铺的drawable,用作各种布局的背景。在大多数情况下,瓷砖正常工作但偶尔(每4..5次运行一次)在一些(但不是全部)背景中,单个瓷砖图像被拉伸以填充背景而不是重复它(导致非常“模糊”背景)。

Tiles在xml drawable中声明如下:

`bitmap android:src="@drawable/bg_tile_dark" android:tileMode="repeat"
  xmlns:android="http://schemas.android.com/apk/res/android" />`

tile drawable用作背景图像,如下所示:

` RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@drawable/my_background_tile" >
`
....
/RelativeLayout>

此问题发生在多个Android版本和不同设备上,因此必须有一个如何使用磁贴的技巧。有没有人有使用平铺背景的经验或知道一种解决方法来强制平铺重复?

0 个答案:

没有答案
相关问题