title: Navigation.findNavController() Cant find view
body: <p>Android newbe here, I have am trying to get a menu option in the inflated menu in MainActivity to trigger a navigation to another screen, the issue I am having is finding the view of MainActivity for findNavController() ,I need it where I have put the ????, can anyone help ?</p>
  <pre><code>override fun onCreate(savedInstanceState: Bundle?) {
      super.onCreate(savedInstanceState)
      setContentView(R.layout.activity_main)
      setSupportActionBar(findViewById(R.id.toolbar))
  }
  
  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
  }
  
  override fun onOptionsItemSelected(item: MenuItem): Boolean {
      // Handle action bar item clicks here. The action bar will
      // automatically handle clicks on the Home/Up button, so long
      // as you specify a parent activity in AndroidManifest.xml.
  
      when (item.itemId) {
  
          R.id.menu_settings -&gt; {
              val controller: NavController = Navigation.findNavController(????)
              controller.navigate(R.id.settingsFragment)
          }
  
          else -&gt; super.onOptionsItemSelected(item)
      }
      return true
  }
  </code></pre>
  <p>}</p>
  <pre><code>&lt;menu xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
  xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
  xmlns:tools=&quot;http://schemas.android.com/tools&quot;
  tools:context=&quot;com.ebookfrenzy.sos.MainActivity&quot;&gt;
  &lt;item
      android:id=&quot;@+id/menu_settings&quot;
      android:orderInCategory=&quot;11&quot;
      android:title=&quot;@string/action_settings&quot;
      app:showAsAction=&quot;never&quot; /&gt;
  
  &lt;item
      android:id=&quot;@+id/menu_removeads&quot;
      android:orderInCategory=&quot;20&quot;
      android:title=&quot;@string/remove_ads&quot;
      app:showAsAction=&quot;never&quot; /&gt;
  
  &lt;item
      android:id=&quot;@+id/menu_about&quot;
      android:orderInCategory=&quot;20&quot;
      android:title=&quot;@string/about&quot;
      app:showAsAction=&quot;never&quot;/&gt;
  </code></pre>