【问题标题】:Add shadow on imageview在 imageview 上添加阴影
【发布时间】:2019-07-27 19:59:56
【问题描述】:

我在我的应用程序中使用 imageview,我想在我的 imageview 上显示阴影效果。我的 imageview 是 circuler。我搜索但没有找到我需要的完美解决方案。 我也试过用这个

https://github.com/sparrow007/CircularImageviewlib.

它正在工作,但添加阴影后,阴影从底部切割。我尝试使用可绘制背景和其他一些库。 有人对此有想法吗?

【问题讨论】:

标签: android


【解决方案1】:

在您的 xml 图像视图中使用它:

 android:outlineProvider="background"

并根据自己的愿望设置海拔

【讨论】:

  • 我的图像是圆形的,所以在设置了高程后,我的图像变成了椭圆形,并且从左到右变了。
猜你喜欢
  • 2015-11-03
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-07-13
  • 1970-01-01
  • 1970-01-01
  • 2018-08-11
  • 2018-11-06
相关资源
最近更新 更多