Skip to content

Commit

Permalink
Merge pull request #5 from raheemadamboev/1.0.2
Browse files Browse the repository at this point in the history
1.0.2
  • Loading branch information
raheemadamboev authored Nov 27, 2024
2 parents 5e1a420 + 75755e8 commit f35f4b1
Show file tree
Hide file tree
Showing 37 changed files with 441 additions and 331 deletions.
8 changes: 2 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
/.idea
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
/.kotlin
2 changes: 1 addition & 1 deletion .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 19 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,27 @@
</p>

<p align="center">
🔐 Light library that is beautiful Pin Lock screen for Jetpack Compose. The library handles saving pin in Encrypted file. Integration is very easy and fast.
🔐 <b>PinLock</b> is a light library to display Pin Lock screen in Jetpack Compose. The library handles saving pin in Encrypted file. Integration is very easy and fast.
</p>

# Setup

Add it in your root **build.gradle** at the end of repositories:
```groovy
allprojects {
Add the maven library bucket to the `dependencyResolutionManagement.repositories` block in `settings.gradle.kts` file as follows:
```kotlin
dependencyResolutionManagement {
...
repositories {
maven { url 'https://jitpack.io' }
...
maven("https://jitpack.io")
}
}
```
```

Include below dependency in build.gradle of application and sync it:
```groovy
implementation 'com.github.raheemadamboev:pin-lock-compose:1.0.1'
Install the library to the project in desired module's `build.gradle.kts` file. Replace `<current_version>` with the actual version:
```kotlin
implementation("com.github.raheemadamboev:pin-lock-compose:<current_version>")
```

# Implementation

Firstly, initialize the library on your `onCreate` of Application class:
Expand Down Expand Up @@ -57,8 +60,8 @@ PinLock(
If there is no saved pin yet, it promtps the user to create pin. If there is saved pin, it promts the user to enter its pin:

<p align="center">
<img width="296" height="600" src="https://github.com/raheemadamboev/pin-lock-compose/blob/master/banner_1.gif" />
<img width="296" height="600" src="https://github.com/raheemadamboev/pin-lock-compose/blob/master/banner_2.gif" />
<img width="296" height="600" src="https://github.com/raheemadamboev/pin-lock-compose/blob/master/extra/banner_1.gif" />
<img width="296" height="600" src="https://github.com/raheemadamboev/pin-lock-compose/blob/master/extra/banner_2.gif" />
</p>

---
Expand All @@ -81,7 +84,7 @@ ChangePinLock(
Use this only if there is already saved pin. If there is no saved pin, use simple `PinLock` instead for creating pin for the first time. When using `ChangePinLock`, firstly it prompts the user to enter original pin. After user succesfully authenticates using his original pin, it prompts the user to creat a new pin:

<p align="center">
<img width="296" height="600" src="https://github.com/raheemadamboev/pin-lock-compose/blob/master/banner_3.gif" />
<img width="296" height="600" src="https://github.com/raheemadamboev/pin-lock-compose/blob/master/extra/banner_3.gif" />
</p>

---
Expand Down Expand Up @@ -110,16 +113,16 @@ PinManager.clearPin()

You can install and try demo app. All the features are implemented in the demo from creating pin to changing pin.

<a href="https://github.com/raheemadamboev/pin-lock-compose/blob/master/app-debug.apk">Download demo</a>
<a href="https://github.com/raheemadamboev/pin-lock-compose/blob/master/extra/app-debug.apk">Download demo</a>

<p align="center">
<img width="296" height="600" src="https://github.com/raheemadamboev/pin-lock-compose/blob/master/screenshot_1.jpg" />
<img width="296" height="600" src="https://github.com/raheemadamboev/pin-lock-compose/blob/master/screenshot_2.jpg" />
<img width="296" height="600" src="https://github.com/raheemadamboev/pin-lock-compose/blob/master/extra/screenshot_1.jpg" />
<img width="296" height="600" src="https://github.com/raheemadamboev/pin-lock-compose/blob/master/extra/screenshot_2.jpg" />
</p>

# Projects using this library

**Notepad**: 40 000+ downloads.
**Notepad**: 100 000+ downloads.

<a href="https://play.google.com/store/apps/details?id=xyz.teamgravity.notepad">Google Play Store</a>

Expand Down
Binary file removed app-debug.apk
Binary file not shown.
76 changes: 0 additions & 76 deletions app/build.gradle

This file was deleted.

63 changes: 63 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
plugins {
alias(libs.plugins.android)
alias(libs.plugins.kotlin)
alias(libs.plugins.compose)
}

android {
namespace = "xyz.teamgravity.pinlockcomposedemo"
compileSdk = libs.versions.sdk.compile.get().toInt()

defaultConfig {
applicationId = "xyz.teamgravity.pinlockcomposedemo"
minSdk = libs.versions.sdk.min.get().toInt()
targetSdk = libs.versions.sdk.target.get().toInt()
versionCode = 1
versionName = "1.0.0"

vectorDrawables {
useSupportLibrary = true
}
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = libs.versions.java.target.get()
}

buildFeatures {
compose = true
}

packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
}

dependencies {

// pin lock compose
implementation(projects.pinLockCompose)

// compose
implementation(platform(libs.compose))
implementation(libs.compose.ui)
implementation(libs.compose.graphics)
implementation(libs.compose.preview)
implementation(libs.compose.material3)

// compose activity
implementation(libs.compose.activity)

// compose lifecycle
implementation(libs.compose.lifecycle)

// core
implementation(libs.core)
}
Loading

0 comments on commit f35f4b1

Please # to comment.