-
Notifications
You must be signed in to change notification settings - Fork 23
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 #4 from hi-manshu/Readme
Released Alpha-01
- Loading branch information
Showing
6 changed files
with
103 additions
and
1 deletion.
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 +1,75 @@ | ||
### Pluck - The image-picker library for Compose | ||
|
||
![Pluck](art/pluck.jpg) | ||
|
||
This is an image-picker for your jetpack compose project. You can select from Gallery/Camera. | ||
|
||
_Made with ❤️ for Android Developers by Himanshu_ | ||
|
||
[![Maven Central](https://img.shields.io/maven-central/v/com.himanshoe/pluck)](https://search.maven.org/artifact/com.himanshoe/pluck) | ||
[![Github Followers](https://img.shields.io/github/followers/hi-manshu?label=Follow&style=social)](https://github.com/hi-manshu) | ||
[![Twitter Follow](https://img.shields.io/twitter/follow/hi_man_shoe?label=Follow&style=social)](https://twitter.com/hi_man_shoe) | ||
|
||
|
||
## Implementation | ||
|
||
#### Step: 01 | ||
|
||
Add the specific permission in `AndroidManifest.xml` file | ||
|
||
```xml | ||
|
||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> | ||
|
||
<uses-permission android:name="android.permission.CAMERA" /> | ||
|
||
``` | ||
|
||
#### Step: 02 | ||
|
||
In `build.gradle` of app module, include the following dependency | ||
|
||
```gradle | ||
dependencies { | ||
implementation("com.himanshoe:pluck:1.0.0-alpha01") | ||
} | ||
``` | ||
|
||
## Usage | ||
|
||
#### 01 | ||
|
||
Now, to start using Pluck, use the composable `Pluck` like, | ||
|
||
```kotlin | ||
Pluck(onPhotoSelected = { | ||
// List of PluckImage when selecting from Gallery | ||
}, onPhotoClicked = { | ||
// Bitmap when using Camera | ||
}) | ||
``` | ||
|
||
#### 02 | ||
|
||
Now, if you want `Pluck` to handle the Permission for you as well. Use it like, | ||
|
||
```kotlin | ||
Permission( | ||
permissions = listOf( | ||
Manifest.permission.CAMERA, | ||
Manifest.permission.READ_EXTERNAL_STORAGE | ||
), | ||
goToAppSettings = { | ||
// Go to App Settings | ||
} | ||
) { | ||
Pluck(onPhotoSelected = { | ||
// List of PluckImage when selecting from Gallery | ||
}, onPhotoClicked = { | ||
// Bitmap when using Camera | ||
}) | ||
} | ||
``` | ||
|
||
### Drop a ⭐ to keep me motivated to keep working on Open-Source. Updates coming Soon! | ||
|
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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 @@ | ||
# Maven | ||
POM_ARTIFACT_ID=pluck | ||
POM_NAME=pluck | ||
POM_DESCRIPTION=A Compose Image Picker. | ||
POM_PACKAGING=aar | ||
POM_INCEPTION_YEAR=2022 | ||
GROUP=com.himanshoe | ||
VERSION_NAME=1.0.0-alpha01 | ||
VERSION_CODE=1 | ||
POM_URL=https://github.com/hi-manshu | ||
POM_LICENCE_NAME=The Apache Software License, Version 2.0 | ||
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt | ||
POM_LICENCE_DIST=repo | ||
POM_SCM_URL=https://github.com/hi-manshu | ||
POM_DEVELOPER_ID=hi-manshu | ||
POM_DEVELOPER_NAME=Himanshu Singh | ||
POM_DEVELOPER_URL=https://github.com/hi-manshu |