bottomnavigationview

BottomNavigation Menu with Jetpack Navigation does not navigate

旧巷老猫 提交于 2021-02-11 17:36:06
问题 I have a strange problem regarding a BottomNavigationBar which I could not solve altough having spent a huge amount of time into it. When I use it in the 'recommended' way (from many tutorials) it just does not navigate. So what do I mean by 'recommended' way: I have a single acticity with a navHostFragment called 'MainActivity'. This main activity has a XML layout file in which I put the BottomNavigationBar. The BottomNavigationBar also has a XML layout file. Now I have a Fragment called 'FR

How to manage bottomNavigation from fragment?

依然范特西╮ 提交于 2021-02-11 14:47:39
问题 I'm trying to set navController to bottomNavigation, but it's requires activity, the problem is my borromNavigation hosted in fragment, so i don't have activity instance. I've tried bottom_nav_view.setupWithNavController(findNavController()) and: val host = Navigation.findNavController(this.activity!!.parent, R.id.my_nav_host_fragment) bottom_nav_view.setupWithNavController(host) home_fragment.xml: <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns

Change bottom navigation current index and update setState() from another screen class

左心房为你撑大大i 提交于 2021-02-11 12:32:14
问题 Here is my bottom_bar screen. I want to change the bottom navigation menu from another screen button click. How can I resolve this problem?. is there any option that can navigate bottom_navigation from another class. I didn't get any accurate answers through search. [N.B: I am totally new in flutter. Please forgive me if there is any type of misconception ] @override Widget build(BuildContext context) { final themeNotifier = Provider.of<ThemeNotifier>(context); return Scaffold( key:

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

拟墨画扇 提交于 2021-02-08 11:22:44
问题 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 else menu xml file ? Login icon is pressed but home is getting highlighted : selector.xml MainActivity.java activity_main.xml nav_items.xml-menu item I pressed the second icon,activity is changed but still home is getting highlighted in emulator 回答1

Android - PageView in new BottomNavigationBar - prevent reload fragments

。_饼干妹妹 提交于 2021-02-08 04:43:23
问题 In my StartActivity the BottomNavigationBar Listener has the following setup: private GuideFragment guideFragment = new GuideFragment(); private MapFragment mapFragment = new MapFragment(); private MoreFragment moreFragment = new MoreFragment(); private BottomNavigationView.OnNavigationItemSelectedListener mOnNavigationItemSelectedListener = new BottomNavigationView.OnNavigationItemSelectedListener() { @Override public boolean onNavigationItemSelected(@NonNull MenuItem item) { Fragment

How to change a specific icon image from Bottom Navigation View

此生再无相见时 提交于 2021-02-07 04:19:49
问题 I need to implement a Bottom Navigation View in my android app. The middle icon needs to be an image, the company logo. But when I run the app it appears only a grey filled rounded icon. The images above show what I want and what I'm getting. What I want: What I get: I already tried others questions in this website, but every answer tells to change the iconTintList from XML with a drawable, but the center icon is a vector with more than one color. When I tried to set null to setIconTintList

How to change a specific icon image from Bottom Navigation View

北战南征 提交于 2021-02-07 04:18:59
问题 I need to implement a Bottom Navigation View in my android app. The middle icon needs to be an image, the company logo. But when I run the app it appears only a grey filled rounded icon. The images above show what I want and what I'm getting. What I want: What I get: I already tried others questions in this website, but every answer tells to change the iconTintList from XML with a drawable, but the center icon is a vector with more than one color. When I tried to set null to setIconTintList

How to change a specific icon image from Bottom Navigation View

不羁岁月 提交于 2021-02-07 04:18:48
问题 I need to implement a Bottom Navigation View in my android app. The middle icon needs to be an image, the company logo. But when I run the app it appears only a grey filled rounded icon. The images above show what I want and what I'm getting. What I want: What I get: I already tried others questions in this website, but every answer tells to change the iconTintList from XML with a drawable, but the center icon is a vector with more than one color. When I tried to set null to setIconTintList

How to change a specific icon image from Bottom Navigation View

∥☆過路亽.° 提交于 2021-02-07 04:18:09
问题 I need to implement a Bottom Navigation View in my android app. The middle icon needs to be an image, the company logo. But when I run the app it appears only a grey filled rounded icon. The images above show what I want and what I'm getting. What I want: What I get: I already tried others questions in this website, but every answer tells to change the iconTintList from XML with a drawable, but the center icon is a vector with more than one color. When I tried to set null to setIconTintList

KOTLIN - First item in BottomNavigationBar isn't visible, title issues

﹥>﹥吖頭↗ 提交于 2021-02-05 08:56:49
问题 I have a BottomNavigationBar with 5 items. The first item is the same as the rest, apart from the name and icon. Here is the xml for the bottom_nav menu <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/name_configuration" android:title="Name Mech" android:icon="@drawable/ic_action_name" /> <item android:id="@+id/mech_skills" android:title="Skills" android:icon="@drawable/ic_action_skills" /> <item android:id="@+id