在 Mobile、Android Studio 中单击 otp 输入时,输入键盘未显示

问题描述 投票:0回答:1

//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 输入部分时,键盘也没有显示。

java android xml chat android-applicationinfo
1个回答
0
投票

请将此行添加到您的 theme.xml 中

<item name="otpViewStyle">@style/OtpWidget.OtpView </item>

然后,在 XML 中添加样式属性

style="@style/otpViewStyle"
© www.soinside.com 2019 - 2024. All rights reserved.