getResources().getColor(R.color.color_name)
is now deprecated in API Level 23 but can work by adding a Color Theme as a second parameter like
getResources().getColor(R.color.color_name, Theme)
according to the new documentation but when I pass in null value for the Theme like
getResources().getColor(R.color.color_name, null)
my app crashes. Maybe I am missing something in my understanding. Please help, thanx in advance.