File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
pythonforandroid/bootstraps/sdl2/build/src/org/kivy/android Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -331,13 +331,15 @@ public void run() {
331331 });
332332 }
333333
334+
334335 protected void showLoadingScreen () {
335336 // load the bitmap
336337 // 1. if the image is valid and we don't have layout yet, assign this bitmap
337338 // as main view.
338339 // 2. if we have a layout, just set it in the layout.
339340 // 3. If we have an mImageView already, then do nothing because it will have
340341 // already been made the content view or added to the layout.
342+
341343 if (mImageView == null ) {
342344 int presplashId = this .resourceManager .getIdentifier ("presplash" , "drawable" );
343345 InputStream is = this .getResources ().openRawResource (presplashId );
@@ -357,13 +359,14 @@ protected void showLoadingScreen() {
357359 ViewGroup .LayoutParams .FILL_PARENT ));
358360 mImageView .setScaleType (ImageView .ScaleType .FIT_CENTER );
359361
360- if (mLayout == null ) {
361- setContentView (mImageView );
362- } else {
363- mLayout .addView (mImageView );
364- }
365- }
366362 }
367363
364+ if (mLayout == null ) {
365+ setContentView (mImageView );
366+ } else if (PythonActivity .mImageView .getParent () == null ){
367+ mLayout .addView (mImageView );
368+ }
369+
370+ }
368371
369372}
You can’t perform that action at this time.
0 commit comments