Adding custom button to PE SDK UI

534 Views Asked by At

I have some trouble to find information how to extend default PhotoEditor SDK. I need to add a button to default UI panel where cancel and accept buttons are located. Is there any way to do this? Thank you for your help!

1

There are 1 best solutions below

2
On BEST ANSWER

Yes you can.

  1. Extend the View Class ly.img.android.ui.widgets.ImgLyTitleBar

  2. Overload this layout (this means, put this layout it in your Application res folder without rename it) and replace ly.img.android.ui.widgets.ImgLyTitleBar with your class. https://github.com/imgly/pesdk-android-demo/blob/master/default_res_files/res/layout/imgly_activity_photo_editor.xml

  3. Add your button, by overload this layout https://github.com/imgly/pesdk-android-demo/blob/master/default_res_files/res/layout/imgly_widget_actionbar.xml

  4. Add your button logic, in your ImgLyTitleBar extending class.

Best, Sven