如何申请阴影ImageView的?阴影、ImageView

2023-09-07 15:22:05 作者:漸行漸遠、那流逝的年華

我想申请阴影的的ImageView 。当我申请阴影到的TextView 我得到它,但同样它没有得到到的ImageView 。我怎样才能解决这个问题?

I want to apply shadow to the ImageView. When I'm applying shadow to a TextView I'm getting it but same it's not getting to ImageView. How can I solve this problem?

推荐答案

您可以创建一个图层列表绘制并把你的两个项目(可绘制),在它的形象和你的影子。

You can create a layer list drawable and put your two items (drawables) in it for an image and your shadow.

您阴影项目的位置和放大器;内容可能会根据您要应用的阴影变化(前,左,右,既右放,左等)和你的影子风格。

Your shadow item's position & content might change according to where you want to apply the shadow (top, left, right, both right & left etc) and style of your shadow.