Closed manik123gupta closed 2 years ago
Yes, I'm also facing the same issue. Is there any workaround for it? or How to disable the system cursor?
i am looking for the workaround for it too.
@vetriselvi-i2i @azizanhakim //Create shape empty
<?xml version="1.0" encoding="UTF-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" > <size android:height="0dp" android:width="0dp" /> </shape>
and just use this in edittext android:textSelectHandle="@drawable/your_empty_shape"
***It work for me
I have the same problem. I tried this but didn't work.
@bgraknd //This is new solution for me use Kotlin
private fun focusAndShowKeyboard(context: Context, editText: EditText) {
editText.requestFocus()
val imm: InputMethodManager = context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, InputMethodManager.HIDE_IMPLICIT_ONLY)
}
cvvView.apply {
setOnTouchListener { view, motionEvent ->
focusAndShowKeyboard(view.context, this)
true
}
}
<com.mukesh.OtpView
android:id="@+id/otp_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:cursorVisible="false"
android:inputType="number"
android:textSelectHandle="@android:color/transparent"
app:OtpCursorColor="@color/indigo"
app:OtpHideLineWhenFilled="false"
app:OtpItemCount="6" />
Add these two lines in your XML layout:
android:cursorVisible="false"
android:textSelectHandle="@android:color/transparent"
Please check the latest version of the lib
Subject of the issue
android edittext cursor always showing at 2nd box for 6 digit otp
Steps to reproduce
click on otp box after filling all digits (6 digit otp box)
Expected behaviour
android edittext cursor always should show at tapped position
Actual behaviour
android edittext cursor always showing at 2nd box for 6 digit otp