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() {
331
331
});
332
332
}
333
333
334
+
334
335
protected void showLoadingScreen () {
335
336
// load the bitmap
336
337
// 1. if the image is valid and we don't have layout yet, assign this bitmap
337
338
// as main view.
338
339
// 2. if we have a layout, just set it in the layout.
339
340
// 3. If we have an mImageView already, then do nothing because it will have
340
341
// already been made the content view or added to the layout.
342
+
341
343
if (mImageView == null ) {
342
344
int presplashId = this .resourceManager .getIdentifier ("presplash" , "drawable" );
343
345
InputStream is = this .getResources ().openRawResource (presplashId );
@@ -357,13 +359,14 @@ protected void showLoadingScreen() {
357
359
ViewGroup .LayoutParams .FILL_PARENT ));
358
360
mImageView .setScaleType (ImageView .ScaleType .FIT_CENTER );
359
361
360
- if (mLayout == null ) {
361
- setContentView (mImageView );
362
- } else {
363
- mLayout .addView (mImageView );
364
- }
365
- }
366
362
}
367
363
364
+ if (mLayout == null ) {
365
+ setContentView (mImageView );
366
+ } else if (PythonActivity .mImageView .getParent () == null ){
367
+ mLayout .addView (mImageView );
368
+ }
369
+
370
+ }
368
371
369
372
}
You can’t perform that action at this time.
0 commit comments