I have created a drawer Layout using ActionBarSherlock and the support library. Does anyone know if its possible or how to make the Actionbar Slide with the menu so that it's not static?
Use the SlidingMenu library by jfeinstein10. Its really useful and provides a lot more functionality than the default android one. Plus, you can enabled it really easy and attach the same drawer to many different activities.
Here is a quick tutorial:
SlidingMenu <menu_name> = new SlidingMenu(this);
<menu_name>.setMode(SlidingMenu.RIGHT);
<menu_name>.setTouchModeAbove(SlidingMenu.TOUCHMODE_MARGIN);
<menu_name>.setShadowWidthRes(R.dimen.shadow_width);
<menu_name>.setShadowDrawable(R.drawable.shadowright);
<menu_name>.setBehindOffsetRes(R.dimen.slidingmenu_offset);
<menu_name>.setFadeDegree(0.35f);
<menu_name>.attachToActivity(this, SlidingMenu.SLIDING_WINDOW);
<menu_name>.setMenu(<layout_for_drawer>);
P.S you can get the dimens and drawables from his example activity.
Related
I have an android app that uses legacy TabHost, its deprecated but still works fine.
Requirement is to add a sliding Navigation Drawer to the TabHost. Menu in the Nav drawer will be a combination of tabs in the tabhost plus additional items.
Can anyone provide examples of how to integrate Navigation Drawer with TabHost?
thanks!
Section 3.2 in this article explains quite well how to implement the navigation drawer. In this example they set it up with a header and a RecyclerView, but you can really build it however you like.
I hope this helps
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
I'm trying to use Jeremy Feinstein's SlidingMenu in my application. Issue is I'm not using ActionBarSherlock and don't want to use it. I'm using Android's default ActionBar and quite happy with it. Now where to find the SlidingMenu implementation which is not dependent on ABS? I also don't have time to completely implement it on my own like the one used in Prixing app. Any Help, anybody?
EDIT:
I'm already using NavigationDrawer but want to animate ActionBar+MainContent with drawer animation like SlidingMenu does.
You don't need to implement Action Bar Sherlock For J. Feinstein's Sliding menu. Grab the code which is being used with ABS, the same code (you can remove ABS code from it if you're not using ABS) will work for native action bar.
I don't know how to really call this but I want to make menu drawer like in drawerlayout but when drawer is close there will be like drawer indicator a;ways float on the left side of screen like this
open
close
is there any way to do like this?
I found library https://github.com/NikolaDespotoski/DrawerLayoutEdgeToggle works well as i wish for.
For this you should be using the SlidingPaneLayout. Here are some examples:
http://www.javacodegeeks.com/2013/10/android-slidingpanelayout-tutorial.html
http://www.recursiverobot.com/post/59642335041/trying-slidingpanelayout-with-fragments-in-android
Because you are working with Fragments here you could tweak the layout so to keep the indicator in the layout.
Maybe SlidingMenu + ActionbarSherlock is a better choice.
Go for Sliding Menu using Drawer which best suites your functionality.
Also you can check the guide for Navigation Drawer in Android
Does anyone of you know of a sub navigation pattern in Android that uses a tabbed ActionBar navigation with pageable Fragments for its main navigation? (ViewPager)
I have looked at Spinners in the ActionBar which could work quite well if it wouldn't take ages to get the submenu rendered in the ActionBar while swiping from one tab to the next. (in the end you have jumping action items which look pretty ugly)
The other approach would include a segmented control widget which is known from the iOS platform. (like the TED application has it at the moment)
But what would be the Android way of doing it?
Why can't you try menu's for different tabs? I dont know whether it helps or not.Surf google for creating menus for each tab.