setBackgroundResource() to spinner in Android 5 not works

strange things happen. I am trying to set background to spinner. spinner.setBackgroundResource(R.drawable.spinner_error); This code works perfect in lower Android versions than 5, but in lollipop, this code do nothing. I tried to change color spinner.setBackgroundColor(Color.RED); but it only makes spinner invisible. So, how to change spinner color/resource ?

Source: android

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.