Closed arunp1024 closed 2 years ago
Add otpview style in the AppTheme
@gokul1408 Thanks it worked well
I am experiencing this and I have done what was specified here.
add android:focusableInTouchMode="true" on OtpView
Ao colocar o codigo abaixo no "on code sent" o teclado aparece mas o OTP view não recebe o foco. InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); imm.toggleSoftInput(InputMethodManager.SHOW_FORCED,0); binding.otpView.requestFocus();
Não Achei a solução ainda.
android:focusableInTouchMode="true"
Thankyou so much
1. Add this property (android:windowSoftInputMode="stateVisible") into your manifest's activity tag like this:
<activity android:name=".ui.AuthActivity" android:exported="true" android:screenOrientation="portrait" android:windowSoftInputMode="stateVisible" />
2. Add this line into your Activity class when you want to open keyboard:
mBinding.otpView.requestFocus()
That's all you need to do :)
I'm using above xml and below style
In some devices its not working and in some devices its working Working in Mi A2. Not working in Nokia 7.1 and One plus 5T
Expected to show keyboard with otpview focused in all devices