A password strength meter for Android
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
app
gradle/wrapper
xtrength
.gitignore
.travis.yml
LICENSE
README.md
build.gradle
gradle.properties
gradlew
gradlew.bat
settings.gradle

README.md

Xtrength

A password strength meter for Android

Kotlin Support Build Status GitHub (pre-)release

Easily integrate real time password strength meter to your application using Xtrength.

Installation

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

dependencies {
    // Replace version with release version, e.g. 1.0.0-alpha, -SNAPSHOT
    implementation 'io.jmdg:xtrength:[VERSION]'
}

Demo 1 Demo 2

Usage

<io.jmdg.xtrength.XtrengthInputView
    android:id="@+id/xiv_password"
    android:layout_width="match_parent"
    android:layout_height="wrap_content" />

Do something when listening to the validation of scores

override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    setContentView(R.layout.activity_main)
    
    xiv_password
            .getInputView()
            .addTextChangedListener(object : TextWatcher {
                override fun afterTextChanged(p0: Editable?) {
                    // Log what you need (eg. via Timber)
                    Timber.d("Base Score: %d", xiv_password.getBaseScore())

                    // Add custom methods here when validating text (eg. render ui changes, callback methods)
                    someMethod()
                }

                override fun beforeTextChanged(p0: CharSequence?, p1: Int, p2: Int, p3: Int) {
                    //
                }

                override fun onTextChanged(p0: CharSequence?, p1: Int, p2: Int, p3: Int) {
                    //
                }
            })
    
}

META

Joshua de Guzman | code@jmdg.io

Distributed under the MIT license.

CONTRIBUTING

  1. Fork it (https://github.com/joshuadeguzman/ButtonsKt/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request