i have this interface in my app
by choosing each item in bottomNavigation , the tab layout will change
my question is should i make a fragment for each of the bottom navigation items and then put the tab layouts inside that fragments ?
or make only one tab layout in activity and change the adapter of the tab layout in respond to selection of the bottom navigation items ?
Related
I have a sliding tab layout where i have 3 tabs and a navigation drawer. Each tab is a fragment. now i want to use one fragment as a cardview in a grid manner. but my problem is when i click navigation drawer item my tab fragment grid data is not changing.
here is the link of my code structure.
https://github.com/rrrongon/NavigationDrawerwithTab
Use event bus for achieve this. when you click on menu item fire an event and than listen that event to your respective fragment and on listen do your respective work
I have currently a working project with Navigation drawer and tabbed view using TabHost.I have 3 tabs in which each fragments are loaded as the child view of the tab.My requirement is that,when I click a button inside the child fragment,I need to navigate to another tab.Is this possible?Any help is appreciated.
Im using TabHost,and the 3 tabs are each a fragment of themselves.
Again,Im not using a TabActivity...
In my app navigation drawer and viewpager are on same activity. I want to hide viewpager on clicking the item on navigation drawer.
I tried to set its visibility as GONE but it didn't work.
Pleaseeee tell me how to hide it thanks..
Tab.setVisibility(ViewPager.GONE); this is the line I wrote in my code
On clicking drawer item fragment containing webview opens
If you want to hide the ViewPager, you need to set it's visibility to View.GONE. Try
myViewPager.setVisibility(View.GONE);
instead. Currently you're setting the visibility on a Tab and not the ViewPager itself. They're 2 completely different things.
I've created SwipingTab with two Fragments. Now I want to add menu on bottom to be fixed, static. When user swipe between tabs, that menu should not moving. Where should I create that menu. I tried on main_layout.xml, but cannot. Any suggestion or idea ??
This is how I would set up the main view with tabs
Then the footermenu would inflate a fragment that will be used as a menu. You can follow this Android Tab Layout with Swipeable Views to add swapeable tabs
I have 4 tabs at the bottom of the screen.
the second tab opens an activity which is having 3-7 tabs of its own.
all these tabs shows different lists.
I am able to navigate to list, but list view hides the bottom tabs.
How can I add listview inside tabhost child of another tabhost ?
I don't want any tab to hide.
make layout_marginBottom in your listView according your layout