如何圆角添加到我使用的是Android中背景的绘制?的是、到我、圆角、背景

2023-09-07 16:02:33 作者:鸡情正HAI!!

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

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.

如果你有一个纹理或其他一些复杂的绘制,你不能用形状建造看来你需要添加一个可绘制的圆角到您的项目。或者自己打造的圆角就像是在这个解释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.