Questions tagged [bottomnavigationview]

Questions related to bottom navigation bar. Bottom Navigation Bar menu item title,icon,populating content and and enabled states related issues. Bottom navigation bar item click listener, item background resource,item text color, inflate menu,max item count. Bottom Navigation Bar is an implementation of material design bottom navigation.

BottomNavigationView

BottomNavigationView Represents a standard bottom navigation bar for application. It is an implementation of material design bottom navigation.

Bottom navigation bars make it easy for users to explore and switch between top-level views in a single tap. It should be used when application has three to five top-level destinations.

The bar contents can be populated by specifying a menu resource file. Each menu item title, icon and enabled state will be used for displaying bottom navigation bar items. Menu items can also be used for programmatically selecting which destination is currently active.


                                         BottomNavigationView

This widget has a couple of attributes set on it. We can use these to set menu items we wish to display and the colours to be used throughout the Bottom Navigation View:

  • app:itemBackground — The background color to be used for the bottom navigation menu
  • app:itemIconTint — The tint to be used for the icons in the bottom navigation menu
  • app:itemTextColor — The color to be used for the text in the bottom navigation menu
  • app:menu — The menu resource to be used to display items in the bottom navigation menu

We can also set these values programmatically by using the following methods on our BottomNavigationView instance:

  • inflateMenu(int menuResource) — Inflate a menu for the bottom navigation view using a menu resource identifier.
  • setItemBackgroundResource(int backgroundResource) — The background to be used for the menu items.
  • setItemTextColor(ColorStateList colorStateList) — A ColorStateList used to color the text used for the menu items
  • setItemIconTintList(ColorStateList colorStateList) — A ColorStateList used to tint the icons used for the menu items

Useful Links:

1718 questions
0
votes
2 answers

How should I structure bottom navigation in Android coming from iOS background?

Some background: Coming from an iOS background, using UITabbarController is very common and straight forward. Each Tab in the tab controller will change the current view to another UIViewController, and each of these UIViewControllers can have its…
andy
  • 195
  • 1
  • 2
  • 15
0
votes
4 answers

Uneven Bottom Navigation Bar

I'm trying to create a bottom navigation bar with 5 items regularly spaced and without labels underneath the icons. I found lots of guidance and followed it but unlike the examples I followed, my navigation bar display is very uneven. How can I make…
Naty
  • 25
  • 4
0
votes
2 answers

Bottom navigation not working

My bottom navigation view not working. When i click on items my fragment in not loading. beginTransaction() may produce NullPointerException. This is my Activity : public static void enableNavigation(Context context, final BottomNavigationViewEx…
0
votes
2 answers

App crashes when try to get `BottomNavigationView`'s layout params

I want hide my bottomNavigationView when scrolling this is my activity:
user9641573
0
votes
0 answers

How to make ScrollView scrollable when windowSoftInputMode is adjustPan?

I use BottomNavigationView in my activity. When keyboard opens and windowSoftInputMode is NOT adjustPan, BottomNavigationView is shown over keyboard. That's why I set windowSoftInputMode as adjustPan. But, now, my ScrollView is not scrollable. When…
neo
  • 1,314
  • 2
  • 14
  • 34
0
votes
2 answers

Bottom navigation view not working

My bottom navigation view not working. When i click on items my fragment in not loading. This is my activity for bottom navigation view public static void enableNavigation(Context context, final BottomNavigationViewEx view, final FragmentManager…
0
votes
1 answer

Activity re-created on bottom navigation view

Following is my code for bottom navigation view item selected public static void setupBottomNavigationView(BottomNavigationViewEx bottomNavigationViewEx){ Log.d(TAG, "setupBottomNavigationView: Setting up NavigationView1"); …
0
votes
1 answer

Adding my own pages to bottom navigation

I'm following this guide (https://15mgm15.ghost.io/2018/06/06/bottom-tabbed-page-for-xamarin-forms-android/) but I cant figure out how to add the pages I've added to the project. I need to add something here in order for the app to understand which…
KalleP
  • 319
  • 4
  • 16
0
votes
1 answer

In Bottom Navigation Bar , icon is not getting highlighted even after i selected that icon .How to change it?

By default in every activity only home icon is getting highlighted. How to change the highlight the icon which is selected ? How to change the default highlighting icon ? Where to make the changes in which activity_main.xml or MainActivity.java or…
0
votes
1 answer

Is it possible to keep all fragments in running state on using BottomNavigationView, even those which are not visible on the screen?

I am trying to use BottomNavigatioView in my MainActivity and when on clicking a tab in the bottom navigation, the new fragment replaces the previous one, which takes the previous one to the onDestroyView state. How can we make all the fragments in…
0
votes
1 answer

Bottomnavigationview with FloatingActionButton

How can I create this Bottomnavigationview? I used AHBottomNavigation to create this view successfully and added FloatingActionButton to view with the bottom margin. But I think it is not true to add margin to fix FloatingActionButton position. I…
0
votes
1 answer

Bottom Navigation Gets Stuck While ProgressBar Dialog Shows

Can anyone please suggest about below issue. Actually i'm unable to navigate through BottomNavigationView option while progressbar dialog gets display. Is it any way to resize the height of dialog upto BottomNavigationView so that navigation can…
0
votes
1 answer

Bindingcontext error when passing selected item

I am trying to create a bottom nav bar with the NuGet:ThriveGmbH.BottomNavigationBar.XF I hope that I am thinking correctly but this is my setup. This is the code that is linking to my profile page, here I get the error Severity Code Description …
0
votes
1 answer

How to disable bottom navigation view in xamarin android?

I'm trying to disable my bottom navigation view in my activity but it didn't work. But when i try to hide it and show it, its worked fine. But to disable and enable it, it doesn't work. Btw I used…
0
votes
1 answer

menu is not visible in Bottom Navigation bar using BottomNavigationView widget android

I am trying to add 5 icons on the bottom of the navigation bar. and this is what it came out like pic1. When I click on the bottom, other icons would show up only one at a time, shown in pic2. I need to make it look like the this picture, pic3. Does…
frodyteen
  • 19
  • 6
1 2 3
99
100