It's part of the code cleanup, to make the XML attributes conform to the Java setter/getter properties and vice versa.
Eg. Setting a background in XML is done through the *android:background*attribute. The corresponding setter of the attribute in Java was *setBackgroundDrawable *. The two attribute names are not the same: *drawable *vs *backgroundDrawable* . They decided to make them the same by changing the Java name of this attribute to *drawable *as well, resulting in a setter called *setDrawable*. On Thursday, October 25, 2012 11:06:45 AM UTC-4, kj wrote: > > Hi all, > > I was looking over the View class source today and noticed that > setBackgroundDrawable() has been deprecated as of API 16 in favor of > setBackground(). I'm curious as to why this is, as the current > View.setBackground() method just calls setBackgroundDrawable(). What was > the reason for the change and should I being to switch my calls to > setBackgroundDrawable() to setBackground()? > > Thanks, > KJ > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

