Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.ahmed-adel-said:photo-editor-android:'
}
dependencies {
implementation("com.github.ahmed-adel-said:photo-editor-android:")
}
<dependency>
<groupId>com.github.ahmed-adel-said</groupId>
<artifactId>photo-editor-android</artifactId>
<version></version>
</dependency>
libraryDependencies += "com.github.ahmed-adel-said" % "photo-editor-android" % ""
:dependencies [[com.github.ahmed-adel-said/photo-editor-android ""]]
It's an android image editing SDK with simple, easy support for image manipulation.
Import Photo Editor SDK Module in your project.
photoEditorSDK = new PhotoEditorSDK.PhotoEditorSDKBuilder(PhotoEditorActivity.this)
.parentView(parentImageRelativeLayout)
//add parent image view
.childView(photoEditImageView)
//add the desired image view
.deleteView(deleteRelativeLayout)
//add the deleted view that will appear during the movement of the views
.brushDrawingView(brushDrawingView)
// add the brush drawing view that is responsible for drawing on the image view
.buildPhotoEditorSDK();
// build photo editor sdk
photoEditorSDK.addText(text, colorCodeTextView);
photoEditorSDK.addImage(image);
photoEditorSDK.addEmoji(emojiName, emojiFont);
photoEditorSDK.setBrushDrawingMode(brushDrawingMode);
// brushDrawingMode is false by default, true if you want to draw on the image view
photoEditorSDK.setBrushSize(size);
photoEditorSDK.setBrushColor(colorCode);
photoEditorSDK.brushEraser();
photoEditorSDK.setBrushEraserSize(brushEraserSize);
photoEditorSDK.setBrushEraserColor(color);
photoEditorSDK.saveImage(folderName, imageName);
photoEditorSDK.viewUndo();
photoEditorSDK.clearAllViews();
photoEditorSDK.clearBrushAllViews();
photoEditorSDK.setOnPhotoEditorSDKListener(new OnPhotoEditorSDKListener() {
@Override
public void onEditTextChangeListener(String text, int colorCode) {
}
@Override
public void onAddViewListener(ViewType viewType, int numberOfAddedViews) {
}
@Override
public void onRemoveViewListener(int numberOfAddedViews) {
}
@Override
public void onStartViewChangeListener(ViewType viewType) {
}
@Override
public void onStopViewChangeListener(ViewType viewType) {
}
});
We welcome contributions from other developers to help us make the SDK even better. Before you contribute there are a number of things that you should know please see CONTRIBUTING.md for details.
Project is maintained and funded by
Copyright (c) 2017 Eventtus, PhotoEditorSDK is released under the MIT license.