I am using attr to create a selector drawable for my project so that once i change theme colors, i dont have to make any change in the drawable file. I am using following li
Finally, found the problem. There is a bug in android [pre-lollipop] OS which doesnt allow you to use attr in drawable. Here is the link to bug:
https://code.google.com/p/android/issues/detail?id=26251
Android dev team has released a fix but it works on android L and above.For workaround to this problem, refer to following solution:
How to reference style attributes from a drawable?