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
除非適用法律要求或以書面形式同意,否則根據許可證分配的軟件是按照“原樣”分發的,沒有任何明示或暗示的任何形式的保證或條件。請參閱許可證,以獲取執行許可條款和限制的特定語言。