未验证 提交 8a30b8aa 编写于 作者: O openharmony_ci 提交者: Gitee

!9498 Master:文档拼写错误修改:无需同步翻译

Merge pull request !9498 from 葛亚芳/master
......@@ -1529,9 +1529,9 @@ Queries data from the RDB store of a remote device based on specified conditions
**Example**
```js
let predicates = new rdb.RdbPredicates('EPLOYEE')
let predicates = new rdb.RdbPredicates('EMPLOYEE')
predicates.greaterThan("id", 0)
rdbStore.remoteQuery("deviceId", "EPLOYEE", predicates, function(err, resultSet){
rdbStore.remoteQuery("deviceId", "EMPLOYEE", predicates, function(err, resultSet){
if (err) {
console.info("Failed to remoteQuery, err: " + err)
return
......@@ -1567,7 +1567,7 @@ Queries data from the RDB store of a remote device based on specified conditions
**Example**
```js
let predicates = new rdb.RdbPredicates('EPLOYEE')
let predicates = new rdb.RdbPredicates('EMPLOYEE')
predicates.greaterThan("id", 0)
let promise = rdbStore.remoteQuery("deviceId", "EMPLOYEE", predicates)
promise.then((resultSet) => {
......
......@@ -55,7 +55,7 @@ var path;
var context = featureAbility.getContext();
context.getFilesDir().then((filePath) => {
path = filePath;
console.info("======================>getFilesDirPromsie====================>");
console.info("======================>getFilesDirPromise====================>");
});
let storage = data_storage.getStorageSync(path + '/mystore');
......@@ -88,7 +88,7 @@ var path;
var context = featureAbility.getContext();
context.getFilesDir().then((filePath) => {
path = filePath;
console.info("======================>getFilesDirPromsie====================>");
console.info("======================>getFilesDirPromise====================>");
});
data_storage.getStorage(path + '/mystore', function (err, storage) {
......@@ -131,7 +131,7 @@ var path;
var context = featureAbility.getContext();
context.getFilesDir().then((filePath) => {
path = filePath;
console.info("======================>getFilesDirPromsie====================>");
console.info("======================>getFilesDirPromise====================>");
});
let getPromise = data_storage.getStorage(path + '/mystore');
......@@ -167,7 +167,7 @@ var path;
var context = featureAbility.getContext();
context.getFilesDir().then((filePath) => {
path = filePath;
console.info("======================>getFilesDirPromsie====================>");
console.info("======================>getFilesDirPromise====================>");
});
data_storage.deleteStorageSync(path + '/mystore');
......@@ -198,7 +198,7 @@ var path;
var context = featureAbility.getContext();
context.getFilesDir().then((filePath) => {
path = filePath;
console.info("======================>getFilesDirPromsie====================>");
console.info("======================>getFilesDirPromise====================>");
});
data_storage.deleteStorage(path + '/mystore', function (err) {
......@@ -239,7 +239,7 @@ var path;
var context = featureAbility.getContext();
context.getFilesDir().then((filePath) => {
path = filePath;
console.info("======================>getFilesDirPromsie====================>");
console.info("======================>getFilesDirPromise====================>");
});
let promisedelSt = data_storage.deleteStorage(path + '/mystore');
......@@ -274,7 +274,7 @@ var path;
var context = featureAbility.getContext();
context.getFilesDir().then((filePath) => {
path = filePath;
console.info("======================>getFilesDirPromsie====================>");
console.info("======================>getFilesDirPromise====================>");
});
data_storage.removeStorageFromCacheSync(path + '/mystore');
......@@ -305,7 +305,7 @@ var path;
var context = featureAbility.getContext();
context.getFilesDir().then((filePath) => {
path = filePath;
console.info("======================>getFilesDirPromsie====================>");
console.info("======================>getFilesDirPromise====================>");
});
data_storage.removeStorageFromCache(path + '/mystore', function (err) {
......@@ -347,7 +347,7 @@ var path;
var context = featureAbility.getContext();
context.getFilesDir().then((filePath) => {
path = filePath;
console.info("======================>getFilesDirPromsie====================>");
console.info("======================>getFilesDirPromise====================>");
});
let promiserevSt = data_storage.removeStorageFromCache(path + '/mystore')
......
......@@ -67,7 +67,7 @@ Creates a **ColorPicker** instance based on the pixel map. This API uses a promi
| Type | Description |
| ---------------------- | -------------- |
| Promisse\<[ColorPicker](#colorpicker)> | Promise used to return the **ColorPicker** instance created.|
| Promise\<[ColorPicker](#colorpicker)> | Promise used to return the **ColorPicker** instance created.|
**Example**
......
......@@ -99,7 +99,7 @@ Unsubscribes from events related to the screen state.
**Example**
```js
var callback = (data) => {
console.info('Unegister the callback for screen changes. Data: ' + JSON.stringify(data))
console.info('Unregister the callback for screen changes. Data: ' + JSON.stringify(data))
};
screen.off("connect", callback);
```
......
......@@ -3122,7 +3122,7 @@ let promise = windowClass.setForbidSplitMove(isForbidSplitMove);
promise.then((data)=> {
console.info('Succeeded in forbidding window moving in split screen mode. Data: ' + JSON.stringify(data));
}).catch((err)=>{
console.error('Failed to forbidd window moving in split screen mode. Cause: ' + JSON.stringify(err));
console.error('Failed to forbid window moving in split screen mode. Cause: ' + JSON.stringify(err));
});
```
......
......@@ -182,7 +182,7 @@ To create a better video watching and gaming experience, you can use the immersi
- Method 1: Call `setFullScreen` to set the main window to be displayed in full screen. In this case, the navigation bar and status bar are hidden.
- Method 2: Call `setSystemBarEnable` to hide the navigation bar and status bar.
- Method 3: Call `setLayoutFullScreen` to enable the full-screen mode for the main window layout. Call `setSystemPropertites` to set the opacity, background color, text color, and highlighted icon of the navigation bar and status bar to ensure that their display effect is consistent with that of the main window.
- Method 3: Call `setLayoutFullScreen` to enable the full-screen mode for the main window layout. Call `setSystemProperties` to set the opacity, background color, text color, and highlighted icon of the navigation bar and status bar to ensure that their display effect is consistent with that of the main window.
```js
// 2. Use method 1 to implement the immersive effect.
......
......@@ -216,7 +216,7 @@ To create a better video watching and gaming experience, you can use the immersi
2. Implement the immersive effect. You can use any of the following methods:
- Method 1: Call `setFullScreen` to set the main window to be displayed in full screen. In this case, the navigation bar and status bar are hidden.
- Method 2: Call `setSystemBarEnable` to hide the navigation bar and status bar.
- Method 3: Call `setLayoutFullScreen` to enable the full-screen mode for the main window layout. Call `setSystemPropertites` to set the opacity, background color, text color, and highlighted icon of the navigation bar and status bar to ensure that their display effect is consistent with that of the main window.
- Method 3: Call `setLayoutFullScreen` to enable the full-screen mode for the main window layout. Call `setSystemProperties` to set the opacity, background color, text color, and highlighted icon of the navigation bar and status bar to ensure that their display effect is consistent with that of the main window.
3. Load content for the immersive window and show it.
......
......@@ -40,7 +40,7 @@ USB设备可作为Host设备连接Device设备进行数据传输。开发示例
1. 获取设备列表。
```js
// 导入usb接口api包。
// 导入USB接口api包。
import usb from '@ohos.usb';
// 获取设备列表。
var deviceList = usb.getDevices();
......
......@@ -86,7 +86,7 @@ NativeWindow是`OpenHarmony`**本地平台化窗口**,包括从`Surface`构建
SkImageInfo imageInfo = ...
bitmap.setInfo(imageInfo, bufferHandle->stride);
bitmap.setPixels(bufferHandle->virAddr);
//创建 Skia Canvas 并将内容写入naitve window
//创建 Skia Canvas 并将内容写入native window
...
//写入完成后,通过OH_NativeWindow_NativeWindowFlushBuffer 提交给消费者使用,例如:显示在屏幕上
......@@ -101,7 +101,13 @@ NativeWindow是`OpenHarmony`**本地平台化窗口**,包括从`Surface`构建
OH_NativeXComponent_Callback &callback_;
callback_->OnSurfaceCreated = OnSurfaceCreatedCB;
callback_->OnSurfaceChanged = OnSurfaceChangedCB;
callback_->OnSurfaceDestoryed = OnSurfaceDestoryedCB;
callback_->OnSurfaceDestroyed = OnSurfaceDestroyedCB;
callback_->DispatchTouchEvent = DispatchTouchEventCB;
OH_NativeXComponent_RegisterCallback(nativeXComponent, callback_)
```
## 相关实例
针对NativeWindow的使用,有以下相关实例可供参考:
- [使用NativeWindow接口获取Buffer](https://gitee.com/openharmony/graphic_graphic_2d/blob/master/rosen/samples/hello_native_window/hello_native_window.cpp)
......@@ -13,7 +13,7 @@
![01](figures/01.png)
2. 进入配置工程界面,**Compile SDK** 选择“**8**”(**Complie SDK**选择“**9**”时注意同步选择**Model** 为“**FA**”,此处以选择“**8**”为例),**Language**选择“**eTS**”,其他参数保持默认设置即可。
2. 进入配置工程界面,**Compile SDK** 选择“**8**”(**Compile SDK**选择“**9**”时注意同步选择**Model** 为“**FA**”,此处以选择“**8**”为例),**Language**选择“**eTS**”,其他参数保持默认设置即可。
![02](figures/02.png)
......
......@@ -11,7 +11,7 @@
![01](figures/01.png)
2. 进入配置工程界面,**Compile SDK**选择“**8**”(**Complie SDK**选择“**9**”时注意同步选择 **Model** 为“**FA**”,此处以选择“**8**”为例),**Language**选择“**JS**”,其他参数保持默认设置即可。
2. 进入配置工程界面,**Compile SDK**选择“**8**”(**Compile SDK**选择“**9**”时注意同步选择 **Model** 为“**FA**”,此处以选择“**8**”为例),**Language**选择“**JS**”,其他参数保持默认设置即可。
![04](figures/04.png)
......
......@@ -825,7 +825,7 @@ on(type: 'change', callback: Callback&lt;{ key : string }&gt;): void
```js
data_preferences.getPreferences(this.context, 'mystore', function (err, preferences) {
if (err) {
console.info("Failed to Gget preferences.");
console.info("Failed to get preferences.");
return;
}
var observer = function (key) {
......@@ -871,7 +871,7 @@ off(type: 'change', callback?: Callback&lt;{ key : string }&gt;): void
```js
data_preferences.getPreferences(this.context, 'mystore', function (err, preferences) {
if (err) {
console.info("Failed to Gget preferences.");
console.info("Failed to get preferences.");
return;
}
var observer = function (key) {
......
......@@ -57,7 +57,7 @@ var path;
var context = featureAbility.getContext();
context.getFilesDir().then((filePath) => {
path = filePath;
console.info("======================>getFilesDirPromsie====================>");
console.info("======================>getFilesDirPromise====================>");
let storage = data_storage.getStorageSync(path + '/mystore');
storage.putSync('startup', 'auto');
......@@ -90,7 +90,7 @@ var path;
var context = featureAbility.getContext();
context.getFilesDir().then((filePath) => {
path = filePath;
console.info("======================>getFilesDirPromsie====================>");
console.info("======================>getFilesDirPromise====================>");
data_storage.getStorage(path + '/mystore', function (err, storage) {
if (err) {
......@@ -133,7 +133,7 @@ var path;
var context = featureAbility.getContext();
context.getFilesDir().then((filePath) => {
path = filePath;
console.info("======================>getFilesDirPromsie====================>");
console.info("======================>getFilesDirPromise====================>");
let getPromise = data_storage.getStorage(path + '/mystore');
getPromise.then((storage) => {
......@@ -169,7 +169,7 @@ var path;
var context = featureAbility.getContext();
context.getFilesDir().then((filePath) => {
path = filePath;
console.info("======================>getFilesDirPromsie====================>");
console.info("======================>getFilesDirPromise====================>");
data_storage.deleteStorageSync(path + '/mystore');
});
......@@ -199,7 +199,7 @@ var path;
var context = featureAbility.getContext();
context.getFilesDir().then((filePath) => {
path = filePath;
console.info("======================>getFilesDirPromsie====================>");
console.info("======================>getFilesDirPromise====================>");
data_storage.deleteStorage(path + '/mystore', function (err) {
if (err) {
......@@ -241,7 +241,7 @@ var path;
var context = featureAbility.getContext();
context.getFilesDir().then((filePath) => {
path = filePath;
console.info("======================>getFilesDirPromsie====================>");
console.info("======================>getFilesDirPromise====================>");
let promisedelSt = data_storage.deleteStorage(path + '/mystore');
promisedelSt.then(() => {
......@@ -275,7 +275,7 @@ var path;
var context = featureAbility.getContext();
context.getFilesDir().then((filePath) => {
path = filePath;
console.info("======================>getFilesDirPromsie====================>");
console.info("======================>getFilesDirPromise====================>");
data_storage.removeStorageFromCacheSync(path + '/mystore');
});
......@@ -306,7 +306,7 @@ var path;
var context = featureAbility.getContext();
context.getFilesDir().then((filePath) => {
path = filePath;
console.info("======================>getFilesDirPromsie====================>");
console.info("======================>getFilesDirPromise====================>");
data_storage.removeStorageFromCache(path + '/mystore', function (err) {
if (err) {
......@@ -348,7 +348,7 @@ var path;
var context = featureAbility.getContext();
context.getFilesDir().then((filePath) => {
path = filePath;
console.info("======================>getFilesDirPromsie====================>");
console.info("======================>getFilesDirPromise====================>");
let promiserevSt = data_storage.removeStorageFromCache(path + '/mystore')
promiserevSt.then(() => {
......
......@@ -67,7 +67,7 @@ createColorPicker(source: image.PixelMap): Promise\<ColorPicker>
| 类型 | 说明 |
| ---------------------- | -------------- |
| Promisse\<[ColorPicker](#colorpicker)> | Promise对象。返回创建的ColorPicker实例。 |
| Promise\<[ColorPicker](#colorpicker)> | Promise对象。返回创建的ColorPicker实例。 |
**示例:**
......
......@@ -112,7 +112,7 @@ off(eventType: 'connect' | 'disconnect' | 'change', callback?: Callback&lt;numbe
```js
var callback = (data) => {
console.info('Unegister the callback for screen changes. Data: ' + JSON.stringify(data))
console.info('Unregister the callback for screen changes. Data: ' + JSON.stringify(data))
};
screen.off("connect", callback);
```
......
......@@ -3118,7 +3118,7 @@ let promise = windowClass.setForbidSplitMove(isForbidSplitMove);
promise.then((data)=> {
console.info('Succeeded in forbidding window moving in split screen mode. Data: ' + JSON.stringify(data));
}).catch((err)=>{
console.error('Failed to forbidd window moving in split screen mode. Cause: ' + JSON.stringify(err));
console.error('Failed to forbid window moving in split screen mode. Cause: ' + JSON.stringify(err));
});
```
......
......@@ -184,7 +184,7 @@
- 方式一:调用`setFullScreen`接口,设置应用主窗口为全屏显示,此时导航栏、状态栏将隐藏,从而达到沉浸式效果。
- 方式二:调用`setSystemBarEnable`接口,设置导航栏、状态栏不显示,从而达到沉浸式效果。
- 方式三:调用`setLayoutFullScreen`接口,设置应用主窗口为全屏布局;然后调用`setSystemPropertites`接口,设置导航栏、状态栏的透明度、背景/文字颜色以及高亮图标等属性,使之保持与主窗口显示协调一致,从而达到沉浸式效果。
- 方式三:调用`setLayoutFullScreen`接口,设置应用主窗口为全屏布局;然后调用`setSystemProperties`接口,设置导航栏、状态栏的透明度、背景/文字颜色以及高亮图标等属性,使之保持与主窗口显示协调一致,从而达到沉浸式效果。
```js
// 2.实现沉浸式效果。方式一:设置窗口全屏显示。
......
......@@ -208,7 +208,7 @@ class MainAbility extends Ability {
2. 实现沉浸式效果。有以下三种方式:
- 方式一:调用`setFullScreen`接口,设置应用主窗口为全屏显示,此时导航栏、状态栏将隐藏,从而达到沉浸式效果。
- 方式二:调用`setSystemBarEnable`接口,设置导航栏、状态栏不显示,从而达到沉浸式效果。
- 方式三:调用`setLayoutFullScreen`接口,设置应用主窗口为全屏布局;然后调用`setSystemPropertites`接口,设置导航栏、状态栏的透明度、背景/文字颜色以及高亮图标等属性,使之保持与主窗口显示协调一致,从而达到沉浸式效果。
- 方式三:调用`setLayoutFullScreen`接口,设置应用主窗口为全屏布局;然后调用`setSystemProperties`接口,设置导航栏、状态栏的透明度、背景/文字颜色以及高亮图标等属性,使之保持与主窗口显示协调一致,从而达到沉浸式效果。
3. 加载显示沉浸式窗口的具体内容。
通过`loadContent``show`接口加载显示沉浸式窗口的具体内容。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册