36.11 Loading the Gestures File
Now that the gestures file has been added to the project, the next step is to write some code so that the file is loaded when the activity starts up. For the purposes of this project, the code to achieve this will be added to the MainActivity class located in the MainActivity.kt source file as follows:
package com.ebookfrenzy.customgestures
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.gesture.GestureLibraries
import android.gesture.GestureLibrary
import android.gesture.GestureOverlayView
import android.gesture.GestureOverlayView.OnGesturePerformedListener
class MainActivity : AppCompatActivity(), OnGesturePerformedListener {
private lateinit var binding: ActivityMainBinding
var gLibrary: GestureLibrary? = null
override fun onCreate(savedInstanceState: Bundle?) {
...