In the ArcGIS Kotlin sample application "Display a Map" where is the ActivityMainBinding class declairation found?

94 Views Asked by At

When I try to duplicate the Esri ArcGIS Kotlin sample project "Display a Map" using their example tutorial. The have you add a private attribute to the MainActivity.kt. I want to know where is the class ActivityMainBinding. It is not in the example code zip file. I'm using ArcGIS Kotlin SDK 200.1.0

 private val activityMainBinding: ActivityMainBinding by lazy {
        DataBindingUtil.setContentView(this, R.layout.activity_main)
    }

I've search developers.ArcGIS.com and other sources for an answer to this question.

2

There are 2 best solutions below

0
Tenfour04 On

This class is automatically generated by the Android Jetpack Data Binding library. There is no Kotlin or Java source to look at. The source file in this case would be res/layout/activity_main.xml.

0
Jay Bowman On

The ActivityMainBinding class is generated by android studio if you enable data binding in your build.gradle file. See Android data binding. Your xml view needs to have the root element of layout.