I'm new to working with XML and editing the layout in my Android app and it gives me the error “XML has an empty body”, can anyone tell me what I did wrong? This is my code:
<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" />
Thanks
Edit: I had to add spaces so that the first 2 lines appear ...
android xml
juliet
source share