arnaucube
arnaucube/openEventsPlatformAppPublic Self-hosted repository
openEventsPlatformApp/plugins/cordova-plugin-statusbar/doc/ja/README.md
plugins/cordova-plugin-statusbar/doc/ja/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> `StatusBar`オブジェクトは、iOS と Android ステータス バーをカスタマイズするいくつかの機能を提供します。
 27
 28## インストール
 29
 30    cordova plugin add cordova-plugin-statusbar
 31    
 32
 33## 基本設定
 34
 35#### config.xml
 36
 37  * **StatusBarOverlaysWebView**(ブール値、デフォルトは true)。IOS 7、起動時にステータスバー オーバーレイまたはないオーバーレイ、WebView を作る。
 38    
 39        <preference name="StatusBarOverlaysWebView" value="true" />
 40        
 41
 42  * **StatusBarBackgroundColor**(カラー 16 進文字列、既定値は #000000)。IOS 7 とアンドロイド 5、16 進文字列 (#RRGGBB) 起動時にステータスバーの背景色を設定します。
 43    
 44        <preference name="StatusBarBackgroundColor" value="#000000" />
 45        
 46
 47  * **StatusBarStyle**(ステータス バーのスタイル、既定値は lightcontent)。Ios 7、ステータス バーのスタイルを設定します。使用可能なオプションのデフォルト、lightcontent、blacktranslucent、blackopaque。
 48    
 49        <preference name="StatusBarStyle" value="lightcontent" />
 50        
 51
 52### Android の癖
 53
 54Android のガイドライン 5 + 指定メイン アプリよりもステータスバーの異なる色を使用して`StatusBar.backgroundColorByHexString`または`StatusBar.backgroundColorByName`経由で代わりに実行時にステータス バーの色を設定する場合がありますので (とは違って制服ステータスバー色多くの iOS 7 + アプリの) 色します。 それを行う方法の 1 つになります。
 55
 56```js
 57if (cordova.platformId == 'android') {
 58    StatusBar.backgroundColorByHexString("#333");
 59}
 60```
 61
 62## 起動時に非表示
 63
 64実行時に下に、StatusBar.hide 関数を使用できますが、StatusBar アプリ起動時に非表示にする場合は、アプリの Info.plist ファイルを変更する必要があります。
 65
 66これら 2 つの属性の追加/編集存在しない場合。 **「ステータス バーが非表示最初」** **"YES"**を設定し、 **「ビュー コント ローラー ベースのステータス バーの外観」** **"NO"**にします。 Xcode せず手動で編集する、キーと値は。
 67
 68    <key>UIStatusBarHidden</key>
 69    <true/>
 70    <key>UIViewControllerBasedStatusBarAppearance</key>
 71    <false/>
 72    
 73
 74## メソッド
 75
 76このプラグインでは、グローバル `StatusBar` オブジェクトを定義します。
 77
 78グローバル スコープではあるがそれがないまで `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## プロパティ
 97
 98  * StatusBar.isVisible
 99
100## アクセス許可
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、statusbar オーバーレイまたはない WebView をオーバーレイします。
112
113    StatusBar.overlaysWebView(true);
114    
115
116## 解説
117
118IOS 7、iOS の 6 のように表示されるステータスバーを false に設定します。他の関数の使用に合わせてスタイルや背景色を設定します。
119
120## サポートされているプラットフォーム
121
122  * iOS
123
124## 簡単な例
125
126    StatusBar.overlaysWebView(true);
127    StatusBar.overlaysWebView(false);
128    
129
130# StatusBar.styleDefault
131
132既定ステータス バー (暗いテキスト、淡色の背景) を使用します。
133
134    StatusBar.styleDefault();
135    
136
137## サポートされているプラットフォーム
138
139  * iOS
140  * Windows Phone 7
141  * Windows Phone 8
142  * Windows Phone 8.1
143
144# StatusBar.styleLightContent
145
146LightContent ステータスバー (暗い背景の明るいテキスト) を使用します。
147
148    StatusBar.styleLightContent();
149    
150
151## サポートされているプラットフォーム
152
153  * iOS
154  * Windows Phone 7
155  * Windows Phone 8
156  * Windows Phone 8.1
157
158# StatusBar.styleBlackTranslucent
159
160BlackTranslucent ステータスバー (暗い背景の明るいテキスト) を使用します。
161
162    StatusBar.styleBlackTranslucent();
163    
164
165## サポートされているプラットフォーム
166
167  * iOS
168  * Windows Phone 7
169  * Windows Phone 8
170  * Windows Phone 8.1
171
172# StatusBar.styleBlackOpaque
173
174BlackOpaque ステータスバー (暗い背景の明るいテキスト) を使用します。
175
176    StatusBar.styleBlackOpaque();
177    
178
179## サポートされているプラットフォーム
180
181  * iOS
182  * Windows Phone 7
183  * Windows Phone 8
184  * Windows Phone 8.1
185
186# StatusBar.backgroundColorByName
187
188Ios 7、StatusBar.statusBarOverlaysWebView を false に設定する場合はステータスバーの背景色の色の名前によって設定できます。
189
190    StatusBar.backgroundColorByName("red");
191    
192
193サポートされている色の名前は次のとおりです。
194
195    black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown
196    
197
198## サポートされているプラットフォーム
199
200  * iOS
201  * Android 5+
202  * Windows Phone 7
203  * Windows Phone 8
204  * Windows Phone 8.1
205
206# StatusBar.backgroundColorByHexString
207
20816 進文字列をステータス バーの背景色を設定します。
209
210    StatusBar.backgroundColorByHexString("#C0C0C0");
211    
212
213速記の CSS プロパティもサポートされています。
214
215    StatusBar.backgroundColorByHexString("#333"); // => #333333
216    StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB
217    
218
219Ios 7、StatusBar.statusBarOverlaysWebView を false に設定する場合はステータスバーの背景色を 16 進文字列 (#RRGGBB) で設定できます。
220
221WP7 と WP8 も指定できます値 #AARRGGBB, AA は、アルファ値として
222
223## サポートされているプラットフォーム
224
225  * iOS
226  * Android 5+
227  * Windows Phone 7
228  * Windows Phone 8
229  * Windows Phone 8.1
230
231# StatusBar.hide
232
233ステータスバーを隠します。
234
235    StatusBar.hide();
236    
237
238## サポートされているプラットフォーム
239
240  * iOS
241  * アンドロイド
242  * Windows Phone 7
243  * Windows Phone 8
244  * Windows Phone 8.1
245
246# StatusBar.show
247
248ステータス バーが表示されます。
249
250    StatusBar.show();
251    
252
253## サポートされているプラットフォーム
254
255  * iOS
256  * アンドロイド
257  * Windows Phone 7
258  * Windows Phone 8
259  * Windows Phone 8.1
260
261# StatusBar.isVisible
262
263このプロパティ、ステータスバーが表示されるかどうかをお読みください。
264
265    if (StatusBar.isVisible) {
266        // do something
267    }
268    
269
270## サポートされているプラットフォーム
271
272  * iOS
273  * アンドロイド
274  * Windows Phone 7
275  * Windows Phone 8
276  * Windows Phone 8.1