Skip to main content

Custom Activity

VideoEditor SDK supports extending from VideoEditorActivity and creating your custom activity to use with our editor.

Extending from VideoEditorActivity#

Here, we create our custom activity extending from VideoEditorActivity. We copy the layout from our demo repository and add a custom view to it.

Make sure to add your custom activity to the AndroidManifest.xml.

Set custom activity#

Here, we pass our custom activity class to the VideoEditorBuilder. This indicates to the SDK to use the custom activity for showing the video editor.

class CustomVideoEditorActivity : VideoEditorActivity() {
private lateinit var imglyCustomView: ImglyCustomView
// Override the layoutResource to specify your own layout
override var layoutResource = R.layout.activity_custom_editor
override fun onCreate(savedInstanceState: Bundle?) {
imglyCustomView = findView(
imglyCustomView.setOnClickListener {
Toast.makeText(this, "Banner Clicked", Toast.LENGTH_SHORT).show()