Skip to content

DroidNinja/Whatsapp-Like-PhotoEditor

Repository files navigation

Whatsapp-Like-PhotoEditor

It is a library module that tries to mimic the whatsapp photoeditor. There are many things on which work needs to be done.

TODO

  • Fix cropping issue (needs to mimic whatsapp on this)
  • Remove ugly code
  • Convert code to kotlin
  • Publish on maven

demo demo demo demo demo

Usage

 ImageEditor.Builder(this, imagePath)
                .setStickerAssets("stickers")
                .disable(ImageEditor.EDITOR_TEXT) //to disable something
                .open()

Here setStickerAssets() methods takes folder name of stickers in the assets. Checkout sample if confused. You will get the result in onActivityResult

override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
    super.onActivityResult(requestCode, resultCode, data)
    when (requestCode) {
      ImageEditor.RC_IMAGE_EDITOR ->
        if (resultCode == Activity.RESULT_OK && data != null) {
          val imagePath: String = data.getStringExtra(ImageEditor.EXTRA_EDITED_PATH)
          edited_image.setImageBitmap(BitmapFactory.decodeFile(imagePath))
        }
    }
  }

Projects that helped

ImageEditor-Android

Android-Image-Cropper

About

A library module that tries to mimic whatsapp photo editor.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published