XML CODE
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/email_et_ll"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:boxStrokeColor="@color/input_text_custom_outline_color"
app:boxStrokeErrorColor="@android:color/holo_red_light"
app:hintTextColor="@color/yellow"
android:layout_marginStart="16sp"
android:layout_marginTop="16sp"
android:layout_marginEnd="16sp"
android:hint="@string/hello_gmail_com"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/login_info_txt"
app:shapeAppearance="@style/input_text_rounded_corner"
app:startIconDrawable="@drawable/baseline_email_24">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/email_et"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:cursorVisible="true"
android:textCursorDrawable="@drawable/cursor_bg"
/>
</com.google.android.material.textfield.TextInputLayout>
This is my XML code, where I have made a input text field with custom textCursorDrawable, but this change is only reflected in the android 8,9 but not in the higher version , how to fix this? I need help.
Here are the screenshots.
Android-8
Android-9
Android-10
same for higher versions 11,12 (tested).



use the custom theme in your TextInputLayout android:theme="@style/TextInputEditText"
style.xml