I wanted to use view.setBackgroundDrawable(Drawable)
but this method is deprecated. It is replaced with .setBackground(Drawable)
. But my minimum of API 8 can't handle that. It tells me to set the minimum to API 16.
Is there a way to use a different method, based on the API of the device?
Something like
if(API<16)
{
view.setBackgroundDrawable(Drawable)
}
else
{
view.setBackground(Drawable)
}
Or do I really have to change the minimum API to do this?