arnaucube
arnaucube/openEventsPlatformAppPublic Self-hosted repository
openEventsPlatformApp/plugins/cordova-plugin-statusbar/doc/it/README.md
plugins/cordova-plugin-statusbar/doc/it/README.mdRaw
  1<!---
  2# license: Licensed to the Apache Software Foundation (ASF) under one
  3#         or more contributor license agreements.  See the NOTICE file
  4#         distributed with this work for additional information
  5#         regarding copyright ownership.  The ASF licenses this file
  6#         to you under the Apache License, Version 2.0 (the
  7#         "License"); you may not use this file except in compliance
  8#         with the License.  You may obtain a copy of the License at
  9#
 10#           http://www.apache.org/licenses/LICENSE-2.0
 11#
 12#         Unless required by applicable law or agreed to in writing,
 13#         software distributed under the License is distributed on an
 14#         "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 15#         KIND, either express or implied.  See the License for the
 16#         specific language governing permissions and limitations
 17#         under the License.
 18-->
 19
 20# cordova-plugin-statusbar
 21
 22[![Build Status](https://travis-ci.org/apache/cordova-plugin-statusbar.svg)](https://travis-ci.org/apache/cordova-plugin-statusbar)
 23
 24# StatusBar
 25
 26> Il `StatusBar` oggetto fornisce alcune funzioni per personalizzare l'iOS e Android StatusBar.
 27
 28## Installazione
 29
 30    cordova plugin add cordova-plugin-statusbar
 31    
 32
 33## Preferenze
 34
 35#### config. XML
 36
 37  * **StatusBarOverlaysWebView** (boolean, default è true). IOS 7, rendono la statusbar sovrapposizione o la non sovrapposizione WebView all'avvio.
 38    
 39        <preference name="StatusBarOverlaysWebView" value="true" />
 40        
 41
 42  * **StatusBarBackgroundColor** (stringa esadecimale di colore, il valore predefinito è #000000). Su iOS 7 e 5 Android, è possibile impostare il colore di sfondo della barra di stato di una stringa esadecimale (#RRGGBB) all'avvio.
 43    
 44        <preference name="StatusBarBackgroundColor" value="#000000" />
 45        
 46
 47  * **StatusBarStyle** (status bar in stile, default è lightcontent). IOS 7, impostare lo stile di barra di stato. Predefinita di opzioni disponibili, lightcontent, blacktranslucent, blackopaque.
 48    
 49        <preference name="StatusBarStyle" value="lightcontent" />
 50        
 51
 52### Stranezze Android
 53
 54Le linee 5 + Android Guida specificano utilizzando un colore diverso per la barra di stato che l'app principale di colore (a differenza di colore uniforme statusbar di molte applicazioni di iOS 7 +), quindi si consiglia di impostare il colore della barra di stato in fase di esecuzione invece tramite `StatusBar.backgroundColorByHexString` o `StatusBar.backgroundColorByName`. Un modo per farlo sarebbe:
 55
 56```js
 57if (cordova.platformId == 'android') {
 58    StatusBar.backgroundColorByHexString("#333");
 59}
 60```
 61
 62## Nascondendo all'avvio
 63
 64In fase di esecuzione è possibile utilizzare la funzione di StatusBar.hide qui sotto, ma se si desidera che la barra di stato venga nascosta all'avvio di app, è necessario modificare il file info. plist dell'app.
 65
 66Aggiungere o modificare questi due attributi, se non presente. Impostare la **"barra di stato è inizialmente nascosto"** a **"YES"** e **"Aspetto di vista basati su controller status bar"** a **"NO"**. Se si modifica manualmente senza Xcode, le chiavi e i valori sono:
 67
 68    <key>UIStatusBarHidden</key>
 69    <true/>
 70    <key>UIViewControllerBasedStatusBarAppearance</key>
 71    <false/>
 72    
 73
 74## Metodi
 75
 76Questo plugin definisce globale oggetto `StatusBar`.
 77
 78Anche se in ambito globale, non è disponibile fino a dopo l'evento `deviceready`.
 79
 80    document.addEventListener("deviceready", onDeviceReady, false);
 81    function onDeviceReady() {
 82        console.log(StatusBar);
 83    }
 84    
 85
 86  * StatusBar.overlaysWebView
 87  * StatusBar.styleDefault
 88  * StatusBar.styleLightContent
 89  * StatusBar.styleBlackTranslucent
 90  * StatusBar.styleBlackOpaque
 91  * StatusBar.backgroundColorByName
 92  * StatusBar.backgroundColorByHexString
 93  * StatusBar.hide
 94  * StatusBar.show
 95
 96## Proprietà
 97
 98  * StatusBar.isVisible
 99
100## Autorizzazioni
101
102#### config. XML
103
104            <feature name="StatusBar">
105                <param name="ios-package" value="CDVStatusBar" onload="true" />
106            </feature>
107    
108
109# StatusBar.overlaysWebView
110
111IOS 7, rendono la statusbar sovrapposizione o non sovrapporre WebView.
112
113    StatusBar.overlaysWebView(true);
114    
115
116## Descrizione
117
118IOS 7, impostato su false per rendere la barra di stato vengono visualizzati come iOS 6. Impostare il colore di sfondo e stile per soddisfare utilizzando altre funzioni.
119
120## Piattaforme supportate
121
122  * iOS
123
124## Esempio rapido
125
126    StatusBar.overlaysWebView(true);
127    StatusBar.overlaysWebView(false);
128    
129
130# StatusBar.styleDefault
131
132Utilizzare la barra di stato predefinito (testo scuro, per sfondi di luce).
133
134    StatusBar.styleDefault();
135    
136
137## Piattaforme supportate
138
139  * iOS
140  * Windows Phone 7
141  * Windows Phone 8
142  * Windows Phone 8.1
143
144# StatusBar.styleLightContent
145
146Utilizzare la barra di stato lightContent (testo in chiaro, per sfondi scuri).
147
148    StatusBar.styleLightContent();
149    
150
151## Piattaforme supportate
152
153  * iOS
154  * Windows Phone 7
155  * Windows Phone 8
156  * Windows Phone 8.1
157
158# StatusBar.styleBlackTranslucent
159
160Utilizzare la barra di stato blackTranslucent (testo in chiaro, per sfondi scuri).
161
162    StatusBar.styleBlackTranslucent();
163    
164
165## Piattaforme supportate
166
167  * iOS
168  * Windows Phone 7
169  * Windows Phone 8
170  * Windows Phone 8.1
171
172# StatusBar.styleBlackOpaque
173
174Utilizzare la barra di stato blackOpaque (testo in chiaro, per sfondi scuri).
175
176    StatusBar.styleBlackOpaque();
177    
178
179## Piattaforme supportate
180
181  * iOS
182  * Windows Phone 7
183  * Windows Phone 8
184  * Windows Phone 8.1
185
186# StatusBar.backgroundColorByName
187
188IOS 7, quando StatusBar.statusBarOverlaysWebView è impostata su false, è possibile impostare il colore di sfondo della barra di stato con il nome di colore.
189
190    StatusBar.backgroundColorByName("red");
191    
192
193Nomi di colore supportati sono:
194
195    black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown
196    
197
198## Piattaforme supportate
199
200  * iOS
201  * Android 5+
202  * Windows Phone 7
203  * Windows Phone 8
204  * Windows Phone 8.1
205
206# StatusBar.backgroundColorByHexString
207
208Imposta il colore di sfondo della barra di stato di una stringa esadecimale.
209
210    StatusBar.backgroundColorByHexString("#C0C0C0");
211    
212
213Proprietà di scrittura stenografica CSS sono supportati anche.
214
215    StatusBar.backgroundColorByHexString("#333"); // => #333333
216    StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB
217    
218
219IOS 7, quando StatusBar.statusBarOverlaysWebView è impostata su false, è possibile impostare il colore di sfondo della barra di stato di una stringa esadecimale (#RRGGBB).
220
221Su WP7 e WP8 è inoltre possibile specificare i valori come #AARRGGBB, dove AA è un valore alfa
222
223## Piattaforme supportate
224
225  * iOS
226  * Android 5+
227  * Windows Phone 7
228  * Windows Phone 8
229  * Windows Phone 8.1
230
231# StatusBar.hide
232
233Nascondere la barra di stato.
234
235    StatusBar.hide();
236    
237
238## Piattaforme supportate
239
240  * iOS
241  * Android
242  * Windows Phone 7
243  * Windows Phone 8
244  * Windows Phone 8.1
245
246# StatusBar.show
247
248Mostra la barra di stato.
249
250    StatusBar.show();
251    
252
253## Piattaforme supportate
254
255  * iOS
256  * Android
257  * Windows Phone 7
258  * Windows Phone 8
259  * Windows Phone 8.1
260
261# StatusBar.isVisible
262
263Leggere questa proprietà per vedere se la barra di stato è visibile o no.
264
265    if (StatusBar.isVisible) {
266        // do something
267    }
268    
269
270## Piattaforme supportate
271
272  * iOS
273  * Android
274  * Windows Phone 7
275  * Windows Phone 8
276  * Windows Phone 8.1