如何在Android上制作Facebook的应用程序新菜单? [英] How to make Facebook's app new menu on Android?

查看:202
本文介绍了如何在Android上制作Facebook的应用程序新菜单?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

或者是其他类似 ViewPager



谢谢!

编辑



没有办法可以是两者之一( ViewPager SlidingDrawer )。它不是幻灯片的菜单,它是主屏幕移开,只留下一小部分在屏幕上。这就像是菜单已经在主屏幕后面,它刚刚被发现。第二,我们实际上仍然可以与主屏幕进行交互(否则我会假设他们拍摄了截图,以便剪切其中的一小部分来构成该视图)。

解决方案

我正在寻找实现相同的事情,我想出了一个足够好的解决方案(或者也许真的靠近他们所做的)。



所以我做了一个单一的FrameLayout,两个Layouts堆叠在一起,然后我只是动画的顶部布局滑动到屏幕右侧(只需要调用slideTo或scrollBy基本上是这样的!非常简单有效!



编辑:



我已经回答了一个类似的这里有一些代码示例,enjoy =):点击此处


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):

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).

解决方案

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

这篇关于如何在Android上制作Facebook的应用程序新菜单?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆