I have the following code:
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tilRaceDecorationName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_x2"
app:helperText="@string/race_nameField_textHelper"
app:layout_constraintStart_toStartOf="@+id/cvImageBackground"
app:layout_constraintTop_toBottomOf="@+id/cvImageBackground">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/tieRaceFieldName"
android:layout_width="match_parent"
android:background="@android:color/transparent"
android:layout_height="wrap_content" />
</com.google.android.material.textfield.TextInputLayout>
The point is that I would like to change android:background="@android:color/transparent"
the element and put it in the main theme, the file called theme in the res/values folder.
I've tried looking at the google.io documentation ( https://material.io/components/text-fields/android#theming-text-fields ), but I don't quite understand how to make that change.
Really, the only thing I want is for all the textfields I make in the application to have a transparent background by default.
Thanks.
In the end, I have succeeded.
The solution I have followed has been:
in the main style I have added:
<item name="textInputStyle">@style/Widget.App.TextInputLayout</item>
And in the style that I have created I have put: