添加框架或边境到的ImageView和下拉阴影 [英] Add Frame or Border to ImageView and Drop-Shadow

查看:198
本文介绍了添加框架或边境到的ImageView和下拉阴影的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图做将用一个例子形象更好地工作。正如你可以看到下面我有一个灰色的背景,ontop的,坐在一个容器包含图像一些填充。容器也有一个轻微的阴影效果它

What I'm trying to do will work better with an example image. As you can see below I have a grey background, ontop of that sits a container with some padding containing an image. The container also has a slight dropshadow to it.

我想知道,如果有,我layout.xml这样做,所以非艰难的方式?在普通的HTML文档,这将一直容易。但由于这是一个移动应用程序,并为一些屏幕分辨率等等,它的证明有点难度。

What I want to know, is if there's so non-painstaking way of doing this in my layout.xml? In a normal HTML document this would've been easy. But since this is for a mobile app and for a number of screen resolutions and so on, it's proving a bit difficult.

任何意见?

编辑:我使用的是9patch图像最终定居。 Everyting去真正顺利在创造它,但是当我真正在我的应用程序中使用它,我看到在图像的右侧和底部的这些深色条纹。阴影效果似乎工作,这是一个很轻的阴影效果..但那些该死的条纹??

I eventually settled using a 9patch image. Everyting went really smooth in the creation of it but when I actually use it in my app I see these dark stripes on the right and bottom of the image. The dropshadow seems to work, it's a very light dropshadow.. but those darn stripes??

推荐答案

这可适当填充和9片图像完成。请参阅此链接,可能是它可以帮助你。

This can be done with proper padding and 9 patch image. See this link, may be it can help you.

这篇关于添加框架或边境到的ImageView和下拉阴影的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆