Elevation not working for ImageView

后端 未结 8 713
后悔当初
后悔当初 2020-12-28 13:26

Elevation for ImageView is not working. I declared ImageView in XML like this:



        
8条回答
  •  执笔经年
    2020-12-28 14:13

    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).

提交回复
热议问题