I want to do cropping of image i found some pretty useful ones but somehow is like lacking of the darken the unselected areas so I wondering do anyone know how? or lead me to the right direction? The online tutorial i found shows that is will darken the selected area but when I use it, it won't. Please help me thanks alot and sorry for my bad command of english.
Links to the tutorial I use.
I want it to be something like this.
editButton.setOnClickListener(new Button.OnClickListener(){
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Intent goEdit;
goEdit = new Intent(PreviewActivity.this, CropImage.class);
goEdit.putExtra("image-path", path);
goEdit.putExtra("scale", true);
goEdit.putExtra("fileName", nameFromPath);
//finish();
checkEdit = true;
startActivityForResult(goEdit,0);
}
});
EDIT I use this button listener to call into the cropImage file by calling to the class CropImage activity. This is a custom intent not the crop feature inside android but I think is the copy of it so that make it support for all versions but when I call into it the selected area isnt brighten and I donno where is the problem can anyone guide me? Thanks This is the library I'm using drioid4you crop image
hope you are doing well. you can use my code to crop image.you just have to make a class and use this class into your
XMl
andjava
classes. Crop image. you can crop your selected image into circle and square into many of option. hope fully it will works for you.because this is totally manageable for you and you can change it according to you.enjoy your work :)
I found a really cool library, try this out. this is really smooth and easy to use.
https://github.com/TakuSemba/CropMe
Can you use default android Crop functionality?
Here is my code
declare:
at top.
In onActivity result method, writ following code:
It is pretty easy for me to implement and also shows darken areas.
This library: Android-Image-Cropper is very powerful to CropImages. It has 3,731 stars on github at this time.
You will crop your images with a few lines of code.
1 - Add the dependecies into buid.gradle (Module: app)
2 - Add the permissions into AndroidManifest.xml
3 - Add CropImageActivity into AndroidManifest.xml
4 - Start the activity with one of the cases below, depending on your requirements.
5 - Get the result in onActivityResult
You can do several customizations, as set the Aspect Ratio or the shape to RECTANGLE, OVAL and a lot more.