forked from apache/cordova-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
193 changed files
with
24,593 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,190 @@ | ||
{ | ||
"language": "English", | ||
"merge": { | ||
"accelerometer.md": [ | ||
"cordova/accelerometer/accelerometer.md", | ||
"cordova/accelerometer/accelerometer.getCurrentAcceleration.md", | ||
"cordova/accelerometer/accelerometer.watchAcceleration.md", | ||
"cordova/accelerometer/accelerometer.clearWatch.md", | ||
"cordova/accelerometer/acceleration/acceleration.md", | ||
"cordova/accelerometer/parameters/accelerometerSuccess.md", | ||
"cordova/accelerometer/parameters/accelerometerError.md", | ||
"cordova/accelerometer/parameters/accelerometerOptions.md" | ||
], | ||
"camera.md": [ | ||
"cordova/camera/camera.md", | ||
"cordova/camera/camera.getPicture.md", | ||
"cordova/camera/parameter/cameraSuccess.md", | ||
"cordova/camera/parameter/cameraError.md", | ||
"cordova/camera/parameter/cameraOptions.md", | ||
"cordova/camera/parameter/CameraPopoverOptions.md", | ||
"cordova/camera/parameter/CameraPopoverHandle.md" | ||
], | ||
"capture.md": [ | ||
"cordova/media/capture/capture.md", | ||
"cordova/media/capture/captureAudio.md", | ||
"cordova/media/capture/captureAudioOptions.md", | ||
"cordova/media/capture/captureImage.md", | ||
"cordova/media/capture/captureImageOptions.md", | ||
"cordova/media/capture/captureVideo.md", | ||
"cordova/media/capture/captureVideoOptions.md", | ||
"cordova/media/capture/CaptureError.md", | ||
"cordova/media/capture/CaptureCB.md", | ||
"cordova/media/capture/CaptureErrorCB.md", | ||
"cordova/media/capture/ConfigurationData.md", | ||
"cordova/media/capture/MediaFile.md", | ||
"cordova/media/capture/MediaFile.getFormatData.md", | ||
"cordova/media/capture/MediaFileData.md" | ||
], | ||
"compass.md": [ | ||
"cordova/compass/compass.md", | ||
"cordova/compass/compass.getCurrentHeading.md", | ||
"cordova/compass/compass.watchHeading.md", | ||
"cordova/compass/compass.clearWatch.md", | ||
"cordova/compass/compass.watchHeadingFilter.md", | ||
"cordova/compass/compass.clearWatchFilter.md", | ||
"cordova/compass/parameters/compassSuccess.md", | ||
"cordova/compass/parameters/compassError.md", | ||
"cordova/compass/parameters/compassOptions.md", | ||
"cordova/compass/parameters/compassHeading.md", | ||
"cordova/compass/compassError/compassError.md" | ||
], | ||
"contacts.md": [ | ||
"cordova/contacts/contacts.md", | ||
"cordova/contacts/contacts.create.md", | ||
"cordova/contacts/contacts.find.md", | ||
"cordova/contacts/Contact/contact.md", | ||
"cordova/contacts/ContactAddress/contactaddress.md", | ||
"cordova/contacts/ContactField/contactfield.md", | ||
"cordova/contacts/ContactFindOptions/contactfindoptions.md", | ||
"cordova/contacts/ContactName/contactname.md", | ||
"cordova/contacts/ContactOrganization/contactorganization.md", | ||
"cordova/contacts/ContactError/contactError.md", | ||
"cordova/contacts/parameters/contactSuccess.md", | ||
"cordova/contacts/parameters/contactError.md", | ||
"cordova/contacts/parameters/contactFields.md", | ||
"cordova/contacts/parameters/contactFindOptions.md" | ||
], | ||
"device.md": [ | ||
"cordova/device/device.md", | ||
"cordova/device/device.model.md", | ||
"cordova/device/device.cordova.md", | ||
"cordova/device/device.platform.md", | ||
"cordova/device/device.uuid.md", | ||
"cordova/device/device.version.md", | ||
"cordova/device/device.name.md" | ||
], | ||
"events.md": [ | ||
"cordova/events/events.md", | ||
"cordova/events/events.deviceready.md", | ||
"cordova/events/events.pause.md", | ||
"cordova/events/events.resume.md", | ||
"cordova/events/events.online.md", | ||
"cordova/events/events.offline.md", | ||
"cordova/events/events.backbutton.md", | ||
"cordova/events/events.batterycritical.md", | ||
"cordova/events/events.batterylow.md", | ||
"cordova/events/events.batterystatus.md", | ||
"cordova/events/events.menubutton.md", | ||
"cordova/events/events.searchbutton.md", | ||
"cordova/events/events.startcallbutton.md", | ||
"cordova/events/events.endcallbutton.md", | ||
"cordova/events/events.volumedownbutton.md", | ||
"cordova/events/events.volumeupbutton.md" | ||
], | ||
"file.md": [ | ||
"cordova/file/file.md", | ||
"cordova/file/fileobj/fileobj.md", | ||
"cordova/file/filereader/filereader.md", | ||
"cordova/file/filewriter/filewriter.md", | ||
"cordova/file/filesystem/filesystem.md", | ||
"cordova/file/fileentry/fileentry.md", | ||
"cordova/file/directoryentry/directoryentry.md", | ||
"cordova/file/directoryreader/directoryreader.md", | ||
"cordova/file/filetransfer/filetransfer.md", | ||
"cordova/file/fileuploadoptions/fileuploadoptions.md", | ||
"cordova/file/fileuploadresult/fileuploadresult.md", | ||
"cordova/file/flags/flags.md", | ||
"cordova/file/localfilesystem/localfilesystem.md", | ||
"cordova/file/metadata/metadata.md", | ||
"cordova/file/fileerror/fileerror.md", | ||
"cordova/file/filetransfererror/filetransfererror.md" | ||
], | ||
"geolocation.md": [ | ||
"cordova/geolocation/geolocation.md", | ||
"cordova/geolocation/geolocation.getCurrentPosition.md", | ||
"cordova/geolocation/geolocation.watchPosition.md", | ||
"cordova/geolocation/geolocation.clearWatch.md", | ||
"cordova/geolocation/Coordinates/coordinates.md", | ||
"cordova/geolocation/Position/position.md", | ||
"cordova/geolocation/PositionError/positionError.md", | ||
"cordova/geolocation/parameters/geolocationSuccess.md", | ||
"cordova/geolocation/parameters/geolocationError.md", | ||
"cordova/geolocation/parameters/geolocation.options.md" | ||
], | ||
"globalization.md": [ | ||
"cordova/globalization/globalization.md", | ||
"cordova/globalization/globalization.getPreferredLanguage.md", | ||
"cordova/globalization/globalization.getLocaleName.md", | ||
"cordova/globalization/globalization.dateToString.md", | ||
"cordova/globalization/globalization.stringToDate.md", | ||
"cordova/globalization/globalization.getDatePattern.md", | ||
"cordova/globalization/globalization.getDateNames.md", | ||
"cordova/globalization/globalization.isDayLightSavingsTime.md", | ||
"cordova/globalization/globalization.getFirstDayOfWeek.md", | ||
"cordova/globalization/globalization.numberToString.md", | ||
"cordova/globalization/globalization.stringToNumber.md", | ||
"cordova/globalization/globalization.getNumberPattern.md", | ||
"cordova/globalization/globalization.getCurrencyPattern.md", | ||
"cordova/globalization/GlobalizationError/globalizationerror.md" | ||
], | ||
"media.md": [ | ||
"cordova/media/media.md", | ||
"cordova/media/media.getCurrentPosition.md", | ||
"cordova/media/media.getDuration.md", | ||
"cordova/media/media.pause.md", | ||
"cordova/media/media.play.md", | ||
"cordova/media/media.release.md", | ||
"cordova/media/media.seekTo.md", | ||
"cordova/media/media.setVolume.md", | ||
"cordova/media/media.startRecord.md", | ||
"cordova/media/media.stop.md", | ||
"cordova/media/media.stopRecord.md", | ||
"cordova/media/MediaError/mediaError.md", | ||
"cordova/media/Parameters/mediaError.md" | ||
], | ||
"network.md": [ | ||
"cordova/network/network.md", | ||
"cordova/network/network.isReachable.md", | ||
"cordova/network/NetworkStatus/NetworkStatus.md", | ||
"cordova/network/parameters/reachableCallback.md", | ||
"cordova/network/parameters/reachableHostname.md", | ||
"cordova/network/parameters/reachableOptions.md" | ||
], | ||
"connection.md": [ | ||
"cordova/connection/connection.md", | ||
"cordova/connection/connection.type.md" | ||
], | ||
"notification.md": [ | ||
"cordova/notification/notification.md", | ||
"cordova/notification/notification.alert.md", | ||
"cordova/notification/notification.confirm.md", | ||
"cordova/notification/notification.prompt.md", | ||
"cordova/notification/notification.beep.md", | ||
"cordova/notification/notification.vibrate.md" | ||
], | ||
"splashscreen.md": [ | ||
"cordova/splashscreen/splashscreen.md", | ||
"cordova/splashscreen/splashscreen.show.md", | ||
"cordova/splashscreen/splashscreen.hide.md" | ||
], | ||
"storage.md": [ | ||
"cordova/storage/storage.md" | ||
], | ||
"inappbrowser.md": [ | ||
"cordova/inappbrowser/inappbrowser.md", | ||
"cordova/inappbrowser/window.open.md" | ||
] | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,198 @@ | ||
--- | ||
license: Licensed to the Apache Software Foundation (ASF) under one | ||
or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership. The ASF licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on an | ||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
--- | ||
|
||
# Icons and Splash Screens | ||
|
||
This section shows how to configure an app's icon and optional splash | ||
screen for various platforms, both when working in the Cordova CLI | ||
(described in The Command-Line Interface) or using platform-specific | ||
SDK tools (detailed in the Platform Guides). | ||
|
||
## Configuring Icons in the CLI | ||
|
||
When working in the CLI, icon source files are located within various | ||
platform-specific subdirectories within the project's `www/res/icons` | ||
directory. Newly created projects come with a default set of Cordova | ||
icons for you to replace for the platforms you wish to target. | ||
|
||
Android specifies icons for low, medium, high, and extra-high resolutions: | ||
|
||
android/icon-36-ldpi.png | ||
android/icon-48-mdpi.png | ||
android/icon-72-hdpi.png | ||
android/icon-96-xhdpi.png | ||
|
||
The iOS platform specifies 72-pixel-square icons for iPads, and | ||
57-pixel icons for iPhones and iPods, with high-resolution _2x_ | ||
variants for retina displays: | ||
|
||
ios/icon-57-2x.png | ||
ios/icon-57.png | ||
ios/icon-72-2x.png | ||
ios/icon-72.png | ||
|
||
Windows Phone specifies a default 48-pixel icon, along with various | ||
devices' background tiling images used when representing applications: | ||
|
||
windows-phone/icon-48.png | ||
windows-phone/icon-62-tile.png | ||
windows-phone/icon-173-tile.png | ||
|
||
Blackberry requires an 80-pixel icon: | ||
|
||
blackberry/icon-80.png | ||
|
||
Tizen requires an 128-pixel icon: | ||
|
||
tizen/icon-128.png | ||
|
||
## Configuring Splash Screens in the CLI | ||
|
||
Use the Splashscreen API to enable display of an app's introductory | ||
splash screen on many platforms. When working in the CLI, splash | ||
screen source files are located within the project's `www/res/screens` | ||
subdirectory. | ||
|
||
Android specifies both portrait- and landscape-oriented splash screen | ||
images for low, medium, high, and extra-high resolutions: | ||
|
||
android/screen-hdpi-landscape.png | ||
android/screen-hdpi-portrait.png | ||
android/screen-ldpi-landscape.png | ||
android/screen-ldpi-portrait.png | ||
android/screen-mdpi-landscape.png | ||
android/screen-mdpi-portrait.png | ||
android/screen-xhdpi-landscape.png | ||
android/screen-xhdpi-portrait.png | ||
|
||
The iOS platform specifies variants for iPhone/iPod and iPad, with | ||
variants for retina displays and different orientations. The _568h_ | ||
file applies to the iPhone 5's taller screen: | ||
|
||
ios/screen-ipad-landscape-2x.png | ||
ios/screen-ipad-landscape.png | ||
ios/screen-ipad-portrait-2x.png | ||
ios/screen-ipad-portrait.png | ||
ios/screen-iphone-landscape-2x.png | ||
ios/screen-iphone-landscape.png | ||
ios/screen-iphone-portrait-2x.png | ||
ios/screen-iphone-portrait.png | ||
ios/screen-iphone-portrait-568h-2x.png | ||
|
||
BlackBerry and Windows Phone both specify a single splash screen | ||
image: | ||
|
||
blackberry/screen-225.png | ||
windows-phone/screen-portrait.jpg | ||
|
||
The following sections detail how to set up splash screens when | ||
working with SDKs and related command-line tools described in Platform | ||
Guides. | ||
|
||
Don't forget to install the SplashScreen plugin before trying to use the | ||
`navigator.splashscreen.hide()` or `navigator.splashscreen.show()` methods. | ||
|
||
## Splash Screens for the Android Platform | ||
|
||
Place [9-patch image](https://developer.android.com/tools/help/draw9patch.html) | ||
files in the Android project's `platforms/android/res/drawable*` directories. | ||
|
||
The size for each should be: | ||
|
||
- xlarge (xhdpi): at least 960 × 720 | ||
- large (hdpi): at least 640 × 480 | ||
- medium (mdpi): at least 470 × 320 | ||
- small (ldpi): at least 426 × 320 | ||
|
||
If you want to use | ||
the default splash screen images provided in Cordova, you'll need to copy the | ||
png files from `platforms/android/www/res/screen/android` to | ||
`platforms/android/res/drawable*/`: | ||
|
||
cd platforms/android/res | ||
mkdir drawable-port-ldpi | ||
cp -p ../assets/www/res/screen/android/screen-ldpi-portrait.png drawable-port-ldpi/screen.png | ||
mkdir drawable-land-ldpi | ||
cp -p ../assets/www/res/screen/android/screen-ldpi-landscape.png drawable-land-ldpi/screen.png | ||
mkdir drawable-port-mdpi | ||
cp -p ../assets/www/res/screen/android/screen-mdpi-portrait.png drawable-port-mdpi/screen.png | ||
mkdir drawable-land-mdpi | ||
cp -p ../assets/www/res/screen/android/screen-mdpi-landscape.png drawable-land-mdpi/screen.png | ||
mkdir drawable-port-hdpi | ||
cp -p ../assets/www/res/screen/android/screen-hdpi-portrait.png drawable-port-hdpi/screen.png | ||
mkdir drawable-land-hdpi | ||
cp -p ../assets/www/res/screen/android/screen-hdpi-landscape.png drawable-land-hdpi/screen.png | ||
mkdir drawable-port-xhdpi | ||
cp -p ../assets/www/res/screen/android/screen-xhdpi-portrait.png drawable-port-xhdpi/screen.png | ||
mkdir drawable-land-xhdpi | ||
cp -p ../assets/www/res/screen/android/screen-xhdpi-landscape.png drawable-land-xhdpi/screen.png | ||
|
||
The `drawable` directory names must follow the Android conventions for | ||
supporting | ||
[screen sizes](http://developer.android.com/guide/practices/screens_support.html) and | ||
[alternate resources](http://developer.android.com/guide/topics/resources/providing-resources.html#AlternativeResources). | ||
|
||
In `config.xml` in the project's `www` directory, add the following preferences: | ||
|
||
<preference name="SplashScreen" value="splash" /> | ||
<preference name="SplashScreenDelay" value="10000" /> | ||
|
||
The first line sets the image to display as the splash screen. This is the | ||
file name of the png in the `drawable*` directories. If you | ||
name the image anything other than `splash.png`, you need to modify | ||
this line. Do not include the filename extension (i.e., `.png`). | ||
If you want to use the default splash screens provided in | ||
Cordova as listed above, use the value `screen`. | ||
|
||
The second line sets the default delay of how long the splashscreen appears in | ||
milliseconds. This should be the maximum expected start time. | ||
The default value for SplashScreenDelay is 3000 ms. | ||
|
||
Finally, the splash screen should be present only as long as necessary. When | ||
your app has started and the webview has loaded, your app should hide the | ||
splash screen so that your main view is visible. Because the app start time | ||
will vary quite a bit due to a number of factors, it is recommended that your | ||
app explicitly invoke `navigator.splashscreen.hide()` in the Javascript | ||
method that responds to the `deviceready` event. Otherwise the splash screen | ||
will be visible for the SplashScreenDelay value that you configured above. | ||
This event-driven approach is highly recommended versus having the splash | ||
screen visible for always a fixed duration. | ||
|
||
## Splash Screens for the iOS Platform | ||
|
||
Copy splash screen images into the iOS project's `Resources/splash` | ||
directory. Only add those images for the devices you want to support, | ||
such as iPad or iPhone. The size of each image should be: | ||
|
||
- Default-568h@2x~iphone.png (640x1136 pixels) | ||
- Default-Landscape@2x~ipad.png (2048x1496 pixels) | ||
- Default-Landscape~ipad.png (1024x748 pixels) | ||
- Default-Portrait@2x~ipad.png (1536x2008 pixels) | ||
- Default-Portrait~ipad.png (768x1004 pixels) | ||
- Default@2x~iphone.png (640x960 pixels) | ||
- Default~iphone.png (320x480 pixels) | ||
|
||
## Splash Screens for the BlackBerry 10 Platform | ||
|
||
Copy splash screen images into the project's `res/screen/blackberry10` | ||
directory. The file names should be: | ||
|
||
- splash-1280x768.png (1280x768 pixels) | ||
- splash-720x720.png (720x720 pixels) | ||
- splash-768x1280.png (768x1280 pixels) |
Oops, something went wrong.