创建只有两个圆角的矩形 [英] Creating a rectangle shape with only two rounded edges

查看:114
本文介绍了创建只有两个圆角的矩形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以创建一个矩形,将所有边缘都弄圆.但是,我想要的是一个矩形形状,其中只有两个边缘是圆形的.这可能吗?

I can create a shape that is a rectangle with all edges rounded. However, what I'm wanting is a rectangle shape with only 2 of the edges rounded. Is this possible?

我本质上是在凑合一个看起来像带有圆角气泡的ListView.我希望添加一个具有两个顶部圆角的页眉和一个具有两个底部圆角的页脚的页眉.

I'm essentially hacking together a ListView that looks like a bubble with rounded edges. I'm looking to add a header that has the two top edges rounded and a footer with the two bottom edges rounded.

推荐答案

我将 android:radius 属性更改为 android:topRightRadius android:topLeftRadius

这篇关于创建只有两个圆角的矩形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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