This is the code used to generate the button
Button delBtn = new Button(activity);
LayoutParams params = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
delBtn.setLayoutParams(params);
delBtn.setCompoundDrawablesWithIntrinsicBounds(0,0,R.drawable.ic_action_cancel, 0);
delBtn.setBackgroundColor(Color.rgb(208, 0, 0));
Result Looks like this:
Whereas I expect:
`
What is it that I missed?