title: how to get the background id of the button
body: <p>I want to get the generated ID of the background image of my button.
  That star image is from drawable; I want to get its generated ID.</p>
  
  <p>I know <code>.getId</code> will get the particular ID of the button, but the ID of the background resource is what I want to get. There's no such thing as <code>button.getBackground().getId()</code></p>
  
  <pre><code>&lt;Button
      android:id="@+id/btnhgfavorite"
      style="?android:attr/buttonStyleSmall"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:background="@drawable/star" 
      android:focusable="false"/&gt;
  </code></pre>