Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-16816

Android: Cannot refer default splash screen image (default.png) for image view

    Details

    • Type: Bug
    • Status: Open
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: Release 3.2.2
    • Fix Version/s: None
    • Component/s: Android
    • Environment:

      Titanium Studio & sdk - 3.2.0

      Description

      When trying to create an ImageView, you cannot use the splashscreen images (default.png) on Android. The usecase is a dynamic loading screen that is displayed while the app is starting up. This loading screen must have the splash image as the background so it looks like the default splash screen of the app.

      Neither the standard default.png nor the density-specific images can be referenced to use as background for the window or image parameter for an ImageView.

      The warning in the console is:
      [WARN] : TiDrawableReference: (pool-3-thread-1) [1889,1889] Could not open stream to get bitmap

      A workaround is to duplicate every default.png in every folder, and rename it to something else (default2.png or test.png for instance). Then it does find the resource.

      Testcase:

      var win = Ti.UI.createWindow({
      	backgroundColor : '#ffffff',
      	navBarHidden : true,
      	exitOnClose : true
      });
      var view = Ti.UI.createView({ backgroundColor: "#fdd" });
       
      var imgView = Ti.UI.createImageView({
      	image: '/images/default.png',
      	width: 150,
      	height: 150
      });
      view.add(imgView);
       
      win.add(view);
      win.open();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cbarber Chris Barber
                Reporter:
                tmil Thijs van Mil
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-18610
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Integration