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

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.

Related

How add option of "more" in navigation to bar?

I have an app that has 6 menu options, so I need a button on the tab navigation to bar that opens as a drop down so I don't have too many buttons on the tab navigation .
It's possible?
I tried to do it with Drawer, but the navigation tab disappears when I open the other pages. Can anyone help?

How to change drawer menu on fragment change

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.

How I can jump to root on click of a button outside react navigation

I have an icon in the header that opens a screen with stack navigator with a list view, and on pressing list item it open child/detail page.
All working fine, what I need is when clicking on the icon again in the header it goes back to root.
NOTE: header is not part of the navigation it is a custom header
this is the screenshot if help to understand
enter image description here

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... )