Kotlin / anko

Pleasant Android application development
Apache License 2.0
15.89k stars 1.29k forks source link

setOnNavigationItemSelectedListener is not working for bottomNavigationView #348

Open mradzinski opened 7 years ago

mradzinski commented 7 years ago

setOnNavigationItemSelectedListener is not working for bottomNavigationView. I have my layout coded like this:

            bottomNavigationView {
                inflateMenu(...)

                lparams {
                    width = matchParent
                    height = wrapContent
                    gravity = Gravity.BOTTOM
                }

                setOnNavigationItemSelectedListener { item ->
                    when (item.itemId) {
                         ...
                    }
                    false
                }
            }

Nothing happens when tapping on the items.

Robotecom commented 4 years ago

Has Anyone resolved this bug?