Elevation for ImageView is not working. I declared ImageView in XML like this:
As an addition to the clarification of BladeCoder's answer: applying android:outlineProvider="bounds"
to the ImageView
will result in the shadow to be displayed.
The elevation shadow is derived from the background drawable of a View. If your ImageView has no background, you'll see no shadow.
If you want to change that behavior, you need to build your own ViewOutlineProvider and call View.setOutlineProvider()
to set it (and this is not trivial).