Android XML element not allowed

I have the following XML format which basically gives me rounded corners and I am using it in EditText. Why does the Android inspector say that element solid is not allowed here

as wellelement corners is not allowed here.

It works great, should I just leave it?

<?xml version="1.0" encoding="utf-8"?>    
<shape xmlns:android="http://schemas.android.com/apk/res/android"
       android:shape="rectangle" android:padding="10dp"
       android:layout_width="match_parent"
       android:layout_height="match_parent">
    <solid android:color="#FFFFFF" />
    <corners
        android:bottomRightRadius="5dp"
        android:bottomLeftRadius="5dp"
        android:topLeftRadius="5dp"
        android:topRightRadius="5dp" />
</shape>

      

+2


source to share


1 answer


This XML file must be in res/drawable

. It may be located at res/layout

, which is the wrong location.



+5


source







All Articles