Forum Xamarin.Android

AppCompat TextInputLayout Error Exception

RicardoJarreeRicardoJarree USMember ✭✭
edited November 2016 in Xamarin.Android

So I am trying to get the TextInputLayout's in my app to show errors when needed. I am just having an issue with showing them. I have done everything correct I am sure however I am still getting the following error:

Java.Lang.UnsupportedOperationException: Failed to resolve attribute at index 24: TypedValue{t=0x3/d=0x393 "res/color/secondary_text_material_light.xml" a=1 r=0x1060167}

When I run the code:

    private void saveEmployee()
    {
        User u = new User();
        ValidationResult fnameV = u.setFirstName(firstName.Text);
        if (!fnameV.isValid())
        {
            usernameLayout.Error = fnameV.reason;
            usernameLayout.ErrorEnabled = true;
            return;
        }
    }

Whether I change Error to be above ErrorEnabled or not I still get the error on the first statement to do with the error executed. The XML is as follows:

            <android.support.design.widget.TextInputLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:theme="@style/TextLabelWhite"
                android:id="@+id/firstNameLayout">
                <EditText
                    android:inputType="textPersonName"
                    android:id="@+id/firstName"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:hint="@string/fname"
                    android:maxLines="1" />
            </android.support.design.widget.TextInputLayout>

Not sure if anyone could shed some light for me on the subject, sure it is a very simple solution.

Best Answer

Answers

Sign In or Register to comment.