diff --git a/pythonforandroid/bootstraps/sdl2/build/src/org/kivy/android/PythonActivity.java b/pythonforandroid/bootstraps/sdl2/build/src/org/kivy/android/PythonActivity.java index 52905dcd15..4ad47cc478 100644 --- a/pythonforandroid/bootstraps/sdl2/build/src/org/kivy/android/PythonActivity.java +++ b/pythonforandroid/bootstraps/sdl2/build/src/org/kivy/android/PythonActivity.java @@ -331,6 +331,7 @@ public void run() { }); } + protected void showLoadingScreen() { // load the bitmap // 1. if the image is valid and we don't have layout yet, assign this bitmap @@ -338,6 +339,7 @@ protected void showLoadingScreen() { // 2. if we have a layout, just set it in the layout. // 3. If we have an mImageView already, then do nothing because it will have // already been made the content view or added to the layout. + if (mImageView == null) { int presplashId = this.resourceManager.getIdentifier("presplash", "drawable"); InputStream is = this.getResources().openRawResource(presplashId); @@ -357,13 +359,14 @@ protected void showLoadingScreen() { ViewGroup.LayoutParams.FILL_PARENT)); mImageView.setScaleType(ImageView.ScaleType.FIT_CENTER); - if (mLayout == null) { - setContentView(mImageView); - } else { - mLayout.addView(mImageView); - } - } } + if (mLayout == null) { + setContentView(mImageView); + } else if (PythonActivity.mImageView.getParent() == null){ + mLayout.addView(mImageView); + } + + } }