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
Related
I am making an app. I need to implement a drawer layout. I had done that part but now i have to slide action bar while opening drawer layout like face Book. Please give me some solution.
please help me.
you can use external library for sliding menu. Here it is like for library and source example
https://github.com/jfeinstein10/SlidingMenu
Hope you like it
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'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