openEventsPlatformApp/plugins/cordova-plugin-statusbar/doc/it/index.md
plugins/cordova-plugin-statusbar/doc/it/index.mdRaw
1<!---
2 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# StatusBar
23
24> Il `StatusBar` oggetto fornisce alcune funzioni per personalizzare l'iOS e Android StatusBar.
25
26## Installazione
27
28 cordova plugin add cordova-plugin-statusbar
29
30
31## Preferenze
32
33#### config.xml
34
35* **StatusBarOverlaysWebView** (boolean, default è true). IOS 7, rendono la statusbar sovrapposizione o la non sovrapposizione WebView all'avvio.
36
37 <preference name="StatusBarOverlaysWebView" value="true" />
38
39
40* **StatusBarBackgroundColor** (stringa esadecimale colore, predefinito è #000000). IOS 7, impostare il colore di sfondo della barra di stato di una stringa esadecimale (#RRGGBB) all'avvio.
41
42 <preference name="StatusBarBackgroundColor" value="#000000" />
43
44
45* **StatusBarStyle** (status bar in stile, default è lightcontent). IOS 7, impostare lo stile di barra di stato. Predefinita di opzioni disponibili, lightcontent, blacktranslucent, blackopaque.
46
47 <preference name="StatusBarStyle" value="lightcontent" />
48
49
50## Nascondendo all'avvio
51
52In 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.
53
54Aggiungere 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:
55
56 <key>UIStatusBarHidden</key>
57 <true/>
58 <key>UIViewControllerBasedStatusBarAppearance</key>
59 <false/>
60
61
62## Metodi
63
64Questo plugin definisce globale oggetto `StatusBar`.
65
66Anche se in ambito globale, non è disponibile fino a dopo l'evento `deviceready`.
67
68 document.addEventListener("deviceready", onDeviceReady, false);
69 function onDeviceReady() {
70 console.log(StatusBar);
71 }
72
73
74* StatusBar.overlaysWebView
75* StatusBar.styleDefault
76* StatusBar.styleLightContent
77* StatusBar.styleBlackTranslucent
78* StatusBar.styleBlackOpaque
79* StatusBar.backgroundColorByName
80* StatusBar.backgroundColorByHexString
81* StatusBar.hide
82* StatusBar.show
83
84## Proprietà
85
86* StatusBar.isVisible
87
88## Autorizzazioni
89
90#### config.xml
91
92 <feature name="StatusBar">
93 <param name="ios-package" value="CDVStatusBar" onload="true" />
94 </feature>
95
96
97# StatusBar.overlaysWebView
98
99IOS 7, rendono la statusbar sovrapposizione o non sovrapporre WebView.
100
101 StatusBar.overlaysWebView(true);
102
103
104## Descrizione
105
106IOS 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.
107
108## Piattaforme supportate
109
110* iOS
111
112## Esempio rapido
113
114 StatusBar.overlaysWebView(true);
115 StatusBar.overlaysWebView(false);
116
117
118# StatusBar.styleDefault
119
120Utilizzare la barra di stato predefinito (testo scuro, per sfondi di luce).
121
122 StatusBar.styleDefault();
123
124
125## Piattaforme supportate
126
127* iOS
128* Windows Phone 7
129* Windows Phone 8
130* Windows Phone 8.1
131
132# StatusBar.styleLightContent
133
134Utilizzare la barra di stato lightContent (testo in chiaro, per sfondi scuri).
135
136 StatusBar.styleLightContent();
137
138
139## Piattaforme supportate
140
141* iOS
142* Windows Phone 7
143* Windows Phone 8
144* Windows Phone 8.1
145
146# StatusBar.styleBlackTranslucent
147
148Utilizzare la barra di stato blackTranslucent (testo in chiaro, per sfondi scuri).
149
150 StatusBar.styleBlackTranslucent();
151
152
153## Piattaforme supportate
154
155* iOS
156* Windows Phone 7
157* Windows Phone 8
158* Windows Phone 8.1
159
160# StatusBar.styleBlackOpaque
161
162Utilizzare la barra di stato blackOpaque (testo in chiaro, per sfondi scuri).
163
164 StatusBar.styleBlackOpaque();
165
166
167## Piattaforme supportate
168
169* iOS
170* Windows Phone 7
171* Windows Phone 8
172* Windows Phone 8.1
173
174# StatusBar.backgroundColorByName
175
176IOS 7, quando StatusBar.statusBarOverlaysWebView è impostata su false, è possibile impostare il colore di sfondo della barra di stato con il nome di colore.
177
178 StatusBar.backgroundColorByName("red");
179
180
181Nomi di colore supportati sono:
182
183 black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown
184
185
186## Piattaforme supportate
187
188* iOS
189* Windows Phone 7
190* Windows Phone 8
191* Windows Phone 8.1
192
193# StatusBar.backgroundColorByHexString
194
195Imposta il colore di sfondo della barra di stato di una stringa esadecimale.
196
197 StatusBar.backgroundColorByHexString("#C0C0C0");
198
199
200Proprietà di scrittura stenografica CSS sono supportati anche.
201
202 StatusBar.backgroundColorByHexString("#333"); // => #333333
203 StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB
204
205
206IOS 7, quando StatusBar.statusBarOverlaysWebView è impostata su false, è possibile impostare il colore di sfondo della barra di stato di una stringa esadecimale (#RRGGBB).
207
208Su WP7 e WP8 è inoltre possibile specificare i valori come #AARRGGBB, dove AA è un valore alfa
209
210## Piattaforme supportate
211
212* iOS
213* Windows Phone 7
214* Windows Phone 8
215* Windows Phone 8.1
216
217# StatusBar.hide
218
219Nascondere la barra di stato.
220
221 StatusBar.hide();
222
223
224## Piattaforme supportate
225
226* iOS
227* Android
228* Windows Phone 7
229* Windows Phone 8
230* Windows Phone 8.1
231
232# StatusBar.show
233
234Mostra la barra di stato.
235
236 StatusBar.show();
237
238
239## Piattaforme supportate
240
241* iOS
242* Android
243* Windows Phone 7
244* Windows Phone 8
245* Windows Phone 8.1
246
247# StatusBar.isVisible
248
249Leggere questa proprietà per vedere se la barra di stato è visibile o no.
250
251 if (StatusBar.isVisible) {
252 // do something
253 }
254
255
256## Piattaforme supportate
257
258* iOS
259* Android
260* Windows Phone 7
261* Windows Phone 8
262* Windows Phone 8.1