Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ActionBar and ActionBar.Tab and Navigation Drawer android

I am using action bar with help of android-support-v7-appcompat and also using Navigation drawer over it.

In one of my fragment if I use ActionBar.Tabs then the tabs overlaps the navigation drawer and the drawer gets below the ActionBar tabs.

How can I make the action bar like in google play application or Google movie application. The tabs should also go behind like the fragment. How can I do the same with android-support-v7-appcompat Libs

like image 539
Sumit Patel Avatar asked Jan 15 '14 05:01

Sumit Patel


2 Answers

For Tab bar try ViewPagerIndicator http://viewpagerindicator.com/ This has a very good implementation for tab bar.

When we use default tab bar with actionbar, in landscape mode it will be merged into single row. So its better to use the above library.

like image 154
ravindra.kamble Avatar answered Nov 03 '22 14:11

ravindra.kamble


I think you would be better off using a library like ViewPagerIndicator. The ActionBar is recognized as decor and is shown over top of the window, and the DrawerLayout is drawn as an object in the window.

Not sure if they're going to fix it in a future revision, but ViewPagerIndicator is pretty easy to set up and customize anyway.

Also, go to this question for better achievement getting-drawerlayout-to-slide-over-the-actionbar

like image 38
M D Avatar answered Nov 03 '22 12:11

M D