Skip to main content
PESDK/Android/Guides/Border Frames

Configure Border Frames

PhotoEditor SDK supports several configuration options for the FrameToolPanel allowing flexible adaptation to different needs and use cases.

Set available tools#

By default, all available frame tools are enabled. In our example, we remove the option to change the frame width and only allow replacing it and changing its opacity. We do this by setting the optionList and adding only the tools that we need. Alternatively, this could also be done by removing the FrameOption with the id OPTION_WIDTH from the optionList.

Set allowed actions#

The quickOptionList contains all the actions that users can perform on a frame. It also contains SpaceItems that are used to space out the actions. In our example, we clear the quickOptionList as we don't want to allow any actions.

class PhotoFrameConfiguration(private val activity: AppCompatActivity) : Example(activity) {
override fun invoke() {
// In this example, we do not need access to the Uri(s) after the editor is closed
// so we pass false in the constructor
val settingsList = PhotoEditorSettingsList(false)
// Set the source as the Uri of the image to be loaded
.configure<LoadSettings> {
it.source = activity.resourceUri(
settingsList.configure<UiConfigFrame> {
// By default all available frame tools are enabled
// For this example only a couple are enabled
val tools = listOf(
// By default the editor has all available overlay actions for this tool enabled
// For this example, we remove all the actions
// Start the photo editor using PhotoEditorBuilder
// The result will be obtained in onActivityResult() corresponding to EDITOR_REQUEST_CODE
.startActivityForResult(activity, EDITOR_REQUEST_CODE)
// Release the SettingsList once done
override fun onActivityResult(requestCode: Int, resultCode: Int, intent: Intent?) {
intent ?: return
if (requestCode == EDITOR_REQUEST_CODE) {
// Wrap the intent into an EditorSDKResult
val result = EditorSDKResult(intent)
when (result.resultStatus) {
EditorSDKResult.Status.CANCELED -> showMessage("Editor cancelled")
EditorSDKResult.Status.EXPORT_DONE -> showMessage("Result saved at ${result.resultUri}")
else -> {