//Here is the xml code and i think so problem is with mukeshsolanki
<com.mukeshsolanki.android.otpview.OtpView
android:id="@+id/otp_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:inputType="text"
android:itemBackground="@android:color/darker_gray"
app:OtpItemCount="6"
app:OtpLineColor="@android:color/holo_green_dark"
app:OtpViewType="line"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView4" />
即使我在这里给出了 inputType='text' 或数字,当我单击 otp 输入部分时,键盘也没有显示。
请将此行添加到您的 theme.xml 中
<item name="otpViewStyle">@style/OtpWidget.OtpView </item>
然后,在 XML 中添加样式属性
style="@style/otpViewStyle"