title: Android get background color of parent view if no background color set
body: <p>I have a a TextView for which I have not set a background color yet. I would like go the background color, but when I do <code>((ColorDrawable) mTextView.getBackground()).getColor()</code> I obviously get a null pointer exception. </p>
  
  <p>How would I traverse the view hierarchy of the TextView to find the most recent <strong>background color</strong> in the hierarchy that the TextView uses as background as a result.</p>
  
  <p>And <strong>how would I determine the background color if no background color has been set in the hierarchy?</strong> And how would I determine that situation? How can I tell that no background has been set?</p>
  
  <p>I basically have difficulty to determine the background color of a view when it has not been set explicitly.</p>