当我运行我的应用程序时,我似乎间歇性地收到以下错误。
“Activity 泄露了最初添加在这里的窗口 com.android.internal.policy.impl.PhoneWindow$DecorView@40521348”
我所做的就是在我的 onCreate() 方法中创建我的对话框,如下所示:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//Create splash-screen object and pass in width and height (width and height are defined and valid, I just removed them from this post to make it more readable)
splash = new SplashScreen(MainActivity.this, width, height);
//Create dialog that will show splash-screen
loading_dialog = new Dialog(MainActivity.this,android.R.style.Theme_Black_NoTitleBar_Fullscreen);
//Set and display splash screen view
loading_dialog.setContentView(splash);
loading_dialog.show();
}
任何想法可能是什么问题?