-
-
Notifications
You must be signed in to change notification settings - Fork 994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting the reference of added image to the editor #280
Comments
i think, if this method would return that View then, maybe that can be solved . package: ja.burhanrashid52.photoeditor /**
|
I just cloned the repo and tried to do the solution , and its working!, i think we should be able to customize the image we add, so please @burhanrashid52, i request you to update this function! MainActivity.java public class MainActivity extends AppCompatActivity {
} PhotoEditor.java /** public View addImage(Bitmap desiredImage) {
|
It's good that it's working for you. But the problem I see is exposing internal view to the client. imageRootView is created internally and manage the touch listner, if we return that as a value then the client can break or override the library logic very easily. |
Okay then, what if we update OnPhotoEditorListener and add parameter "addedView" of type View? could that break library logic? public void addImage(Bitmap desiredImage){ /* logic /} this wouldn't break library logic + we client can have customization to the image we add, what say @burhanrashid52 ? |
So here are the pros and cons of each approach.
|
suppose i add an image using PhotoEditor.addImage(bitmap) then , how to get the reference of the image(ImageView) that has been added to the editor, suppose, i want to resize the added image to the size of editor then how can i do that ? please provide me some way to do so ! Thank you!
The text was updated successfully, but these errors were encountered: