<rim:splash src="file name" />
The <rim:splash> element specifies the image to display on the screen while the BlackBerry 10 device loads your application. This element is optional.
To target multiple screen sizes of BlackBerry 10, you can specify image files with different resolutions. At runtime, the BlackBerry 10 OS selects the appropriate image to display. Your splash screen image should fit the entire screen size so that it fills the screen. For information about BlackBerry 10 screen sizes, see the BlackBerry UI Guidelines.
The image for your splash screen can be any of the following file formats: .png, .jpg, .jpeg, .gif, or .bmp.
You must include the following namespace declaration in the parent <widget> element to use the <rim:splash> element:
Specify 0 or more <feature> elements withina <widget> element.
Example: Specifying splash screen images for multiple screen sizes
<widget xmlns:rim="http://www.blackberry.com/ns/widgets"> . . . <rim:splash src="splash-1024x600.png" /> <rim:splash src="splash-600x1024.png" /> <rim:splash src="splash-1280x768.png" /> <rim:splash src="splash-768x1280.png" /> <widget>
Using localized splash images
To use localized image files for the splash screen, the image files must be :
- Named the same as the non-localized image file that you specified in the <rim:splash> element.
- Stored in the appropriate locale subfolder that corresponds with the localized language.
When you use localized images, the files must be stored in individual locale folders (for example, "/locales/en-US", "/locales/fr") which are direct descendants of the root locales folder. The locales folder must be located in the root of your application folder so that the BlackBerry WebWorks Packager can build your application. The locale strings specified in the folder name must use the naming conventions that are specified in the Internet Engineering Task Force (IEFT) Best Current Practice (BCP) 47 specification. For example, you can use the Language-Region naming convention as in the following examples: en-US (United States English), de-DE (German for Germany), and fr-CA (Canadian French).
The file names for the localized images must be named exactly as the non-localized image files that you specified in the <rim:splash> element. You can store the non-localized images in subfolders but the locale folder must use the same subfolder structure for the localized images. When the BlackBerry 10 OS is set to one of the locales (for example, German or French) and localized images are present for that locale, the BlackBerry 10 OS selects the images from the respective locale subfolder. If no localized images are available for the specified locale, the BlackBerry 10 OS selects the non-localized icon image located in the root.
Example: Localized files and folder structure
In this example, if the French locale is specified on the device, even if the optimum resolution is 1024x600, the BlackBerry 10 OS uses the locales/fr/splash-1280x768.png file because it's the only landscape image available for this locale.
locales/de/splash-1024x600.png locales/de/splash-600x1024.png locales/de/splash-1280x768.png locales/de/splash-768x1280.png locales/fr/splash-1280x768.png locales/fr/splash-768x1280.png splash-1024x600.png splash-600x1024.png splash-1280x768.png splash-768x1280.png
Last modified: 2014-03-10