简体   繁体   中英

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

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.

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

Roman Nurik says that the Navigation Drawer should not be used with the Action Bar tabs.

The discussion is here https://plus.google.com/u/1/116515063230772720916/posts/8dWEkFcbTFX

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM