requestFeature() must be called before adding content error on super.onCreate

风格不统一 提交于 2019-12-03 04:23:56

Because android.support.v7.app.ActionBarActivity alters the window content by adding an ActionBar.
Please take a look at the code starting with

@Override
protected void onCreate(Bundle savedInstanceState) {
    mImpl = ActionBarActivityDelegate.createDelegate(this);
    super.onCreate(savedInstanceState);
    mImpl.onCreate(savedInstanceState);
}

and on at https://android.googlesource.com/platform/frameworks/support/+/master/v7/appcompat/src/android/support/v7/app/ActionBarActivity.java for details.
And what the FEATURE_INDETERMINATE_PROGRESS looks like depends on whether an ActionBar is present or not. So that needs to be set before the super call.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!