locked
No resource identifier found for attribute 'startcolor' in package 'android' RRS feed

  • Question

  • User370155 posted

    I am using xamarin to create an android app. The following is an xml file I have created:

    <?xml version="1.0" encoding="utf-8" ?>
    <selector xmlns:android="schemas.android.com/apk/res/android"     xmlns:app="schemas.android.com/apk/res-auto" 
    >
      <item>
        <shape android:shape="rectangle">
          <corners android:radius="50dp"/>
          <solid android:color="#FDFDFE"/>
          <size android:height="35dp"/>
          <gradient android:startcolor="#71DA98" android:endcolor="#56C5ED"/>
        </shape>
      </item>
    </selector>
    

    I have two errors: No resource identifier found for attribute 'startcolor' in package 'android' No resource identifier found for attribute 'endcolor' in package 'android'

    The gradient is for a button. Any help appreciated.

    Monday, June 25, 2018 2:16 PM

All replies

  • User355640 posted

    Hi @nisathesharp ,

    Please try this:

        <?xml version="1.0" encoding="utf-8" ?>
        <selector xmlns:android="schemas.android.com/apk/res/android">
    
            <item>
    
                <shape xmlns:android="http://schemas.android.com/apk/res/android"
                    android:shape="rectangle">
    
                    <corners android:radius="50dp" />
                    <solid android:color="#FDFDFE"/>
                    <size android:height="35dp"/>
                    <gradient
                        android:startColor="#71DA98"
                        android:endColor="#56C5ED"/>
                </shape>
            </item>
        </selector>
    
    Tuesday, June 26, 2018 8:38 AM