What is the menuInflater in Android Studio?
I've been studying Kotlin and Android development, and studying the code samples in Android Studio, I've encountered this block:
override fun onCreateOptionsMenu(menu: Menu): Boolean {
// Inflate the menu; this adds items to the action bar if it is present.
menuInflater.inflate(R.menu.menu_main, menu)
return true
}
I know that first you have to instantiate a variable for the inflater to use the inflate() method, but there is no menuInflater variable in this...