How to make Facebook's app new menu on Android? [duplicate]
Asked Answered
S

3

38

Possible Duplicate:
Android facebook style slide

Recently Facebook released a new version of its Android application that features an improved navigation. One main new feature is the new menu (that already existed on the iOS version):

enter image description here

By clicking on the home button of the Action Bar, this menu slides from left to right, hiding the main activity that is no longer accessible.

How do you think this menu has been made? Do you think they have just played with the SlidingDrawer or is it something else like a ViewPager?

Thanks!

EDIT

There is no way that it could be one of the two (ViewPager or SlidingDrawer). It's not the menu that slides in, it's the main screen that moves away leaving only a tiny part of it on the screen. It's like if the menu was already behind that main screen and that it just got uncovered. And second thing, we can actually still interact with that main screen (otherwise I would have assumed that they took a screenshot in order to cut a tiny part of it to compose that view).

Sphacelus answered 8/12, 2011 at 8:53 Comment(2)
Why don't you reverse engineer the app? Using apktool? This might be helpful tooLapel
@Lapel Good idea. I have never done that before, but that might be a good occasion to do this. I'll share my discoveries here once I find out more about this.Sphacelus
M
3

I was looking for implementing the same thing and I came up with a solution that is good enough (or maybe is really near what they have done).

So what I did was a single FrameLayout with both of the Layouts stacked together and then I just animate the top layout to slide to the right of the screen (just need to call the slideTo or scrollBy. And basically it's that! Quite simple and effective!

EDIT:

I've answered to a similar question here with some code samples, enjoy =): Click here

Mentor answered 11/12, 2011 at 1:50 Comment(1)
You can check my other answer.Mentor
M
4

Almost everything except the photo taking parts is inside a WebView in the new FB app. I could not find any native Android UI controls in the stream or the lists.

Making the same effect using Javascript/HTML/CSS should be quite easy I feel.

Decompiling the apk would give a better idea.

Mcclintock answered 8/12, 2011 at 14:32 Comment(0)
M
3

I was looking for implementing the same thing and I came up with a solution that is good enough (or maybe is really near what they have done).

So what I did was a single FrameLayout with both of the Layouts stacked together and then I just animate the top layout to slide to the right of the screen (just need to call the slideTo or scrollBy. And basically it's that! Quite simple and effective!

EDIT:

I've answered to a similar question here with some code samples, enjoy =): Click here

Mentor answered 11/12, 2011 at 1:50 Comment(1)
You can check my other answer.Mentor
H
2

You can build this application style using javascript, HTML5 and CSS3 like it shows this little library "jbackbone-mobile", https://github.com/mjromper/jbackbone-mobile

and see this demo from any browser (device or desktop) http://lab.ochio.com.es/jbackbone/index.html

Hazlett answered 9/5, 2012 at 14:9 Comment(3)
Thanks for the link. I have also developed a double side navbar for a project (like Path on iOS: one on the right and on the left) using the native SDK. I'll wrap it as a reusable library soon.Sphacelus
It's an Android question, not html.Hakenkreuz
This is about android not htmlCanary

© 2022 - 2024 — McMap. All rights reserved.