How to setOnNavigationItemListener on BottomNavigationView in android using Kotlin? : <p>I use kotlin-android-extension and I can call <code>bottomNavigationView</code> id from layout file to kotlin file. I can use <code>bottomNavigationView.setOnNavigationItemSelectedListener(BottomNavigationView.OnNavigationItemSelectedListener {})</code>, but whats next?</p>

<p>As far as I know in Java, there is another function called <code>onNavigationItemSelected</code>, but I can't find it in kotlin.</p>

<p>this is the example code I want to use in Java but cannot write it in kotlin.</p>

<pre><code>bottomNavigationView.setOnNavigationItemSelectedListener(
    new BottomNavigationView.OnNavigationItemSelectedListener() {
        @Override
        public boolean onNavigationItemSelected(@NonNull MenuItem item) {
            switch (item.getItemId()) {
                case R.id.action_favorites:

                case R.id.action_schedules:

                case R.id.action_music:

            }
            return true;
        }
    });
</code></pre>
