小编The*_*Jan的帖子

XML有空体吗?

我是新手使用XML并在我的Android应用程序中编辑布局而且它给我的错误"XML有空体"是否有人能够告诉我我做错了什么?这是我的代码:

<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">

<solid android:color="@color/orange"></solid>


<stroke
    android:width="2dp"
    android:color="@color/orange"></stroke>

<padding
    android:bottom="10dp"
    android:left="15dp"
    android:right="15dp"
    android:top="15dp"></padding>

<corners
    android:bottomLeftRadius="0dp"
    android:bottomRightRadius="0dp"
    android:radius="1dp"
    android:topLeftRadius="12dp"
    android:topRightRadius="12dp" />
Run Code Online (Sandbox Code Playgroud)

谢谢

编辑:必须添加空格才能显示前两行...

xml android

15
推荐指数
2
解决办法
3万
查看次数

标签 统计

android ×1

xml ×1