I have implemented Custom edittext, with custom style :
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Username"
android:textColorHint="@color/white"
app:hintAnimationEnabled="true"
app:hintTextAppearance="@style/TExtAppearance"
>
<com.app.farmtrace.fieldagent.CustomView.EditText_SemiBold
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/colorAccent"
android:theme="@style/EditTextStyle"
android:id="@+id/username"
android:maxLines="1"
android:maxLength="50"
android:inputType="textEmailAddress|textNoSuggestions"
android:nextFocusDown="@+id/password"
/>
</android.support.design.widget.TextInputLayout>
And this is the screen :

there is just the cursor and now when i again select the cursor i get this :

I dont want the yellow underline below the cursor.
This is tested in Moto g4 with android 7.0.
<style name="TExtAppearance">
<item name="android:textColor">@color/white</item>
<item name="android:textColorHighlight">@color/white</item>
<item name="android:textColorHint">@color/white</item>
<item name="android:textColorLink">@color/white</item>
<item name="android:textSize">16sp</item>
</style>
<style name="EditTextStyle" parent="Widget.AppCompat.EditText">
<item name="colorControlNormal">@color/white</item>
<item name="colorControlActivated">@color/colorAccent</item>
<!--<item name="colorControlHighlight">@color/colorAccent</item>-->
</style>
Edit Also Getting underline on error if i seterror and text not visible of error :

I ran into the same issue. I was able to get rid of the cursor underline by removing the Widget.AppCompat.EditText parent style from my TextInputEditTexts' custom style. In other words, I changed my TextInputEditTexts' style from this:
<style name="MyEditTextStyle" parent="Widget.AppCompat.EditText">
...
</style>
to this:
<style name="MyEditTextStyle">
...
</style>
Example of one of my TextInputEditTexts referencing the style:
<android.support.design.widget.TextInputEditText
android:id="@+id/edit_username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/MyEditTextStyle"/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With