Tablet and Navigation Box Integration

In my application, I use a tablet and navigation box together. However, if I click an item in the navigation box, it launches the fragment, but tabhost does not change to the corresponding tab. I would like to fix it, but I do not know how to do it.

This image explains the structure of my application and my problem:

enter image description here

+4
source share
1 answer

code snippet from snippet: this will change the tab when the button is clicked

((MenuActivity) getActivity()).setCurrentTab(<tabnumber>);

code snippet from menu activity

public void setCurrentTab(int argTabIndex){
            mTabHelper.setCurrentTab(argTabIndex);
        }

Following the example of actionbarcompat.

https://github.com/antoniolg/ActionBarCompatExample

0
source

All Articles