arnaucube
arnaucube/openEventsPlatformAppPublic Self-hosted repository
openEventsPlatformApp/plugins/cordova-plugin-statusbar/doc/es/README.md
plugins/cordova-plugin-statusbar/doc/es/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> El `StatusBar` objeto proporciona algunas funciones para personalizar el iOS y Android StatusBar.
 27
 28## Instalación
 29
 30    cordova plugin add cordova-plugin-statusbar
 31    
 32
 33## Preferencias
 34
 35#### config.xml
 36
 37  * **StatusBarOverlaysWebView** (boolean, true por defecto). En iOS 7, hacer la superposición statusbar o no superponer la WebView al inicio.
 38    
 39        <preference name="StatusBarOverlaysWebView" value="true" />
 40        
 41
 42  * **StatusBarBackgroundColor** (color hex string por defecto #000000). IOS 7 y 5 Android, configurar el color de fondo de la barra de estado por una cadena hexadecimal (#RRGGBB) en el arranque.
 43    
 44        <preference name="StatusBarBackgroundColor" value="#000000" />
 45        
 46
 47  * **StatusBarStyle** (status bar estilo por defecto lightcontent). En iOS 7, definir el estilo de barra de estado. Por defecto las opciones disponibles, lightcontent, blacktranslucent, blackopaque.
 48    
 49        <preference name="StatusBarStyle" value="lightcontent" />
 50        
 51
 52### Rarezas Android
 53
 54Android 5 + pautas especifican utilizando un color diferente para la barra de estado que la aplicación principal de color (a diferencia del color de barra de estado uniforme de muchas apps de iOS 7 +), por lo que puede establecer el color de la barra de estado en tiempo de ejecución en su lugar a través de `StatusBar.backgroundColorByHexString` o `StatusBar.backgroundColorByName`. Una forma de hacerlo sería:
 55
 56```js
 57if (cordova.platformId == 'android') {
 58    StatusBar.backgroundColorByHexString("#333");
 59}
 60```
 61
 62## Escondido en el arranque
 63
 64Durante el tiempo de ejecución puede utilizar la función StatusBar.hide abajo, pero si quieres la barra de estado que está escondido en el inicio de la aplicación, se debe modificar el archivo Info.plist de su aplicación.
 65
 66Agregar/editar estos dos atributos si no está presente. Defina **"inicialmente se esconde la barra de estado"** a **"YES"** y **"Aparición de vista basado en controlador estatus bar"** a **"NO"**. Si se edita manualmente sin Xcode, las claves y valores son:
 67
 68    <key>UIStatusBarHidden</key>
 69    <true/>
 70    <key>UIViewControllerBasedStatusBarAppearance</key>
 71    <false/>
 72    
 73
 74## Métodos
 75
 76Este plugin define global `StatusBar` objeto.
 77
 78Aunque en el ámbito global, no estará disponible hasta después de la `deviceready` evento.
 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## Propiedades
 97
 98  * StatusBar.isVisible
 99
100## Permisos
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
111En iOS 7, hacer la barra de estado superposición o no superponer la vista Web.
112
113    StatusBar.overlaysWebView(true);
114    
115
116## Descripción
117
118En iOS 7, establecida en false para que la barra de estado aparezca como iOS 6. Establece el color de fondo y estilo para utilizar las otras funciones.
119
120## Plataformas soportadas
121
122  * iOS
123
124## Ejemplo rápido
125
126    StatusBar.overlaysWebView(true);
127    StatusBar.overlaysWebView(false);
128    
129
130# StatusBar.styleDefault
131
132Utilice la barra de estado por defecto (texto oscuro, para fondos de luz).
133
134    StatusBar.styleDefault();
135    
136
137## Plataformas soportadas
138
139  * iOS
140  * Windows Phone 7
141  * Windows Phone 8
142  * Windows Phone 8.1
143
144# StatusBar.styleLightContent
145
146Utilice la barra de estado lightContent (texto ligero, para fondos oscuros).
147
148    StatusBar.styleLightContent();
149    
150
151## Plataformas soportadas
152
153  * iOS
154  * Windows Phone 7
155  * Windows Phone 8
156  * Windows Phone 8.1
157
158# StatusBar.styleBlackTranslucent
159
160Utilice la barra de estado blackTranslucent (texto ligero, para fondos oscuros).
161
162    StatusBar.styleBlackTranslucent();
163    
164
165## Plataformas soportadas
166
167  * iOS
168  * Windows Phone 7
169  * Windows Phone 8
170  * Windows Phone 8.1
171
172# StatusBar.styleBlackOpaque
173
174Utilice la barra de estado blackOpaque (texto ligero, para fondos oscuros).
175
176    StatusBar.styleBlackOpaque();
177    
178
179## Plataformas soportadas
180
181  * iOS
182  * Windows Phone 7
183  * Windows Phone 8
184  * Windows Phone 8.1
185
186# StatusBar.backgroundColorByName
187
188En iOS 7, al establecer StatusBar.statusBarOverlaysWebView a false, se puede establecer el color de fondo de la barra de estado nombre del color.
189
190    StatusBar.backgroundColorByName("red");
191    
192
193Nombres de los colores admitidos son:
194
195    black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown
196    
197
198## Plataformas soportadas
199
200  * iOS
201  * Android 5+
202  * Windows Phone 7
203  * Windows Phone 8
204  * Windows Phone 8.1
205
206# StatusBar.backgroundColorByHexString
207
208Establece el color de fondo de la barra de estado por una cadena hexadecimal.
209
210    StatusBar.backgroundColorByHexString("#C0C0C0");
211    
212
213Propiedades CSS abreviada también son compatibles.
214
215    StatusBar.backgroundColorByHexString("#333"); // => #333333
216    StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB
217    
218
219En iOS 7, cuando se establece StatusBar.statusBarOverlaysWebView en false, se puede establecer el color de fondo de la barra de estado una cadena hexadecimal (#RRGGBB).
220
221En WP7 y WP8 también puede especificar valores como #AARRGGBB, donde AA es un valor alfa
222
223## Plataformas soportadas
224
225  * iOS
226  * Android 5+
227  * Windows Phone 7
228  * Windows Phone 8
229  * Windows Phone 8.1
230
231# StatusBar.hide
232
233Ocultar la barra de estado.
234
235    StatusBar.hide();
236    
237
238## Plataformas soportadas
239
240  * iOS
241  * Android
242  * Windows Phone 7
243  * Windows Phone 8
244  * Windows Phone 8.1
245
246# StatusBar.show
247
248Muestra la barra de estado.
249
250    StatusBar.show();
251    
252
253## Plataformas soportadas
254
255  * iOS
256  * Android
257  * Windows Phone 7
258  * Windows Phone 8
259  * Windows Phone 8.1
260
261# StatusBar.isVisible
262
263Lea esta propiedad para ver si la barra de estado es visible o no.
264
265    if (StatusBar.isVisible) {
266        // do something
267    }
268    
269
270## Plataformas soportadas
271
272  * iOS
273  * Android
274  * Windows Phone 7
275  * Windows Phone 8
276  * Windows Phone 8.1