Questions tagged bottomnavigationview

Explore the latest questions and answers asked by our top developers.

Jetpack Compose bottom navigation, fab button and save screen state

i have been playing with jetpack compose, bottom navigation and fab button. The expected behavior of the application is as follows (bottom nav a/b/c): a) Screen 1 –> (+ fab) –> Screen 1.A b) Screen 2 –> (+ fab) –> Screen 1.B c) Screen 3 When i am in screen 1, and press + button, […]

BottomNavigationView navigation items text changed from bottom to top of icon on dependency update

After upgrading dependecy: ‘’ from 1.4.0 to 1.5.0, the navigation items text has somehow changed from being anchored below the icon to on top of it: From: To: Is this a feature or a bug and does this have a fix? Source: Android Questions

By Tendai
Categorized as android, bottomnavigationview

NavigationUI not working correctly with bottom navigation view implementation

So I have a scenario in which I have 5 fragments attached with bottom navigation. 1. Home 2. Inbox 3. Search 4. Notification 5. Profile So I have another fragment called (BarcodeDetail) to which I navigate from Home Fragment. (Home -> BarcodeDetail) Now from BarcodeDetail I navigate to Search Fragment (BarcodeDetail -> Search) But now […]

By Malik Bilal
Categorized as android, bottomnavigationview, navigation

Hide/Show Bottom Navigation and Collapsible Toolbar on scroll in fragment

I am trying to implement show/hide behavior of bottom navigation and collapsible toolbar from a specific fragment of bottom navigation. Here is my activity_main.xml: <?xml version="1.0" encoding="utf-8"?> <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="" xmlns:app="" android:id="@+id/container" android:layout_width="match_parent" android:layout_height="match_parent"> <fragment android:id="@+id/nav_host_fragment_activity_main" android:name="androidx.navigation.fragment.NavHostFragment" android:layout_width="match_parent" android:layout_height="match_parent" app:defaultNavHost="true" app:layout_behavior="@string/appbar_scrolling_view_behavior" app:layout_constraintBottom_toTopOf="@id/nav_view" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" app:navGraph="@navigation/mobile_navigation" /> < android:id="@+id/nav_view" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" android:background="?android:attr/windowBackground" app:layout_behavior="@string/hide_bottom_view_on_scroll_behavior" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" […]

How do I switch between fragments using the ExpandableBottomBar menu items?

The app starts normal with no fragment and when I click on any of the items in the bottom menu bar the app crashes suddenly. I have used the ExpandableBottomBar github repository to create this bottom bar menu. If you need any more info I will provide. I need help as this is my first […]

BottomNavigationView, icons spaced equally

I’m using BottomNavigationView with two items, however, on tablet or landscape, it pushed both icons to the center. I’m trying to have equally spaced similarly to what material shows but without label: Here is my code, does anyone know if there is an attribute that I could use to achieve this? < android:id="@+id/bottom_nav_view" android:layout_width="0dp" android:layout_height="wrap_content" […]

By Ronald Barrera
Categorized as android, bottomnavigationview, kotlin, material-ui, xml

How to prevent ViewModel from being cleared when navigating away in BottomNavigationView using Navigation Component

I’m having an issue saving the state of my fragment’s UI and I can’t seem to find any solutions regarding this problem when using a BottomNavigationView. Here’s my current setup: I have a NavHostFragment and a BottomNavigationView setup in activity_main.xml: <LinearLayout> … < android:id="@+id/bottom_nav_host_fragment" android:name="androidx.navigation.fragment.NavHostFragment" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" app:defaultNavHost="true" app:navGraph="@navigation/bottom_tab_nav" /> < android:id="@+id/bottom_nav_view" android:layout_width="match_parent" android:layout_height="72dp" […]

Recyclerview creates problem with navigationbar

I have a bottomnavbar that deals with the navigatioon in my app. I have two fragments that then holds Recyclerviews. I tried to setup my recyclerview in one of the fragments with a custom adapter and everything. When i then go into the app and go into the fragment with the recycleview it makes the […]

updateAcquireFence: Did not find frame

I am getting this error while switching to the last fragment of the bottom navigation and because of this the last fragment loads a little bit slow E/FrameEvents: updateAcquireFence: Did not find frame. 2022-01-03 12:35:41.373 14186-15042/com.pandojo E/BufferQueueProducer: [ImageReader-329x48f1u256m2-14186-447](id:376a000001bf,api:0,p:-1,c:14186) disconnect: not connected (req=1) 2022-01-03 12:35:41.373 14186-15042/com.pandojo W/libEGL: EGLNativeWindowType 0x7b81c7d010 disconnect failed Source: Android Questions

Error bottomnav allows you to navigate through the views but stops working on one of them

Hi i have made a bottom navigationview in my app and from the start everything was working but then suddenly it stopped. When i went into settings tabe it just stops working with the navigation i cant eaven click it anymore why could this be? i have not done much except adding a listview to […]

By Jens
Categorized as android, bottomnavigationview, kotlin, navigation
1 2 3 43

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us