使用Slidingmenu爆出“Both setBehindContentView must be called in onCreate in addition to setContentView.”
来源:互联网 发布:咸宁软件开发 编辑:程序博客网 时间:2024/04/29 16:11
关于Android开发中引用slidingmenu库文件报:IllegalStateException: Both setBehindContentView must be called in onCreate in addition to setContentView.错误。
这个错误是在一启动,还没见到界面的时候,就爆出的错误。这是因为在代码中,缺少setBehindContentView(R.layout.menu_frame)。而这个函数主要就是用来决定侧边栏长什么样的。
public class BaseActivity extends SlidingFragmentActivity
而这又是因为我的Activity继承了SlidingFragmentActivity,这个特殊的Activity本身就带有侧边栏,因此必须在OnCreate函数那里就调用setBehindContentView()函数来设置侧边栏的样式。
这个错误是在一启动,还没见到界面的时候,就爆出的错误。这是因为在代码中,缺少setBehindContentView(R.layout.menu_frame)。而这个函数主要就是用来决定侧边栏长什么样的。
public class BaseActivity extends SlidingFragmentActivity
而这又是因为我的Activity继承了SlidingFragmentActivity,这个特殊的Activity本身就带有侧边栏,因此必须在OnCreate函数那里就调用setBehindContentView()函数来设置侧边栏的样式。
0 0
- 使用Slidingmenu爆出“Both setBehindContentView must be called in onCreate in addition to setContentView.”
- why vfree() must not be called in interrupt context?
- In order to be irreplaceable, one must always be different.
- I have a custom view that I want to be able to initialize both in-code and in nib.
- Herren Daunenjacke him in addition to
- viewDidAppear/viewWillAppear in UINavigationController not be called
- jre or jdk must be available in order to run javaw.exe in your current path
- reference to non-static member function must be called
- DateTimePicker 控件出现 "You must be in ShowCheckbox mode to set to this date" 的错误
- DateTimePicker 控件出现 "You must be in ShowCheckbox mode to set to this date" 的错误
- DateTimePicker 控件出现 "You must be in ShowCheckbox mode to set to this date" 的错误
- Why objc_msgSend Must be Written in Assembly
- must be in segment block c
- ValueError: fill value must be in categories.
- The 'quality' must be in the range 0.0f to 1.0f
- Magento: Recoverable Error: Argument 1 passed to Mage_Core_Model_Store :: setWebsite() must be an in
- Why doesn't setting clearTaskOnLaunch=“true” cause OnCreate to be called?
- commit() should not be called while in auto-commit mode
- Dialog的回退按钮的点击事件
- Spring开发环境配置以及入门案例
- 分布式一致性协议学习笔记(一)--Paxos
- Java开发平台下如何区分JDK,Tomcat,eclipse的32位与64版本
- C++ 语法 1. struct 内存的对齐原则
- 使用Slidingmenu爆出“Both setBehindContentView must be called in onCreate in addition to setContentView.”
- iOS Crash之NSFileHandleOperationException
- jquery 上下滑动flip演示
- 0718
- Hibernate总结(七)--之数据缓存
- SLAM 数据集
- SqlServer Convert函数 日期格式化
- LeetCode 258. Add Digits两种方法
- 一个文件域实现多文件的上传<一>