8000 GitHub - WPolly/PswInputView: 简单灵活的密码输入框控件
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

WPolly/PswInputView

Repository files navigation

PswInputView

简单灵活的数字密码输入框控件

使用简便,高度可定制化。

Dependency

Add this in your root build.gradle file (not your module build.gradle file):

allprojects {
	repositories {
        maven { url "https://jitpack.io" }
    }
}

Then, add the library to your module build.gradle

dependencies {
    implementation 'com.github.WPolly:PswInputView:v1.0'
}

Usage

In xml,
        <com.practice.lishan.pswinputview.PswInputView
            android:id="@+id/piv_default"
            android:layout_width="match_parent"
            android:layout_height="100dp"
            android:layout_margin="20dp"/>
    
        <com.practice.lishan.pswinputview.PswInputView
            android:id="@+id/piv_asset_protect"
            android:layout_width="match_parent"
            android:layout_height="120dp"
            android:layout_margin="20dp"
            app:pswCount="8"
            app:borderColor="@color/colorPrimaryDark"
            app:dividerColor="@color/colorPrimary"
            app:dividerStrokeWidth="0.8dp"
            app:borderCornerRadius="8dp"
            app:pswDotRadius="6dp"
            app:pswDotColor="@color/colorBlue"/>
            
In java,
            // callback 
            pivDefault.setOnPswInputCompletedListener(new PswInputView.OnPswInputCompletedListener() {
                @Override
                public void onPswInputCompleted(String psw) {
                    tvTitle.setText(psw);
                }
            });

Snapshots

snapshots.png

About

简单灵活的密码输入框控件

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

0