android OTP View
1.0.2
很多适用于Android的OTP视图,但是这个库使您的生活变得轻松,我将OTP-View与SMS Catcher合并到单个库中,可以随意使用它。
您可以找到如何以简单方式使用它的示例代码。
在存储库结束时将其添加到root build.gradle中:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
添加依赖关系
dependencies {
compile 'com.github.alahammad:android-OTP-View:1.0.2'
}
然后将此代码添加到您的布局
<com.alahammad.otp_view.OtpView
android:id="@+id/otp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:inputType="number"
app:otp_number="4" />
版权2018 Ala Hammad
根据Apache许可证(版本2.0(“许可”)获得许可;除了符合许可外,您不得使用此文件。您可以在
http://www.apache.org/licenses/license-2.0
除非适用法律要求或以书面形式同意,否则根据许可证分配的软件是按照“原样”分发的,没有任何明示或暗示的任何形式的保证或条件。请参阅许可证,以获取执行许可条款和限制的特定语言。