如何圆角添加到我使用的是Android中背景的绘制? [英] How to add rounded corner to a drawable I'm using as a background in Android?

查看:109
本文介绍了如何圆角添加到我使用的是Android中背景的绘制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我在我的应用程序的背景使用特定的绘制。这不是一个纯色。结果
现在我想圆角添加到此绘制。

I have a specific drawable that I use as background in my app. It is not a solid color.
Now I want to add rounded corners to this drawable.

我只找到了一条符合渐变或纯色作为背景,但不是另一个绘制形状可用的圆角。

I only found the rounded corner available in a shape with a gradient or a solid color as a background but not another drawable.

有没有添加圆角到绘制的另一种简单的方法?

Is there another easy way of adding rounded corners to a drawable?

推荐答案

有关地方,我需要它,我得到了它与已用渐变填充并且有圆角的形状工作的情况。这看起来有点像我想达到的效果。

For the case where I needed it I got it working with a shape that was filled with a gradient and had round corners. This looks a bit like the effect I wanted to achieve.

如果你有一个纹理或其他一些复杂的绘制,你不能用形状建造看来你需要添加一个可绘制的圆角到您的项目。或者自己打造的圆角就像是在这个解释<一个href=\"http://stackoverflow.com/questions/1705239/how-should-i-give-images-rounded-corners-in-android\">question.

If you have a Texture or some other complex drawable that you can't build with shapes it seems you need to add a drawable with the rounded corners to your project. Or build the round corners yourself like it is explained in this question.

这篇关于如何圆角添加到我使用的是Android中背景的绘制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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