SyntaxFix
Write A Post
Hire A Developer
Questions
Try this:
layout.setBackground(ContextCompat.getDrawable(context, R.drawable.ready));
and for API 16<:
layout.setBackgroundDrawable(ContextCompat.getDrawable(context, R.drawable.ready));