NoFall Today
NoFall Today

Reputation: 11

How to change outline color on TextInputLayout from material component?

I got an error that says:

Error inflating class com.google.android.material.textfield.TextInputLayout

when implementing TextInputLayout from the material component. Actually, I have resolved the problem by put material theme on my root layout

<RelativeLayout 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:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
tools:context=".LoginActivity"
**android:theme="@style/Theme.MaterialComponents.Light.NoActionBar"**
android:padding="20dp">

But the outline color and the font changed, what should I do to make the outline color back to my colorAccent?

Upvotes: 0

Views: 189

Answers (1)

DrHowdyDoo
DrHowdyDoo

Reputation: 2817

Add this line : app:boxStrokeColor="?attr/colorAccent"

Upvotes: 1

Related Questions