Android的观影 [英] Android View shadow
问题描述
我,四处搜寻,我无法找到一个合适的方法来做到这一点。我想对我的看法如下阴影效果:
I searched around, and I could not find a proper way to do this. I want to have the following shadow effects on my views:
说实话,我不知道这第二个是通过应用阴影效果实现。任何想法?
To be honest, I do not know if this second one is done by applying shadow effect. Any ideas?
推荐答案
我知道这个问题已经回答了,但我希望你知道,我发现了一个绘制
上 Android的工作室
,这是非常相似,你有问题的图片:
看看这样的:
I know this question has already been answered but I want you to know that I found a drawable
on Android Studio
that is very similar to the pics you have in the question:
Take a look at this:
android:background="@drawable/abc_menu_dropdown_panel_holo_light"
这看起来是这样的:
It looks like this:
希望这会有所帮助。
修改
上面的选项是旧版本的 Android的工作室
,所以你可能不会发现它的。对于较新的版本:
The option above is for the older versions of Android Studio
so you may not find it. For newer versions:
android:background="@android:drawable/dialog_holo_light_frame"
此外,如果你想拥有自己的自定义形状,我建议使用像的Photoshop
绘图软件绘制。
不要忘了将它保存为 .9.png
文件(例如: my_background.9.png
)
Don't forget to save it as .9.png
file (example: my_background.9.png
)
阅读文档:绘图9补丁
这篇关于Android的观影的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!