Questions tagged [android-bottomnav]

Bottom navigation bars display three to five destinations at the bottom of a screen.

Bottom navigation bars display three to five destinations at the bottom of a screen. Each destination is represented by an icon and an optional text label. When a bottom navigation icon is tapped, the user is taken to the top-level navigation destination associated with that icon.

270 questions
0
votes
1 answer

What is the alternative of using setState() in flutter?

I am implementing Curved_Navigation_Bar in my Flutter poject and I am not using any class(i.e. Stateful / Stateless). I want to change the state of the icons that are in my curved_navigation_bar, means I want that animation effect on my navigation…
0
votes
1 answer

Call API only once with Bottom Navigatioin Fragments

I am having a bottom navigation fragment and want to call API only once, which means when the user jumps to another tab and comes back API should not be getting called. And when the user comebacks from the background state, API should be called…
Mac_Play
  • 302
  • 4
  • 21
0
votes
1 answer

Android - Selected navigation item goes back to first navigation item

My MainActivity has a bottom navigation which defaults to the first item. Depending on data received via intent, I'd like for the selected item to change. I'm using the following code on the MainActivity's OnCreate method: if…
cesarcarlos
  • 1,271
  • 1
  • 13
  • 33
0
votes
1 answer

how to shorten a very long code or replace a short code (performing the same function) with code?

how shortening this code? because this code very long :'( this code for bottom button navigation bar, javaclass fragment please help me, I need to shorten this long code: package com.this.program; import android.os.Bundle; import…
0
votes
1 answer

display data using recycler view inside bottom Navigation

how can I pass data and display in recycler view inside bottom navigation bar? what I want to happen is that when I login to the account stored in firebase, I can get all the vaccine history of that account and store it inside the recycler view. but…
0
votes
2 answers

How to handle BottomNavBar menu listener with Navigation architecture component

In my recent project, I'm using Navigation component with BottomNavBar. BottomNavBar has 4 menus. For the first 3 menus, I've defined fragments in NavGraph file, but for the last menu item, I've to open Drawer. Now click listener for the first 3…
0
votes
1 answer

android public method setItemIconTintList() in BottomNavigationView is not available (android studio 4.1, Kotlin)

I am trying to set the BottomNavigation Icon tint to null I am using Android Studio 4.1 and Kotlin as my language and created the bottom navigation from the android create project val navView: BottomNavigationView = findViewById(R.id.nav_view) But…
0
votes
1 answer

Android Bottom navigation with splash

I'm implementing this bottom navigation pattern but with a splash fragment. My issue is when I navigate throw different fragments with bottom menu and I press to go back, I don't go back to the home fragment, instead of this, I return to the…
gmalija
  • 25
  • 3
0
votes
1 answer

How to add conditions to BottomNavigationView + Navigation components?

I'm trying to set up conditional navigation for my Fragments using the Navigation components and a BottomNavigationView. Current setup (without conditions): val navHostFragment = supportFragmentManager.findFragmentById(R.id.nav_host_fragment) as…
Sebastian
  • 90
  • 7
0
votes
1 answer

Bottom Navigation is not pinning to bottom inside fragment view

Helo every one. I want to create a fragment that contains a bottom navigation bar. Bottom navigation is working but seeming wrong place in my fragment layout. An also this codes are working so good in activity but not in fragment. Here is my…
emreturka
  • 846
  • 3
  • 18
  • 44
0
votes
0 answers

BottomNavigation - Why does one item have different space than the rest?

I created a BottomNav with 3 normal elements and one "custom" point for a "More Menu": But I don't understand why it would place it so differently than the others? The only difference is that the more menu is not a part of the bottom_nav_graph.xml,…
Big_Chair
  • 2,781
  • 3
  • 31
  • 58
0
votes
1 answer

Make a TabBar inside a specific NavBar fragment

my app use bottomNavBar with 3 fragments [Settings / Home / Gallery]. Now I'm trying to make a TabBar with 3 new Tabs inside of "Settings". [setting01 / setting02 / setting03] I followed carefully this tutorial :…
Xodarap
  • 343
  • 1
  • 6
  • 23
0
votes
1 answer

Android Navigation Advanced Sample Dependency Injection (Hilt) on config changes issue

having a problem with Navigation Advanced Sample provided by Google developers. Main problem is that in regular case senario for Hilt dependency injection we can simply: Create Custom FragmentFactory Create Custom NavHostFragment Asigne it to…
0
votes
1 answer

How to change toolbar icon on fragment change from bottom navigation, using Navigation Component Lib?

I've setup my bottom navigation with navHostController, I've a container activity which has a toolbar, I want to change the icon in toolbar based on which fragment I'm on, this was easy if I didn't use navigation Component library. MainActivity …
0
votes
2 answers

How i solve the error in fragment with android nav component

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.farmbuy/com.farmbuy.farmer.FarmersActivity}: android.view.InflateException: Binary XML file line #49: Binary XML file line #49: Error inflating class fragment at…
mikail yusuf
  • 197
  • 3
  • 5