Error using seterror () method in edittext

0

I made a simple validation on my form, but when I try to apply an error in TextInputEditText the app closes, I have always used it, I do not understand why it is not working.

Logcat:

FATAL EXCEPTION: main
                                                                     Process: doupenglish.com.br.doup, PID: 26415
                                                                     android.view.InflateException: Binary XML file line #17: Binary XML file line #17: Error inflating class TextView
                                                                     Caused by: android.view.InflateException: Binary XML file line #17: Error inflating class TextView
                                                                     Caused by: java.lang.UnsupportedOperationException: Failed to resolve attribute at index 4: TypedValue{t=0x2/d=0x1010099 a=1}
                                                                         at android.content.res.TypedArray.getColor(TypedArray.java:469)
                                                                         at android.widget.TextView.<init>(TextView.java:892)
                                                                         at android.widget.TextView.<init>(TextView.java:818)
                                                                         at android.support.v7.widget.AppCompatTextView.<init>(AppCompatTextView.java:75)
                                                                         at android.support.v7.widget.AppCompatTextView.<init>(AppCompatTextView.java:71)
                                                                         at android.support.v7.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:103)
                                                                         at android.support.v7.app.AppCompatDelegateImplV9.createView(AppCompatDelegateImplV9.java:1024)
                                                                         at android.support.v7.app.AppCompatDelegateImplV9.onCreateView(AppCompatDelegateImplV9.java:1081)
                                                                         at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:772)
                                                                         at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730)
                                                                         at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
                                                                         at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
                                                                         at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
                                                                         at android.widget.Editor.showError(Editor.java:475)
                                                                         at android.widget.Editor.setError(Editor.java:512)
                                                                         at android.widget.TextView.setError(TextView.java:6116)
                                                                         at android.widget.TextView.setError(TextView.java:6101)
                                                                         at doupenglish.com.br.doup.CarregarAudio$3.onClick(CarregarAudio.java:100)
                                                                         at android.view.View.performClick(View.java:6256)
                                                                         at android.view.View$PerformClick.run(View.java:24701)
                                                                         at android.os.Handler.handleCallback(Handler.java:789)
                                                                         at android.os.Handler.dispatchMessage(Handler.java:98)
                                                                         at android.os.Looper.loop(Looper.java:164)
                                                                         at android.app.ActivityThread.main(ActivityThread.java:6541)
                                                                         at java.lang.reflect.Method.invoke(Native Method)
                                                                         at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
                                                                         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)

XML:

    <?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/constraintlayoutaudio"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/colorAccent"
    android:animateLayoutChanges="true"
    tools:context="doupenglish.com.br.doup.CarregarAudio">

    <TextView
        android:id="@+id/textView25"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginEnd="16dp"
        android:layout_marginStart="16dp"
        android:layout_marginTop="32dp"
        android:text="@string/primeiroacesso"
        android:textAlignment="center"
        android:textColor="@color/branco"
        android:textSize="24sp"
        android:textStyle="bold"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <LinearLayout
        android:id="@+id/layoutbaixandoaudio"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginEnd="32dp"
        android:layout_marginStart="32dp"
        android:layout_marginTop="24dp"
        android:orientation="vertical"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/textView25">

        <TextView
            android:id="@+id/textView24"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="8dp"
            android:text="@string/baixandoaudio"
            android:textAlignment="center"
            android:textColor="@color/branco"
            android:textSize="18sp"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/textView25" />

        <ProgressBar
            android:id="@+id/progresssplash"
            style="?android:attr/progressBarStyleHorizontal"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:max="100"
            android:progress="30"
            android:progressTint="@color/branco"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/textView24" />

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:orientation="horizontal">

            <TextView
                android:id="@+id/txvatual"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="0"
                android:textColor="@color/branco"
                android:textSize="18sp"
                app:layout_constraintBottom_toBottomOf="@+id/textView27"
                app:layout_constraintEnd_toStartOf="@+id/textView27"
                app:layout_constraintTop_toTopOf="@+id/textView27" />

            <TextView
                android:id="@+id/textView27"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="/"
                android:textColor="@color/branco"
                android:textSize="18sp"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/progresssplash" />

            <TextView
                android:id="@+id/txvtotal"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="10"
                android:textColor="@color/branco"
                android:textSize="18sp"
                app:layout_constraintBottom_toBottomOf="@+id/textView27"
                app:layout_constraintStart_toEndOf="@+id/textView27"
                app:layout_constraintTop_toTopOf="@+id/textView27" />

        </LinearLayout>
    </LinearLayout>

    <LinearLayout
        android:id="@+id/layoutnovasenha"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginBottom="4dp"
        android:layout_marginEnd="32dp"
        android:layout_marginStart="32dp"
        android:layout_marginTop="4dp"
        android:orientation="vertical"
        android:visibility="gone"
        app:layout_constraintBottom_toTopOf="@+id/imageViewaudio"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.501"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/layoutbaixandoaudio">

        <android.support.design.widget.TextInputLayout
            android:id="@+id/edtnovasenhainput"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="5dp"
            android:layout_marginLeft="16dp"
            android:layout_marginRight="16dp"
            android:theme="@style/EditTextHintBranco"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintVertical_bias="0.39">

            <android.support.design.widget.TextInputEditText
                android:id="@+id/edtemailnovasenha"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:backgroundTint="@color/branco"
                android:ellipsize="start"
                android:gravity="center_horizontal"
                android:hint="Nova Senha"
                android:inputType="textPassword"
                android:textColor="@color/branco"
                android:textSize="16sp" />
        </android.support.design.widget.TextInputLayout>

        <android.support.design.widget.TextInputLayout
            android:id="@+id/edtnovasenhaconfirminput"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="5dp"
            android:layout_marginLeft="16dp"
            android:layout_marginRight="16dp"
            android:theme="@style/EditTextHintBranco"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintVertical_bias="0.39">

            <android.support.design.widget.TextInputEditText
                android:id="@+id/edtemailnovasenhaconfirm"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:backgroundTint="@color/branco"
                android:ellipsize="start"
                android:gravity="center_horizontal"
                android:hint="Confirme sua senha"
                android:inputType="textPassword"
                android:textColor="@color/branco"
                android:textSize="16sp" />

        </android.support.design.widget.TextInputLayout>

        <Button
            android:id="@+id/btn_salvarsenha"
            style="@style/Widget.AppCompat.Button.Colored"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="32dp"
            android:layout_marginRight="32dp"
            android:layout_marginTop="8dp"
            android:backgroundTint="@color/branco"
            android:padding="15dp"
            android:text="Salvar nova senha"
            android:textColor="@color/colorAccent"
            android:textSize="14sp"
            android:visibility="visible" />

    </LinearLayout>

    <LinearLayout
        android:id="@+id/layoutdesejatrocarsenha"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginBottom="4dp"
        android:layout_marginEnd="8dp"
        android:layout_marginStart="8dp"
        android:layout_marginTop="4dp"
        android:orientation="vertical"
        android:visibility="visible"
        app:layout_constraintBottom_toTopOf="@+id/imageViewaudio"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/layoutbaixandoaudio">

        <TextView
            android:id="@+id/textView44"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:layout_marginBottom="5dp"
            android:text="Deseja alterar sua senha ?"
            android:textAlignment="center"
            android:textColor="@color/branco"
            android:textSize="16sp"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/textView25" />

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:orientation="horizontal">

            <Button
                android:id="@+id/btn_trocasenhanao"
                style="@style/Widget.AppCompat.Button.Colored"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:backgroundTint="@color/branco"
                android:text="Não"
                android:textColor="@color/colorAccent"
                android:textSize="14sp" />

            <Button
                android:id="@+id/btn_trocarsenhasim"
                style="@style/Widget.AppCompat.Button.Colored"
                android:layout_width="wrap_content"
                android:layout_height="40dp"
                android:background="@drawable/fundobaixandoaudio"
                android:text="Sim, desejo" />

            <!-- <mehdi.sakout.fancybuttons.FancyButton
                android:id="@+id/btn_solicitarsenha"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:paddingBottom="8dp"
                android:paddingLeft="8dp"
                android:paddingRight="8dp"
                android:paddingTop="8dp"
                app:fb_borderColor="@color/branco"
                app:fb_borderWidth="1dp"
                app:fb_focusColor="@color/ripple_material_dark"
                app:fb_ghost="true"
                app:fb_radius="4dp"
                app:fb_text="Sim, desejo"
                app:fb_textColor="@color/branco"
                app:fb_useSystemFont="true" />-->
        </LinearLayout>

    </LinearLayout>

    <ImageView
        android:id="@+id/imageViewaudio"
        android:layout_width="0dp"
        android:layout_height="150dp"
        android:tint="@color/branco"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:srcCompat="@drawable/fundoestatua" />

</android.support.constraint.ConstraintLayout>
    
asked by anonymous 09.02.2018 / 23:05

0 answers