Search code examples
androidgraphicsdrawablenine-patch

How to create a resizable cross hatched drawable in Android


I would like to be able to apply a cross hatch as the background of a row in a table. I do not think you can create a cross hatch effect as a 9-patch. Does anyone know another way to get this effect?


Solution

  • Create a repeatable tile image of the desired pattern, and repeat it in the background. The code to accomplish this can be found in answers to this question - Android Tile Bitmap