Touchgui/plugins/org.apache.cordova.splashscreen/doc/zh/index.md

changeset 0
e8ccd40d0ef6
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/doc/zh/index.md	Thu Jun 04 14:50:33 2015 +0200
     1.3 @@ -0,0 +1,74 @@
     1.4 +<!---
     1.5 +    Licensed to the Apache Software Foundation (ASF) under one
     1.6 +    or more contributor license agreements.  See the NOTICE file
     1.7 +    distributed with this work for additional information
     1.8 +    regarding copyright ownership.  The ASF licenses this file
     1.9 +    to you under the Apache License, Version 2.0 (the
    1.10 +    "License"); you may not use this file except in compliance
    1.11 +    with the License.  You may obtain a copy of the License at
    1.12 +
    1.13 +      http://www.apache.org/licenses/LICENSE-2.0
    1.14 +
    1.15 +    Unless required by applicable law or agreed to in writing,
    1.16 +    software distributed under the License is distributed on an
    1.17 +    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    1.18 +    KIND, either express or implied.  See the License for the
    1.19 +    specific language governing permissions and limitations
    1.20 +    under the License.
    1.21 +-->
    1.22 +
    1.23 +# org.apache.cordova.splashscreen
    1.24 +
    1.25 +這個外掛程式顯示和隱藏在應用程式啟動期間的初始螢幕。
    1.26 +
    1.27 +## 安裝
    1.28 +
    1.29 +    cordova plugin add org.apache.cordova.splashscreen
    1.30 +    
    1.31 +
    1.32 +## 支援的平臺
    1.33 +
    1.34 +*   亞馬遜火 OS
    1.35 +*   Android 系統
    1.36 +*   黑莓 10
    1.37 +*   iOS
    1.38 +*   Windows Phone 7 和 8
    1.39 +*   Windows 8
    1.40 +
    1.41 +## 方法
    1.42 +
    1.43 +*   splashscreen.show
    1.44 +*   splashscreen.hide
    1.45 +
    1.46 +### Android 的怪癖
    1.47 +
    1.48 +在你的 config.xml,您需要添加以下優惠:
    1.49 +
    1.50 +`<preference name="SplashScreen" value="foo" />` `<preference name="SplashScreenDelay" value="10000" />`
    1.51 +
    1.52 +美孚在哪裡閃屏檔,最好是 9 修補程式檔的名稱。 請確保您的 splashcreen 檔添加到 res/xml 目錄下相應的資料夾。 第二個參數表示多久閃屏會顯示以毫秒為單位。 它將預設為 3000 毫秒。 有關更多資訊,請參見[圖示和啟動畫面][1]。
    1.53 +
    1.54 + [1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
    1.55 +
    1.56 +## splashscreen.hide
    1.57 +
    1.58 +解雇的閃屏。
    1.59 +
    1.60 +    navigator.splashscreen.hide() ;
    1.61 +    
    1.62 +
    1.63 +### 黑莓 10,WP8,iOS 怪癖
    1.64 +
    1.65 +`config.xml`檔的 `AutoHideSplashScreen` 設置必須為 `false` 。 若要延遲兩秒鐘隱藏的閃屏,添加如下所示在計時器 `deviceready` 事件處理常式:
    1.66 +
    1.67 +        setTimeout(function() {navigator.splashscreen.hide() ;},2000年) ;
    1.68 +    
    1.69 +
    1.70 +## splashscreen.show
    1.71 +
    1.72 +顯示初始螢幕。
    1.73 +
    1.74 +    navigator.splashscreen.show() ;
    1.75 +    
    1.76 +
    1.77 +您的應用程式無法調用 `navigator.splashscreen.show()` 直到應用程式已經開始, `deviceready` 觸發了事件。 但是,由於通常的閃屏為了是可見的在您的應用程式啟動之前,這似乎會打敗閃屏的目的。 提供一些配置在 `config.xml` 將自動 `show` 閃屏您的應用程式啟動後立即和之前它已經完全起步並收到 `deviceready` 事件。 做這種配置的詳細資訊,請參閱[圖示和啟動畫面][1]。 出於這個原因,它不太可能您需要調用 `navigator.splashscreen.show()` ,使初始螢幕可見為應用程式啟動。
    1.78 \ No newline at end of file

mercurial