福尔摩斯操作栏与滑动菜单 [英] Sherlock Action Bar with Sliding menu

查看:219
本文介绍了福尔摩斯操作栏与滑动菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在做一个视图和活动延伸SherlockMapActivity和使用SlidingMenu库,使我的主要观点,以滚动如Google一样。 我已经添加了SlidingMenu通过XML和我的看法完全滚动显示隐藏的菜单,但它只是在下面滚动操作栏的视图。在Google+应用也滚动操作栏,我已经看到有一个功能,使我的动作栏滑动启用,但它不能正常工作。

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?

这是我怎么添加SlidingMenu到我的应用程序:

This is how I add the SlidingMenu to my app:

XML文件:

<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"
 />

这是结果:

推荐答案

我已经解决了我的问题。

I've solved my problem.

为了使我的动作条幻灯片,我不得不修改SlidingMenu是这样的:

In order to make my Action Bar to Slide, I had to modify the SlidingMenu this way:

  1. 在结帐ActionBarSherlock的全新副本,并导入到Eclipse工作空间。
  2. 添加ActionBarSherlock作为一个依赖于SlidingMenu。
  3. 走进你计划使用让他们延长,而不是__Activity Sherlock__Activity的SlidingActivities。

然后我伸出我的MainActivity从SlidingMapActivity它完美地工作。

Then I extended my MainActivity from SlidingMapActivity and it worked perfectly.

这篇关于福尔摩斯操作栏与滑动菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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