EditText tint line color not changing in night mode

624 Views Asked by At

I have EditText in my layout

<EditText
 android:id="@+id/etMarks1"
 style="@style/Marks"/>

and theme.xml

    <style name="Marks" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
        <item name="android:layout_weight">15</item>
        <item name="android:ems">1</item>
        <item name="android:layout_width">wrap_content</item>
        <item name="android:layout_height">wrap_content</item>
        <item name="android:inputType">number</item>
        <item name="android:textSize">18sp</item>
        <item name="android:gravity">center</item>
    </style>

The tint line color is black by default and it should change it's color in night mode, But it is not changing.

I tried to manually define the tint line color in theme.xml(nignt)

<item name ="backgroundTint">@color/white</item>
<item name="colorControlNormal">@color/white</item>

But, it is not working, Any Solution for this ?

1

There are 1 best solutions below

0
On

Solved
I defined colorControlNormal in my application's default theme, working fine.