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.
Related
I use this library to implement slide menu in my app. It works that it push my activity content to left side. I want to Sliding Menu appear OVER my activity content. Is there any way to change appearing of this sliding menu?
Yes you can do it. Instead of that library you have to use Navigation Drawer.
For supporting from android 2.1 you have to use Support Library.
NavigationDrawer using only Android Support Library
https://developer.android.com/design/patterns/navigation-drawer.html
https://developer.android.com/training/implementing-navigation/nav-drawer.html
As you said, Jfeinstein Sliding Menu uses iOS style and push content to the left (with ActionBar)
The recommended way is using Android-styled component: Navigation Drawer. It appears over content and below ActionBar.
https://developer.android.com/training/implementing-navigation/nav-drawer.html
it's only your choise, but in my mind using android recommended way is prefer
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.
I'm trying to implement a sliding menu without using the sliding drawer element deprecated. I see a lot of examples but all of them use sliding drawer or haven't complete code. Can you post some example or library to solve my problem?
Use this one
https://github.com/jfeinstein10/SlidingMenu
Easy to implement, just add java code of example and create your menu.xml
You can check out Navigation Drawer
I just want to create an action bar as foursquare app.
and i want to show a slide out menu when the home button pressed just like the image shown.
I am able to create the custom action bar but not like the first image. Please provide any tutorial which will help to create the Action bar
You may use the version included in the Google Android SDK (instead of an 3rd party lib.)
Read about Navigation Drawer for more details.
SlidingMenu is a great and easy-to-use library for this.
edit: Sorry, thought the question was only about the slide-in menu.
For actionbar, your best library will be ActionbarSherlock
I'm making a view and an activity extending SherlockMapActivity and using SlidingMenu libraries to make my main view to scroll like Google+ does.
I've added the SlidingMenu by XML and my view scrolls perfectly showing the hidden menu but it only scrolls the view below the action bar. In Google+ app it also scrolls the action bar and I've seen there's a function for making my action bar sliding enabled but it does not work.
What would be the best way to make my action bar sliding with the full view?
Maybe I'm not extending the correct class?
This is how I add the SlidingMenu to my app:
XML File:
<com.slidingmenu.lib.SlidingMenu
xmlns:sliding="http://schemas.android.com/apk/res-auto"
android:id="#+id/slidingmenulayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
sliding:viewAbove="#layout/activity_main"
sliding:viewBehind="#layout/menu_desplegado"
sliding:behindOffset="120dip"
sliding:behindScrollScale="0.25"
/>
And this is the result:
I've solved my problem.
In order to make my Action Bar to Slide, I had to modify the SlidingMenu this way:
Checkout a clean copy of ActionBarSherlock and import into your Eclipse workspace.
Add ActionBarSherlock as a dependency to SlidingMenu.
Go into the SlidingActivities that you plan on using make them extend Sherlock__Activity instead of __Activity.
Then I extended my MainActivity from SlidingMapActivity and it worked perfectly.
Okay I think I found your answer. Try checking out this project on github:
https://github.com/jfeinstein10/SlidingMenu
Here is a video of it in action:
http://www.youtube.com/watch?v=8vNaANLHw-c&feature=youtu.be
In my case, I prefer to add this slideMenu in code.
Well, when you create this SlideMenu:
menu = new SlidingMenu(this);
menu.setMode(SlidingMenu.LEFT);
then set this line too:
menu.attachToActivity(this, SlidingMenu.SLIDING_WINDOW);
This makes the magic!.
Here is a complete project developed by me for easy sliding menu developer
http://github.com/leonardosalles/shipp-sliding-menu