title: How to add a click listener to Menu Item in Kotlin
body: <p>I want to create a Bottom Navigation Bar. I used android BottomNavigationView to create the UI but I don't know how to add an OnClick listener to the items in Menu. </p>
  
  <p>I searched on google and found some articles, but all of them were using a Toolbar element. I don't know about how to add that and what it was doing. </p>
  
  <p>This is my Navigation bar code which I am including in the main activity</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
               xmlns:design="http://schemas.android.com/apk/res-auto"
               android:layout_width="match_parent"
               android:layout_height="match_parent"&gt;
  
  
      &lt;RelativeLayout android:layout_width="match_parent" android:id="@+id/bottom_nav"
                      android:background="@drawable/gradient_theme"
                      android:layout_height="wrap_content"  android:layout_gravity="bottom"&gt;
  
          &lt;android.support.design.widget.BottomNavigationView
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:background="@android:color/white"
                  android:id="@+id/menuBar"
                  design:menu="@menu/menu_bar"
                  design:itemIconTint="@android:color/darker_gray"/&gt;
      &lt;/RelativeLayout&gt;
  &lt;/FrameLayout&gt;
  </code></pre>
  
  <p>This is my MainActivity.kt in which i want to set Listeners</p>
  
  <pre><code>class MainActivity : AppCompatActivity() {
  
      override fun onCreate(savedInstanceState: Bundle?) {
          super.onCreate(savedInstanceState)
          setContentView(R.layout.activity_main)
          beautifyLayout(this, window)
          setSupportActionBar(toolbar)
  
          testButton.setOnClickListener {
              val intent= Intent(this,AccountActivity::class.java)
              finish()
              startActivity(intent)
          }
      }
      }
  </code></pre>
  
  <p>This is menu_bar.xml </p>
  
  <pre><code>&lt;menu xmlns:android="http://schemas.android.com/apk/res/android" &gt;
      &lt;item android:id="@+id/btn1" android:title="" android:icon="@drawable/ic_feed"/&gt;
      &lt;item android:id="@+id/btn2" android:title="" android:icon="@drawable/ic_chat_bubble_black_24dp"/&gt;
      &lt;item android:id="@+id/btn3" android:title="" android:icon="@drawable/ic_search_black_24dp"/&gt;
      &lt;item android:id="@+id/btn4" android:title="" android:icon="@drawable/ic_menu_black_24dp" /&gt;
  &lt;/menu&gt;
  </code></pre>
  
  <p>The UI is working perfectly ,it only requires some Listeners. I want if possible to use only BottomNavigationView.</p>