您的位置:首页 > 产品设计 > UI/UE

【遇见Android bug】requestFeature() must be called before adding content

2014-09-16 11:19 573 查看
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.sinvideo.videodemo/com.sinvideo.videodemo.VideoDemoActivity}: android.util.AndroidRuntimeException: requestFeature() must be called before adding content

Caused by: android.util.AndroidRuntimeException: requestFeature() must be called before adding content

这个问题是的提示已经非常明确了,不管是采用注解还是setContentView,

像requestWindowFeature(Window.FEATURE_NO_TITLE);这种设置需要在内容添加之前执行.

个人的理解是因为只有先对窗体进行设置之后,系统再来绘制view。这是一种合理的处理方式。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Android
相关文章推荐