bevy / photo-editor-android

Photo Editor SDK contains a lot of features like edit, scale, rotate and draw on images like Instagram stories.
MIT License
548 stars 189 forks source link

Re-edit text. #34

Closed Dnyaneshwar1926 closed 4 years ago

Dnyaneshwar1926 commented 4 years ago

This is an amazing library as I have seen till for editing images. I am using this library in my project. But there is one bug. Pls, resolve it. need your help buddy.

Bug:

Whenever we try to re-edit the already written text. Always last added index text will get edit, not the particular text.

ex: if I added 4 texts and try to re-edit anyone of them always it will make changes to 4th text, not the remaining 1,2 & 3rd texts. if I select 1st index to re-edit then it should edit only 1st index text. But 1st index text remains as it is & edits the 4th index text.

Dnyaneshwar1926 commented 4 years ago

I found the solution to this. Author, Please modify this code in project

In MultiTouchListener -> MotionEvent.ACTION_UP -> (Changes) onMultiTouchListener.onEditTextClickListener( view(add this), ((TextView) view).getText().toString(), ((TextView) view).getCurrentTextColor());

Then In PhotoEditorSDK -> onEditTextClickListener(We get view param here)-> update code with this code -> @Override public void onEditTextClickListener(View view, String text, int colorCode) { if (addTextRootView != null && addedViews.contains(view)) { parentView.removeView(view); addedViews.remove(view); } }

Here ur problem gets solve. Thank you :)