よくWebサイトであるような、小さな画像を背景にタイル状に敷き詰める方法。 xmlでの方法を書く人は居るのに、javaで書いてくれてる人が居ないので整理しておく。 XML指定での方法 res/drawable/icon_repeat.xml ポイントはtileModeをrepeatに設定している事。 <?xml version="1.0" encoding="UTF-8"?> <bitmap xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:tileMode="repeat" android:src="@drawable/icon" ></bitmap> res/la
![タイル状に画像を敷き詰める - hyoromoのブログ](https://cdn-ak-scissors.b.st-hatena.com/image/square/2b6e246b05f45509fdee8682b2ee60a8849f60a5/height=288;version=1;width=512/http%3A%2F%2Fcdn-ak.f.st-hatena.com%2Fimages%2Ffotolife%2Fh%2Fhyoromo%2F20110208%2F20110208025608.png)