I tried to implement sliding menu in my application. What i want is that there is a button on the top right corner of the screen. And sliding menu should come up from right to left which is reverse slide of facebook styled sliding. In Jfeinstein Sliding Menu, Sliding menu come out from left to right. I tried to implement the source to make it happen from right to left. But unfortunately, I still can't get it. Any ideas would be appreciate.
There is a branch called "sliding right" in Jfeinstein Sliding Menu on github.
This is a demo project to explore how to implement a sliding menu like Facebook and others use.
android-sliding-menu-demo
android-fb-like-slideout-navigation
I made a video (3 parts) on youtube on how to make a sliding menu like the on you are looking for. I show you how to set up the project and get everything linked up.
http://www.youtube.com/watch?v=tJJMyzdB9uI
The cool thing about ECSlidingViewController (Its the one I use) is that just about everything you want to configure (how far a view slides, the animations, left or right side) is done with a single line of code. When setting it up, I tell you where you can change it to be left or right side.
Hope this helps.
Related
I want to implement sliding Menu like below images ,I am using SlidingPaneLayout to create Left Sliding Menu but How i can make it to behave like below images.
Now when some one close it by Either top left icons click or by drag to left it should be close like below shown image.
This image are just for giving idea of what i am try to do in my sliding Menu .
Let me known that some known how to achieve such in android.
I'm using the slide menu library and setting the menu offset from a xml.
setBehindOffsetRes(R.dimen.slidingmenu_offset);
when I click the menu item I use
menu.toggle(true);
which moves the content to left with menu behind it. My scenario is when I click the menu item, the content has to move all the way to right and then should bring the content in like the normal way so that the user dont get to see the UI change. I used
setBehindOffsetRes(R.dimen.slidingmenu_fullscreen);
showMenu(true);
where R.dimen.slidingmenu_fullscreen = 0dp. The menu goes to full screen behind the content, but the content doesn't moves to the right. Thanks in advance!
Edit 1: This is similar to Xoom application... Sample "Slide Sample"
I would recommend using ActionBarSherlock. Use this tutorial for sliding menu, It is much easier to use, and you will find much more help with it. It is also more compatible with different screen sizes, and more Android versions.
Finally I figured it myself.
menu.mViewAbove.scrollTo(menu.mViewAbove.getScrollX()-200,0);
moved the content to right. But now got into another problem. which I have descibed here->
https://stackoverflow.com/questions/19714871/sliding-menu-move-content-to-right
Hey i found very nice lib here which helps in implementing the sliding in android. The problem is, using this lib i am able to achive toggling at one side at a time i.e either on left or right.
I want to implement toggling on both sides i.e if i click on left side button i want left view to appear and similarly right view should appear if i click on right button.
I also got one branch from the same author i,e here. In this we have the option to specify at toggle weather to go left or right.
We need to merge these together and use it. but i'm confused like which function to pick even though both have same names & should i overwrite or not?. really confused what to do. any help??
The second one is an older version of the library, you can still specify which sliding mode you want in the current version like this:
SlidingMenu menu = new SlidingMenu(this);
menu.setMode(SlidingMenu.LEFT);
This will set it to a left sliding menu, you can however also specify SlidingMenu.RIGHT for right or SlidingMenu.LEFT_RIGHT for both.
So just use the current version.
I used maddeye slide menu library to implement a Facebook like slide bar. It works fine, sliding from right to left.
Now what I want is to slide from left to right as the new Facebook app in Android.
What modification should I use to make this change? Does anyone know how to slide both sides as the new Facebook app?
I would try the android-menudrawer project at https://github.com/SimonVT/android-menudrawer which just hit 1.0.0 thanks to Jake Wharton.
I tried it out yesterday and it looks like it fits your needs.
If you build and install the sample APK, you'll see an example called "Right menu" which is what I think you're looking for. The other examples are variations of the normal sliding menu.
Here are screenshots of this sample APK (MenuDrawerSamples) in action. The first screenshot shows the Right Menu example with the menu drawer closed. Tap on the overflow menu item in the upper right corner and then it reveals the menu, as shown in the second screenshot. You could trigger it instead from another action bar button or other button if desired.
I've been looking for examples on how to animate two views (or fragments) left and right as is done in the Android Google+ app. I have not been successful.
I would like to be able to slide in - left to right - a fragment over another one, at command, and as a reaction to the user swiping the screen. The animation should follow the user's finger across the screen, allowing them to pause in the middle of the animation etc.
Does anyone know where to start on this sort of layout animation? Tips on how Google+ does it? I'd like any information we can dig up! I've been quite unsuccessful =\
This is the best resource about the side menu, there is no code but a clear explanation on how to implement it:
Fly-in app menu
and this is a post on how to animate the action bar related to the side menu:
Slide action bar
Hope it will help.
Here is an implementation of the effect by Simon based on Cyril Mottier's Fly-in app menu. - Menu Drawer