Language:
Custom Activity
VideoEditor SDK supports extending from VideoEditorActivity
and creating your custom activity to use with our editor.
Extending from VideoEditorActivity
#
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.
File:
class CustomVideoEditorActivity : VideoEditorActivity() {private lateinit var imglyCustomView: ImglyCustomView// Override the layoutResource to specify your own layoutoverride var layoutResource = R.layout.activity_custom_editoroverride fun onCreate(savedInstanceState: Bundle?) {super.onCreate(savedInstanceState)imglyCustomView = findView(R.id.imgly_custom_view)imglyCustomView.setOnClickListener {Toast.makeText(this, "Banner Clicked", Toast.LENGTH_SHORT).show()}}}