title: How to change View background/foreground to a specific pattern?
body: <p>So I'm making a simple snake game in android. For the board I'm using a gridlayout with TextViews, which I simply change the background color in if the snake reaches that TextView. Very simple!</p>
  
  <p>Now I want to change the views so they get a certain pattern if the snake reach them. I've unsuccessfully tried several ways, but I think the best way would be to put a foreground in the view.</p>
  
  <p>I'm currently trying</p>
  
  <pre><code>TextView tempHead = (TextView) grid.getChildAt(headIndex);
  tempHead.setBackgroundColor(snakeColor);
  tempHead.setForeground(...);
  </code></pre>
  
  <p><code>tempHead.setForeground()</code> accepts <code>"android.graphics.drawable.Drawable foreground"</code></p>
  
  <p>Drawable is abstract, and I don't know what subclass is best to make my own pattern (and is it best to do in XML, programmatically or maybe a picture?)</p>
  
  <p>So basicaly my question is: how can I make my own pattern as a Drawable? </p>
  
  <p>Thanks in advance.</p>