samedi 25 avril 2015

CardView shadow not visible on Lollipop


I have found a weird issue in CardView. When I try to add a programmatically created CardView to an xml inflated ViewGroup, shadow is rendered on Lollipop devices. However if I add this cardView inside a programmatically created ViewGroup Eg. RelativeLayout, & then add this relativeLayout in xml inflated Viewgroup the shadow isn't rendered on lollipop. I don't know if I have to set a property that OS sets automatically while inflating xml views & that is mandatory to set if we are creating ViewGroups programmatically in order to draw shadows. Please note that on pre lollipop devices shadows are rendered no matter in which ViewGroup do I add the cardView. How can I resolve this issue?

Code Here: http://ift.tt/1zYHW96

Best Regards


Aucun commentaire:

Enregistrer un commentaire