-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from zeoflow/password-type
Updated PasswordModel
- Loading branch information
Showing
31 changed files
with
418 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
version: 2 | ||
update_configs: | ||
updates: | ||
- package-ecosystem: "pip" | ||
directory: "/null" | ||
schedule: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
password-strength/src/main/java/com/zeoflow/password/strength/PasswordModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
package com.zeoflow.password.strength | ||
|
||
class PasswordModel internal constructor(var passwordType: PasswordType, var content: String, var color: Int) | ||
class PasswordModel internal constructor(var passwordType: PasswordType, var currentScore: Int) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
apply plugin: 'com.android.application' | ||
|
||
android { | ||
compileSdkVersion rootProject.ext.compileSdkVersion | ||
buildToolsVersion rootProject.ext.buildToolsVersion | ||
defaultConfig { | ||
applicationId "com.zeoflow.password.strength" | ||
minSdkVersion rootProject.ext.minSdkVersion | ||
targetSdkVersion rootProject.ext.targetSdkVersion | ||
versionCode rootProject.ext.versionCode | ||
versionName rootProject.ext.versionName | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
dataBinding { | ||
enabled = true; | ||
} | ||
|
||
lintOptions { | ||
abortOnError false | ||
} | ||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation fileTree(dir: "libs", include: ["*.jar"]) | ||
|
||
implementation 'androidx.annotation:annotation:1.1.0' | ||
implementation 'androidx.appcompat:appcompat:1.2.0' | ||
implementation 'androidx.browser:browser:1.2.0' | ||
implementation 'androidx.cardview:cardview:1.0.0' | ||
implementation 'androidx.constraintlayout:constraintlayout:2.0.1' | ||
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0' | ||
implementation 'androidx.core:core:1.3.1' | ||
implementation 'androidx.exifinterface:exifinterface:1.3.0' | ||
implementation 'androidx.annotation:annotation-experimental:1.0.0' | ||
implementation 'androidx.fragment:fragment:1.2.5' | ||
implementation 'androidx.lifecycle:lifecycle-runtime:2.2.0' | ||
implementation 'androidx.recyclerview:recyclerview:1.1.0' | ||
implementation 'androidx.recyclerview:recyclerview-selection:1.0.0' | ||
implementation 'androidx.transition:transition:1.4.0-beta01' | ||
implementation 'androidx.vectordrawable:vectordrawable:1.1.0' | ||
implementation 'androidx.viewpager2:viewpager2:1.0.0' | ||
|
||
implementation project(':password-strength') | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Add project specific ProGuard rules here. | ||
# By default, the flags in this file are appended to flags specified | ||
# in /Users/jakubkinst/Library/Android/sdk/tools/proguard/proguard-android.txt | ||
# You can edit the include path and order by changing the proguardFiles | ||
# directive in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# Add any project specific keep options here: | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.zeoflow.anidero.sample"> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:roundIcon="@mipmap/ic_launcher_round" | ||
android:supportsRtl="true" | ||
android:theme="@style/AppTheme"> | ||
<activity | ||
android:name="com.zeoflow.anidero.sample.MainActivity" | ||
android:windowSoftInputMode="adjustResize"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
29 changes: 29 additions & 0 deletions
29
sample/src/main/java/com/zeoflow/anidero/sample/MainActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.zeoflow.anidero.sample; | ||
|
||
import android.os.Bundle; | ||
import android.util.Log; | ||
|
||
import androidx.annotation.Nullable; | ||
import androidx.appcompat.app.AppCompatActivity; | ||
|
||
import com.zeoflow.password.strength.PasswordModel; | ||
import com.zeoflow.password.strength.PasswordType; | ||
|
||
import static com.zeoflow.password.strength.PasswordStrength.initializePassChecker; | ||
|
||
public class MainActivity extends AppCompatActivity | ||
{ | ||
|
||
@Override | ||
protected void onCreate(@Nullable Bundle savedInstanceState) | ||
{ | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_main); | ||
|
||
PasswordModel zPasswordStrength = initializePassChecker() | ||
.requireDigits(true) | ||
.requireUpperCase(true) | ||
.calculateStrength("3454g36v5!?n4vt45j6"); | ||
|
||
} | ||
} |
Oops, something went wrong.