android.util.AndroidRuntimeException: requestFeature() must be called before adding content
2015-08-18 17:22
537 查看
原来没有这个问题,后来才出现这个问题。
在一步步回退代码发现,是dialog.setContentView()导致的。
然后观察:
requestFeature() must be called before adding content
发现需要把add content的操作放在requestFeature之前,仔细观察代码发现,也就dialog.show()能起到这个作用。
然后修改代码 dialog.show()之后再调用dialog.setContentView(),问题就解决了。
在一步步回退代码发现,是dialog.setContentView()导致的。
然后观察:
requestFeature() must be called before adding content
发现需要把add content的操作放在requestFeature之前,仔细观察代码发现,也就dialog.show()能起到这个作用。
然后修改代码 dialog.show()之后再调用dialog.setContentView(),问题就解决了。
相关文章推荐
- ZOJ 2319 Beatuiful People(单调递增序列的变形)
- UINavigationController
- 初始UI(UILabel、UIButton、UITextField)
- HDU 5400 Arithmetic Sequence
- HDU 5400 Arithmetic Sequence(数学)——多校练习9
- 多校第九场 1005 hdu 5400 Arithmetic Sequence ( dp)
- 40.UITableViewController和刷新
- Ubiquitous Religions(POJ_2524)
- 为 UIImageView 添加Tap手势
- 使用 Fluent API 配置/映射属性和类型
- Arithmetic Sequence
- 取消延迟执行函数 cancelPreviousPerformRequestsWithTarget
- Junit入门学习(2)---------------TestSuite使用
- UIViewController 推出另外一个半透明的UIViewController
- UIScrollView循环滚动图片
- 黑马程序员_GUI
- GPUImage 滤镜头文件
- UIWindow介绍
- OC UIAlertView简化使用
- iOS-UIDynamic-UIKit