Android:使用圆角 xml 在开发过程中显示错误
在我的应用程序中,我使用以下代码创建圆形边框:
<?xml version="1.0" encoding="UTF-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="1dip"
android:color="#ffffff"/>
<solid
android:color="#95865F"/>
<corners
android:radius="10px"
android:topRightRadius="0dp"
android:bottomRightRadius="0dp" />
<padding
android:left="1dp"
android:right="1dp"
android:top="1dp"
android:bottom="1dp"/>
虽然我这样做一切正常,但在 GraphocalLayout 中的 Eclipse 中,我看到如下图所示的错误消息。
这有什么问题吗?我想删除此消息,那么我应该做什么? 谢谢。
In My application i am Creating rounded border using this code:
<?xml version="1.0" encoding="UTF-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="1dip"
android:color="#ffffff"/>
<solid
android:color="#95865F"/>
<corners
android:radius="10px"
android:topRightRadius="0dp"
android:bottomRightRadius="0dp" />
<padding
android:left="1dp"
android:right="1dp"
android:top="1dp"
android:bottom="1dp"/>
While i am doing this all works well but in eclipse in GraphocalLayout i see the error message like below image.
Whats wrong in this ? And i want to remove this message then what should i have to do ?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
从头开始使用 Indigo 和 ADT 15,结果如下:
我通过 drawable/cornered_bg.xml 获得了该结果:
和布局/main.xml:
更改
android:radius
值确实有效......但是所有角都是圆角的(在真实设备上没问题)。当然是图形布局的限制。我建议您搜索并浏览 http://code.google.com/p/android /issues/list 和 http://tools.android.com/knownissues。我没有找到与此问题相关的任何内容,因此请尝试一下,如果没有找到任何内容,您可以开票。
With Indigo and ADT 15 from scratch, here is the result:
I obtain that with a drawable/cornered_bg.xml:
and a layout/main.xml:
Changing the
android:radius
value does work… but all the corners are rounded (it's OK on a real device).Certainly a limitation of the graphical layout. I suggest you to search and browse http://code.google.com/p/android/issues/list and http://tools.android.com/knownissues. I have found nothing related to this problem, so give it a try and if you find nothing, you could open a ticket.
请尝试以下操作:
Try the following: