如何使用滑动菜单与动作条福尔摩斯? [英] How to use Sliding Menu with ActionBar Sherlock?
本文介绍了如何使用滑动菜单与动作条福尔摩斯?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图用一个滑动菜单在我现有的项目中,行动起来吧福尔摩斯被使用。但我无法做到这一点。如果你能给我一个简单的演示或教程,告诉我怎么做,这将是伟大?我们是否有使用片段的滑动菜单?
I am trying to use a sliding menu in my existing project where action bar Sherlock is used. But I am unable to do that. If you can give me a simple demo or tutorial to show me how to do so, that would be great? Do we have to use the fragments for the sliding menu?
更新:
如何更改活动当用户点击滑动菜单列表中的项目?
How do I change the Activity when the user clicks on an item of the Sliding Menu list?
有一个演示?请大家帮忙。
Is there a demo? please help.
推荐答案
做,因为它说,在<一个href="https://github.com/jfeinstein10/SlidingMenu">https://github.com/jfeinstein10/SlidingMenu
- 创建您的滑动布局。
-
在的onCreate:
- Create your sliding layout.
In onCreate:
setBehindContentView(R.layout.slide_menu);
getSlidingMenu().setShadowWidthRes(R.dimen.shadow_width);
getSlidingMenu().setShadowDrawable(R.drawable.shadow);
getSlidingMenu().setBehindOffsetRes(R.dimen.actionbar_home_width);
getSlidingMenu().setBehindScrollScale(0.25f);
而在活动:
And in the activity:
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
toggle();
return true;
}
return super.onOptionsItemSelected(item);
}
这篇关于如何使用滑动菜单与动作条福尔摩斯?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文