How to change drawer menu on fragment change - kotlin

I have bottom navigation to navigate between two fragments and a button for the side menu (drawer menu). My question is how to change the drawer menu based on fragments. When I switch to one fragment I want different side menu options.

Related

How to choose alternative tab to open in Navigation Form in Access using VBA

I have Navigation Form with horizontal and vertical tabs. How do I code to get back to the vertical tab when I click on the horizontal. I do not want to go back to the first vertical tab but to someone who is further down, to the one I left earlier.

Unmount the screen(Page) while switching between menus of Drawer Navigation

In my application i am having a drawer menu with list of menus in it.
For example The drawer menu has
1. Home
2. Screen A
3. Screen B.
i have overridden the Drawer menu component and on click of the menu item i am calling NavigationActions.navigate("Route Name") to open the Drawer screen.
when ever i click the menu item i want to load the recent data from the server through web api but ComponentWillMount and Constructor of the screen is called only for the First time Click and it is not unmounting the component when i switch to other menu.
Is it possible to unmount the screen when user click a new menu item Or to render the fresh component without old state whenever user click the menu from the drawer.?

How to handle Custom Events of Tabs on TabNavigator ReactNative?

I am taking a bottom tab navigator which is having five screens. At third screen which is home screen I want to open modal which contain 2 buttons. When user click on home button show modal and hide tab navigator and when user click anywhere at screen it gets out from modal .
I want functionality like this issue on GitHub presented :
https://github.com/react-navigation/react-navigation/issues/1059.
You can handle click on tab using next https://reactnavigation.org/docs/navigators/tab#tabBarOnPress
So in tabBarOnPress you can implement your custom logic ( open modal, trigger redux action, etc... )

How do you add a button to the "navigation bar" in IntelliJ?

By default, in IntelliJ, the main toolbar is hidden. When it is hidden, there are essential buttons that are shown in the navigation bar. I don't need the full toolbar, but it would be nice to be able to add a single button to the navigation bar.
How do you add a button to the navigation bar?
You can customize any menu or toolbar in IDEA in settings by going to:
Settings-> Appearance and Behavior -> Menus and Toolbars
The item you are looking for is called
Navigation Bar Toolbar

FragmentTabHost with DrawerLayout, fragment is not showing after replacing the content

i am using fragmenttabhost with drawer layout (containing settings button). there are 4 tabs in fragmenttabhost. NavigationView in drawer layout that contains 4 buttons. In my activity where fragmenttabhost is placed at bottom, and above is FrameLayout for containing the content of the tab. Now my problem is, lets suppose my application starts and by default tab at 0 index "home" is selected, i opened the drawer and click on settings button and i have placed the settings fragment in framelayout, which hold the tab's content. now when i close the drawer and click again on the tab which is at 0 index "home" , its view is not showing up.
any help would be thankful.