I have to do these kind of checks pretty often in my code and i wanted to know if there is a clean way of getting resources without having to write if statements to check for versions.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
{
imageView.setImageDrawable(getDrawable(R.drawable.ic_circled_v));
}
else
{
imageView.setImageDrawable(getResources().getDrawable(R.drawable.ic_circled_v));
}