android-bottomnav

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

Bottom Navigation bar with fragments

梦想的初衷 提交于 2020-03-21 22:25:10
问题 I have a bottom navigation bar in my Main Activity. By clicking on one of the tabs in my bottom navigation, I want to change the fragment in the view. I have the following code: Main Activity: public class StartActivity extends AppCompatActivity { SwiftFragment swiftFragment; FrameworksFragment frameworksFragment; FrameLayout content; android.support.v4.app.FragmentManager fragmentManager; private BottomNavigationView.OnNavigationItemSelectedListener mOnNavigationItemSelectedListener = new

How to change activity on bottom navigation button click?

99封情书 提交于 2020-01-20 16:44:38
问题 I want to use bottom navigation bar in my existing android app but the problem is all screen are activity ,is it possible to load activity without hiding the bottom navigation bar. example: activity_main.xml <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support

BottomNavigationView with FloatingActionButton inside CoordinatorLayout dont match position

别来无恙 提交于 2020-01-03 21:12:51
问题 I want to hide my bottom bar on scroll but a FAB should stay on the screen. If I put the FAB on top of BottomNavigationView using anchors but it appears behind it. If I put layout_insetEdge="bottom" to the BottomNavigationView then it works but make my tests fail (https://issuetracker.google.com/issues/70162122) so I cannot use that at the moment. Layout: <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res

Fragment savedInstanceState is always null when using Navigation Component

感情迁移 提交于 2020-01-03 17:13:09
问题 Currently, I am playing around Android Navigation Component with Bottom Navigation Bar. While playing I realized two facts: Fragments are always recreated ( onCreate , onViewCreated , onViewDestroyed are called as soon as the user navigates to another fragment) savedInstanceState is always null (in onCreate , onViewCreated , etc.) The first issue can be fixed by using custom FragmentNavigator , which will reuse fragment if it already exists package am.chamich.apps.advancedbottomnavigation

Fragment savedInstanceState is always null when using Navigation Component

时间秒杀一切 提交于 2020-01-03 17:12:43
问题 Currently, I am playing around Android Navigation Component with Bottom Navigation Bar. While playing I realized two facts: Fragments are always recreated ( onCreate , onViewCreated , onViewDestroyed are called as soon as the user navigates to another fragment) savedInstanceState is always null (in onCreate , onViewCreated , etc.) The first issue can be fixed by using custom FragmentNavigator , which will reuse fragment if it already exists package am.chamich.apps.advancedbottomnavigation

Multiple Tab fragments inside bottom navigation fragment

自古美人都是妖i 提交于 2019-12-31 08:32:55
问题 In bottom navigation with three tabs (Home, Dashboard, Notifications). Each bottom navigation tab is a fragment. The first tab ie. Home fragment contains another top navigation tabs having four tabs (Tab 1, Tab 2, Tab 3, Tab 4). The problem When navigate from Home tab to Notifications tab directly and come back to Home tab, Tab1/which ever tab previously selected tab (top navigation tabs) the content of the tab is not loaded. When swipe the tabs from Tab 1 (Home fragment tab) all the way to

Multiple Tab fragments inside bottom navigation fragment

末鹿安然 提交于 2019-12-31 08:32:30
问题 In bottom navigation with three tabs (Home, Dashboard, Notifications). Each bottom navigation tab is a fragment. The first tab ie. Home fragment contains another top navigation tabs having four tabs (Tab 1, Tab 2, Tab 3, Tab 4). The problem When navigate from Home tab to Notifications tab directly and come back to Home tab, Tab1/which ever tab previously selected tab (top navigation tabs) the content of the tab is not loaded. When swipe the tabs from Tab 1 (Home fragment tab) all the way to

How to make bottom navigation show menu items with icon and text except center item menu show only icon? [closed]

倾然丶 夕夏残阳落幕 提交于 2019-12-17 10:33:18
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . I want to create bottom navigation bar show menu items icon and text except center item. eg. i have attached image 回答1: Try below code: XML file: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http:/

Always disable status bar and bottom bar in a custom launcher

左心房为你撑大大i 提交于 2019-12-12 00:55:34
问题 I need to write custom android launcher with only one my application and with disabling android system statusbar and bottom bar. Here is my code in AndroidManifest.xml <activity android:name=".MainActivity" android:launchMode="singleTask" android:stateNotNeeded="true"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.HOME" /> <category android:name="android.intent