title: How to get textview drawable resource id
body: <p>I have an UI with some TextViews and I want to test if a textView has a certain drawable resource as background.  I'm using the following code, but the <code>tag</code> is always null.  </p>
  
  <pre><code>Object tag = textView.getTag();
  int backgroundId = R.drawable.bg_image_2;
  if( tag != null &amp;&amp; ((Integer)tag).intValue() == backgroundId) {
     //...do something...
  }else{
     //...do something...
  }
  </code></pre>
  
  <p>Which method returns the <code>R.drawable</code> background id number of an object? What am I doing wrong?</p>