S
S
swpavlov2020-12-30 19:18:06
Kotlin
swpavlov, 2020-12-30 19:18:06

Must not be null?

Can't figure out how to hide BottomNavigationView. There is an application in which the switching of tabs (Fragments) is organized using the BottomNavigationView. I need to hide the navigation bar when a button is clicked on one of the fragments to go to the next fragment. I'm trying to do this from a fragment in onViewCreated:

fabCreateDeadline_deadline.setOnClickListener {
            bottom_navigation_main.visibility = View.GONE
            replaceFragment(CreateDeadlineFragment(), false)
        }


But I'm getting the "must not be null" error.
#bottom_navigation_main - id bottomnavifationview

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question