SyntaxFix
Write A Post
Hire A Developer
Questions
Try this:
li.setBackgroundColor(android.R.color.red); //or which ever color do you want
EDIT: Posting logcat file would also help.