I have problem with my custom TextInputLayout
. Here is my code
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/phone"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:theme="@style/CustomTextInputLayout"
android:hint="@string/phone_number"
android:layout_marginTop="8dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
app:startIconDrawable="@drawable/account"
android:background="@color/bg_light_gray"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/page_description">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="?attr/listPreferredItemHeight"
android:background="@color/bg_light_gray"
android:inputType="phone"
android:singleLine="true" />
</com.google.android.material.textfield.TextInputLayout>
Here is my code from style.xml
file
<style name="CustomTextInputLayout" parent="Widget.Design.TextInputLayout">
<item name="errorTextAppearance">@style/ErrorText</item>
<item name="colorControlNormal">@color/green_txt</item>
<item name="colorControlActivated">@color/orange</item>
<item name="colorControlHighlight">@color/orange</item>
</style>
I want to make a baseline color of TextInputLayout
to orange, but now it is gray. Also, I place an icon, which has its original color orange, but after placing it became dark gray. Now I am not understanding why it is happening and how to fix this problem. Can someone help me with that?