From 61bd1d5388c50770cc57ce122cb1bbfbbf846d1e Mon Sep 17 00:00:00 2001 From: wangzongmao Date: Tue, 6 Jul 2021 20:28:41 +0800 Subject: [PATCH] add sample for MultimodalEvent Signed-off-by: wangzongmao --- UI/MultimodalEvent/README_en.md | 23 +++ UI/MultimodalEvent/README_zh.md | 23 +++ UI/MultimodalEvent/build.gradle | 35 ++++ UI/MultimodalEvent/entry/build.gradle | 21 +++ UI/MultimodalEvent/entry/src/main/config.json | 43 +++++ .../samples/multimodalevent/MainAbility.java | 33 ++++ .../multimodalevent/MyApplication.java | 30 ++++ .../slice/CommonEventAbilitySlice.java | 147 +++++++++++++++ .../slice/KeyEventAbilitySclice.java | 78 ++++++++ .../slice/MainAbilitySlice.java | 51 ++++++ .../slice/MediaEventAbilitySlice.java | 86 +++++++++ .../slice/SystemEventAbilitySlice.java | 79 ++++++++ .../slice/TelephoneEventAbilitySlice.java | 89 +++++++++ .../slice/TouchEventAbilitySlice.java | 76 ++++++++ .../samples/multimodalevent/utils/Utils.java | 80 +++++++++ .../main/resources/base/element/color.json | 64 +++++++ .../main/resources/base/element/float.json | 44 +++++ .../main/resources/base/element/string.json | 64 +++++++ .../base/graphic/background_ability_main.xml | 20 +++ .../graphic/background_button_element.xml | 23 +++ .../base/graphic/background_dialog.xml | 21 +++ .../main/resources/base/graphic/button_bg.xml | 23 +++ .../resources/base/graphic/button_blue.xml | 22 +++ .../base/graphic/button_blue_empty.xml | 21 +++ .../base/graphic/button_blue_pressed.xml | 21 +++ .../resources/base/graphic/button_gray.xml | 22 +++ .../base/graphic/button_gray_empty.xml | 21 +++ .../base/graphic/button_gray_pressed.xml | 21 +++ .../resources/base/graphic/button_white.xml | 22 +++ .../base/graphic/button_white_empty.xml | 21 +++ .../base/graphic/button_white_pressed.xml | 21 +++ .../resources/base/graphic/dialog_button.xml | 22 +++ .../main/resources/base/graphic/list_item.xml | 22 +++ .../base/graphic/list_item_clicked.xml | 20 +++ .../base/graphic/list_item_nomral.xml | 20 +++ .../resources/base/graphic/single_box.xml | 22 +++ .../base/graphic/single_box_checked.xml | 25 +++ .../base/graphic/single_box_normal.xml | 25 +++ .../resources/base/graphic/textfield_bg.xml | 26 +++ .../layout/common_event_ability_slice.xml | 39 ++++ .../base/layout/key_event_ability_slice.xml | 33 ++++ .../base/layout/main_ability_slice.xml | 106 +++++++++++ .../base/layout/media_event_ability_slice.xml | 31 ++++ .../layout/system_event_ability_slice.xml | 34 ++++ .../base/layout/tel_event_ability_slice.xml | 170 ++++++++++++++++++ .../base/layout/touch_event_ability_slice.xml | 37 ++++ .../src/main/resources/base/media/icon.png | Bin 0 -> 6790 bytes .../src/main/resources/en/element/string.json | 64 +++++++ .../src/main/resources/zh/element/string.json | 64 +++++++ .../screenshots/device/common.png | Bin 0 -> 57526 bytes .../screenshots/device/index.png | Bin 0 -> 90821 bytes UI/MultimodalEvent/screenshots/device/key.png | Bin 0 -> 55052 bytes .../screenshots/device/media.png | Bin 0 -> 55303 bytes .../screenshots/device/telphone.png | Bin 0 -> 82308 bytes .../screenshots/device/touch.png | Bin 0 -> 56351 bytes UI/MultimodalEvent/settings.gradle | 15 ++ 56 files changed, 2120 insertions(+) create mode 100644 UI/MultimodalEvent/README_en.md create mode 100644 UI/MultimodalEvent/README_zh.md create mode 100644 UI/MultimodalEvent/build.gradle create mode 100644 UI/MultimodalEvent/entry/build.gradle create mode 100644 UI/MultimodalEvent/entry/src/main/config.json create mode 100644 UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/MainAbility.java create mode 100644 UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/MyApplication.java create mode 100644 UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/slice/CommonEventAbilitySlice.java create mode 100644 UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/slice/KeyEventAbilitySclice.java create mode 100644 UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/slice/MainAbilitySlice.java create mode 100644 UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/slice/MediaEventAbilitySlice.java create mode 100644 UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/slice/SystemEventAbilitySlice.java create mode 100644 UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/slice/TelephoneEventAbilitySlice.java create mode 100644 UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/slice/TouchEventAbilitySlice.java create mode 100644 UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/utils/Utils.java create mode 100644 UI/MultimodalEvent/entry/src/main/resources/base/element/color.json create mode 100644 UI/MultimodalEvent/entry/src/main/resources/base/element/float.json create mode 100644 UI/MultimodalEvent/entry/src/main/resources/base/element/string.json create mode 100644 UI/MultimodalEvent/entry/src/main/resources/base/graphic/background_ability_main.xml create mode 100644 UI/MultimodalEvent/entry/src/main/resources/base/graphic/background_button_element.xml create mode 100644 UI/MultimodalEvent/entry/src/main/resources/base/graphic/background_dialog.xml create mode 100644 UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_bg.xml create mode 100644 UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_blue.xml create mode 100644 UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_blue_empty.xml create mode 100644 UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_blue_pressed.xml create mode 100644 UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_gray.xml create mode 100644 UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_gray_empty.xml create mode 100644 UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_gray_pressed.xml create mode 100644 UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_white.xml create mode 100644 UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_white_empty.xml create mode 100644 UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_white_pressed.xml create mode 100644 UI/MultimodalEvent/entry/src/main/resources/base/graphic/dialog_button.xml create mode 100644 UI/MultimodalEvent/entry/src/main/resources/base/graphic/list_item.xml create mode 100644 UI/MultimodalEvent/entry/src/main/resources/base/graphic/list_item_clicked.xml create mode 100644 UI/MultimodalEvent/entry/src/main/resources/base/graphic/list_item_nomral.xml create mode 100644 UI/MultimodalEvent/entry/src/main/resources/base/graphic/single_box.xml create mode 100644 UI/MultimodalEvent/entry/src/main/resources/base/graphic/single_box_checked.xml create mode 100644 UI/MultimodalEvent/entry/src/main/resources/base/graphic/single_box_normal.xml create mode 100644 UI/MultimodalEvent/entry/src/main/resources/base/graphic/textfield_bg.xml create mode 100644 UI/MultimodalEvent/entry/src/main/resources/base/layout/common_event_ability_slice.xml create mode 100644 UI/MultimodalEvent/entry/src/main/resources/base/layout/key_event_ability_slice.xml create mode 100644 UI/MultimodalEvent/entry/src/main/resources/base/layout/main_ability_slice.xml create mode 100644 UI/MultimodalEvent/entry/src/main/resources/base/layout/media_event_ability_slice.xml create mode 100644 UI/MultimodalEvent/entry/src/main/resources/base/layout/system_event_ability_slice.xml create mode 100644 UI/MultimodalEvent/entry/src/main/resources/base/layout/tel_event_ability_slice.xml create mode 100644 UI/MultimodalEvent/entry/src/main/resources/base/layout/touch_event_ability_slice.xml create mode 100644 UI/MultimodalEvent/entry/src/main/resources/base/media/icon.png create mode 100644 UI/MultimodalEvent/entry/src/main/resources/en/element/string.json create mode 100644 UI/MultimodalEvent/entry/src/main/resources/zh/element/string.json create mode 100644 UI/MultimodalEvent/screenshots/device/common.png create mode 100644 UI/MultimodalEvent/screenshots/device/index.png create mode 100644 UI/MultimodalEvent/screenshots/device/key.png create mode 100644 UI/MultimodalEvent/screenshots/device/media.png create mode 100644 UI/MultimodalEvent/screenshots/device/telphone.png create mode 100644 UI/MultimodalEvent/screenshots/device/touch.png create mode 100644 UI/MultimodalEvent/settings.gradle diff --git a/UI/MultimodalEvent/README_en.md b/UI/MultimodalEvent/README_en.md new file mode 100644 index 0000000000..4a1bfdbf64 --- /dev/null +++ b/UI/MultimodalEvent/README_en.md @@ -0,0 +1,23 @@ +# Multimodal Input Standard Event + +### Introduction + +In this sample app of multimodal input, the **MultimodalEventHandle** class is used to register standard events that are derived from the base class **StandardizedEventHandle**. As such, the input events from different devices can be mapped to the standard events for processing. + +### Usage + +The home page of the sample app contains the **TouchEventHandle**, **KeyEventHandle**, **CommonEventHandle**, **MediaEventHandle**, **SystemEventHandle**, and **TelephoneEventHandle** buttons. The specific implementation is as follows: + +1. When you tap the **TouchEventHandle** button, you will be redirected to another page. If you tap the **touchEvent** button on that page, a popup dialog indicating a standard touch event will be displayed. +2. When you tap the **KeyEventHandle** button, you will be redirected to another page. If you press the volume key on the phone, a popup dialog indicating a standard key pressing event will be displayed. +3. When you tap the **CommonEventHandle** button, you will be redirected to another page. If you press the **Enter** key on the keyboard, a popup dialog indicating a standard common event will be displayed. +4. When you tap the **MediaEventHandle** button, you will be redirected to another page. If you insert the headset and press the **Play** key on the headset, a popup dialog indicating a standard media event will be displayed. +5. When you tap the **SystemEventHandle** button, you will be redirected to another page. If you press the **Back** key to go back, a popup dialog indicating a standard system event will be displayed. +6. When you tap the **TelephoneEventHandle** button, you will be redirected to another page. If you insert the headset and tap the **Call** or **End Call** button, a popup dialog indicating a standard call event will be displayed. + +### Constraints + +This sample can be run only on the standard-system devices. + +For details about the applicable devices of multimodal input standard events, see [Multimodal Input Standard Event Overview](https://developer.harmonyos.com/en/docs/documentation/doc-guides/ui-multimodal-standard-event-overview-0000001079953054). + diff --git a/UI/MultimodalEvent/README_zh.md b/UI/MultimodalEvent/README_zh.md new file mode 100644 index 0000000000..c32713f7f9 --- /dev/null +++ b/UI/MultimodalEvent/README_zh.md @@ -0,0 +1,23 @@ +# 多模输入事件标准化 + +##### 简介 + +本示例通过提供处理标准化事件的类MultimodalEventHandle对标准化基类StandardizedEventHandle衍生出来的其它标准化事件进行注册,然后对相应的事件进行处理,将不同输入设备的输入事件映射到标准化事件上。 + +##### 使用说明 + +本示例主页面包含触摸类标准化事件按钮、按键类标准化事件按钮 、通用类标准化事件按钮、媒体类标准化事件按钮、系统类标准化事件按钮、通话类标准化事件按钮: + +1. 当点击触摸类标准化事件按钮时,跳转到另一个页面,用手指触摸当前页面上的触摸事件按钮,页面上会弹出提示框显示触摸类标准化事件; +2. 当点击按键类标准化事件按钮时,跳转到另一个页面,按手机的音量键,页面上会弹出提示框显示按键类标准化事件; +3. 当点击通用类标准化事件按钮时,跳转到另一个页面,按键盘上的Enter键,页面上会弹出提示框显示通用类标准化事件; +4. 当点击媒体类标准化事件按钮时,跳转到另一个页面,插入耳机按播放键,页面上会弹出提示框显示媒体类标准化事件; +5. 当点击系统类标准化事件按钮时,跳转到另一个页面,执行返回操作,页面上会弹出提示框显示系统类标准化事件; +6. 当点击通话类标准化事件按钮时,跳转到另一个页面,插入耳机按拨打电话或挂断电话键,页面上会弹出提示框显示通话类标准化事件。 + +##### 约束与限制 + +本示例仅支持在标准系统上运行; + +多模输入事件标准化适用设备情况请[点击链接](https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ui-multimodal-standard-event-overview-0000001079953054)查看。 + diff --git a/UI/MultimodalEvent/build.gradle b/UI/MultimodalEvent/build.gradle new file mode 100644 index 0000000000..53acf4ea9a --- /dev/null +++ b/UI/MultimodalEvent/build.gradle @@ -0,0 +1,35 @@ +apply plugin: 'com.huawei.ohos.app' + +ohos { + compileSdkVersion 5 + defaultConfig { + compatibleSdkVersion 4 + } +} + +buildscript { + repositories { + maven { + url 'https://repo.huaweicloud.com/repository/maven/' + } + maven { + url 'https://developer.huawei.com/repo/' + } + jcenter() + } + dependencies { + classpath 'com.huawei.ohos:hap:2.4.4.2' + } +} + +allprojects { + repositories { + maven { + url 'https://repo.huaweicloud.com/repository/maven/' + } + maven { + url 'https://developer.huawei.com/repo/' + } + jcenter() + } +} diff --git a/UI/MultimodalEvent/entry/build.gradle b/UI/MultimodalEvent/entry/build.gradle new file mode 100644 index 0000000000..b6bee94b66 --- /dev/null +++ b/UI/MultimodalEvent/entry/build.gradle @@ -0,0 +1,21 @@ +apply plugin: 'com.huawei.ohos.hap' +ohos { + compileSdkVersion 5 + defaultConfig { + compatibleSdkVersion 4 + } + buildTypes { + release { + proguardOpt { + proguardEnabled false + rulesFiles 'proguard-rules.pro' + } + } + } + +} + +dependencies { + implementation fileTree(dir: 'libs', include: ['*.jar', '*.har']) +} + diff --git a/UI/MultimodalEvent/entry/src/main/config.json b/UI/MultimodalEvent/entry/src/main/config.json new file mode 100644 index 0000000000..f5d1a51b26 --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/config.json @@ -0,0 +1,43 @@ +{ + "app": { + "bundleName": "ohos.samples.multimodalevent", + "version": { + "code": 1000000, + "name": "1.0" + } + }, + "deviceConfig": {}, + "module": { + "package": "ohos.samples.multimodalevent", + "name": ".MyApplication", + "deviceType": [ + "default" + ], + "distro": { + "deliveryWithInstall": true, + "moduleName": "entry", + "moduleType": "entry" + }, + "abilities": [ + { + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + "orientation": "unspecified", + "name": "ohos.samples.multimodalevent.MainAbility", + "icon": "$media:icon", + "description": "$string:mainability_description", + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + } + ] + } +} \ No newline at end of file diff --git a/UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/MainAbility.java b/UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/MainAbility.java new file mode 100644 index 0000000000..213659636a --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/MainAbility.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ohos.samples.multimodalevent; + +import ohos.samples.multimodalevent.slice.MainAbilitySlice; +import ohos.aafwk.ability.Ability; +import ohos.aafwk.content.Intent; + +/** + * MainAbility + * + * @since 2021-05-24 + */ +public class MainAbility extends Ability { + @Override + public void onStart(Intent intent) { + super.onStart(intent); + super.setMainRoute(MainAbilitySlice.class.getName()); + } +} diff --git a/UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/MyApplication.java b/UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/MyApplication.java new file mode 100644 index 0000000000..d31a6d0181 --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/MyApplication.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ohos.samples.multimodalevent; + +import ohos.aafwk.ability.AbilityPackage; + +/** + * MyApplication + * + * @since 2021-05-24 + */ +public class MyApplication extends AbilityPackage { + @Override + public void onInitialize() { + super.onInitialize(); + } +} diff --git a/UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/slice/CommonEventAbilitySlice.java b/UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/slice/CommonEventAbilitySlice.java new file mode 100644 index 0000000000..09578c4348 --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/slice/CommonEventAbilitySlice.java @@ -0,0 +1,147 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ohos.samples.multimodalevent.slice; + +import ohos.aafwk.ability.AbilitySlice; +import ohos.aafwk.content.Intent; +import ohos.app.Context; +import ohos.hiviewdfx.HiLog; +import ohos.hiviewdfx.HiLogLabel; +import ohos.multimodalinput.event.MultimodalEvent; +import ohos.multimodalinput.standard.CommonEventHandle; +import ohos.multimodalinput.standard.MultimodalEventHandle; +import ohos.samples.multimodalevent.ResourceTable; +import ohos.samples.multimodalevent.utils.Utils; + +import java.lang.ref.WeakReference; + +/** + * CommonEventAbilitySlice + * + * @since 2021-05-25 + */ +public class CommonEventAbilitySlice extends AbilitySlice { + private static final String TAG = "CommonEventAbilitySlice"; + + private static final HiLogLabel LABEL_LOG = new HiLogLabel(3, 0xD000F00, TAG); + + private String message = "This is CommonEvent"; + + private Utils utils = Utils.getInstance(); + + private CommonEventHandle commonEventHandle = new CommonEventHandle() { + @Override + public boolean onShowMenu(MultimodalEvent multimodalEvent) { + return false; + } + + @Override + public boolean onSend(MultimodalEvent multimodalEvent) { + return false; + } + + @Override + public boolean onCopy(MultimodalEvent multimodalEvent) { + HiLog.info(LABEL_LOG, "onCopy"); + if (multimodalEvent != null) { + showCommonEvent(); + } + return false; + } + + @Override + public boolean onPaste(MultimodalEvent multimodalEvent) { + HiLog.info(LABEL_LOG, "onPaste"); + if (multimodalEvent != null) { + showCommonEvent(); + } + return false; + } + + @Override + public boolean onCut(MultimodalEvent multimodalEvent) { + return false; + } + + @Override + public boolean onUndo(MultimodalEvent multimodalEvent) { + return false; + } + + @Override + public boolean onRefresh(MultimodalEvent multimodalEvent) { + return false; + } + + @Override + public boolean onStartDrag(MultimodalEvent multimodalEvent) { + return false; + } + + @Override + public boolean onCancel(MultimodalEvent multimodalEvent) { + return false; + } + + @Override + public boolean onEnter(MultimodalEvent multimodalEvent) { + HiLog.info(LABEL_LOG, "onEnter"); + if (multimodalEvent != null) { + showCommonEvent(); + } + return false; + } + + @Override + public boolean onPrevious(MultimodalEvent multimodalEvent) { + return false; + } + + @Override + public boolean onNext(MultimodalEvent multimodalEvent) { + return false; + } + + @Override + public boolean onBack(MultimodalEvent multimodalEvent) { + return false; + } + + @Override + public boolean onPrint(MultimodalEvent multimodalEvent) { + return false; + } + }; + + @Override + public void onStart(Intent intent) { + super.onStart(intent); + super.setUIContent(ResourceTable.Layout_common_event_ability_slice); + MultimodalEventHandle.registerStandardizedEventHandle(getAbility(), commonEventHandle); + } + + private void showCommonEvent() { + WeakReference referenceContext = new WeakReference<>(getContext()); + utils.showDialogBox(message, referenceContext.get()); + } + + @Override + protected void onStop() { + super.onStop(); + utils.distroyDialogBox(); + MultimodalEventHandle.unregisterStandardizedEventHandle(getAbility(), commonEventHandle); + } +} diff --git a/UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/slice/KeyEventAbilitySclice.java b/UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/slice/KeyEventAbilitySclice.java new file mode 100644 index 0000000000..1c970029cd --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/slice/KeyEventAbilitySclice.java @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ohos.samples.multimodalevent.slice; + +import ohos.aafwk.ability.AbilitySlice; +import ohos.aafwk.content.Intent; +import ohos.app.Context; +import ohos.hiviewdfx.HiLog; +import ohos.hiviewdfx.HiLogLabel; +import ohos.multimodalinput.standard.KeyEventHandle; +import ohos.multimodalinput.standard.MultimodalEventHandle; +import ohos.samples.multimodalevent.ResourceTable; +import ohos.samples.multimodalevent.utils.Utils; + +import java.lang.ref.WeakReference; + +/** + * KeyEventAbilitySclice + * + * @since 2021-05-24 + */ +public class KeyEventAbilitySclice extends AbilitySlice { + private static final String TAG = "KeyEventAbilitySclice"; + + private static final HiLogLabel LABEL_LOG = new HiLogLabel(3, 0xD000F00, TAG); + + /** + * BACK_KEY_CODE BACK KEY KEYCODE + */ + private static final int BACK_KEY_CODE = 2; + + private String message = "This is keyEvent"; + + private Utils utils = Utils.getInstance(); + + private KeyEventHandle keyEventHandle = keyEvent -> { + HiLog.info(LABEL_LOG, "keyEvent"); + if (keyEvent != null && keyEvent.isKeyDown()) { + int keyCode = keyEvent.getKeyCode(); + if (keyCode != BACK_KEY_CODE) { + showKeyEvent(); + } + } + return false; + }; + + @Override + protected void onStart(Intent intent) { + super.onStart(intent); + setUIContent(ResourceTable.Layout_key_event_ability_slice); + MultimodalEventHandle.registerStandardizedEventHandle(getAbility(), keyEventHandle); + } + + private void showKeyEvent() { + WeakReference referenceContext = new WeakReference<>(getContext()); + utils.showDialogBox(message, referenceContext.get()); + } + + @Override + protected void onStop() { + super.onStop(); + utils.distroyDialogBox(); + MultimodalEventHandle.unregisterStandardizedEventHandle(getAbility(), keyEventHandle); + } +} diff --git a/UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/slice/MainAbilitySlice.java b/UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/slice/MainAbilitySlice.java new file mode 100644 index 0000000000..aabf4cf9f0 --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/slice/MainAbilitySlice.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ohos.samples.multimodalevent.slice; + +import ohos.agp.components.Component; +import ohos.samples.multimodalevent.ResourceTable; +import ohos.aafwk.ability.AbilitySlice; +import ohos.aafwk.content.Intent; + +/** + * MainAbilitySlice + * + * @since 2021-05-24 + */ +public class MainAbilitySlice extends AbilitySlice { + @Override + public void onStart(Intent intent) { + super.onStart(intent); + super.setUIContent(ResourceTable.Layout_main_ability_slice); + initComponents(); + } + + private void initComponents() { + Component componentTouch = findComponentById(ResourceTable.Id_touch_event); + componentTouch.setClickedListener(listener -> present(new TouchEventAbilitySlice(), new Intent())); + Component componentKey = findComponentById(ResourceTable.Id_key_event); + componentKey.setClickedListener(listener -> present(new KeyEventAbilitySclice(), new Intent())); + Component componentMedia = findComponentById(ResourceTable.Id_media_event); + componentMedia.setClickedListener(listener -> present(new MediaEventAbilitySlice(), new Intent())); + Component componentSystem = findComponentById(ResourceTable.Id_system_event); + componentSystem.setClickedListener(listener -> present(new SystemEventAbilitySlice(), new Intent())); + Component componentCommon = findComponentById(ResourceTable.Id_common_event); + componentCommon.setClickedListener(listener -> present(new CommonEventAbilitySlice(), new Intent())); + Component componentTel = findComponentById(ResourceTable.Id_telephone_event); + componentTel.setClickedListener(listener -> present(new TelephoneEventAbilitySlice(), new Intent())); + } + +} diff --git a/UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/slice/MediaEventAbilitySlice.java b/UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/slice/MediaEventAbilitySlice.java new file mode 100644 index 0000000000..e1a3004181 --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/slice/MediaEventAbilitySlice.java @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ohos.samples.multimodalevent.slice; + +import ohos.aafwk.ability.AbilitySlice; +import ohos.aafwk.content.Intent; +import ohos.app.Context; +import ohos.hiviewdfx.HiLog; +import ohos.hiviewdfx.HiLogLabel; +import ohos.multimodalinput.event.MultimodalEvent; +import ohos.multimodalinput.standard.MediaEventHandle; +import ohos.multimodalinput.standard.MultimodalEventHandle; +import ohos.samples.multimodalevent.ResourceTable; +import ohos.samples.multimodalevent.utils.Utils; + +import java.lang.ref.WeakReference; + +/** + * MediaEventAbilitySlice + * + * @since 2021-05-24 + */ +public class MediaEventAbilitySlice extends AbilitySlice { + private static final String TAG = "MediaEventAbilitySlice"; + + private static final HiLogLabel LABEL_LOG = new HiLogLabel(3, 0xD000F00, TAG); + + private String message = "This is mediaEvent"; + + private Utils utils = Utils.getInstance(); + + private MediaEventHandle mediaEventHandle = new MediaEventHandle() { + @Override + public boolean onPlay(MultimodalEvent multimodalEvent) { + HiLog.info(LABEL_LOG, "onPlay"); + return false; + } + + @Override + public boolean onPause(MultimodalEvent multimodalEvent) { + HiLog.info(LABEL_LOG, "onPause"); + return false; + } + + @Override + public boolean onMediaControl(MultimodalEvent multimodalEvent) { + HiLog.info(LABEL_LOG, "onMediaControl"); + if (multimodalEvent != null) { + showMediaEvent(); + } + return false; + } + }; + + @Override + protected void onStart(Intent intent) { + super.onStart(intent); + setUIContent(ResourceTable.Layout_media_event_ability_slice); + MultimodalEventHandle.registerStandardizedEventHandle(getAbility(), mediaEventHandle); + } + + private void showMediaEvent() { + WeakReference referenceContext = new WeakReference<>(getContext()); + utils.showDialogBox(message, referenceContext.get()); + } + + @Override + protected void onStop() { + super.onStop(); + utils.distroyDialogBox(); + MultimodalEventHandle.unregisterStandardizedEventHandle(getAbility(), mediaEventHandle); + } +} diff --git a/UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/slice/SystemEventAbilitySlice.java b/UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/slice/SystemEventAbilitySlice.java new file mode 100644 index 0000000000..6a3e188507 --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/slice/SystemEventAbilitySlice.java @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ohos.samples.multimodalevent.slice; + +import ohos.aafwk.ability.AbilitySlice; +import ohos.aafwk.content.Intent; +import ohos.app.Context; +import ohos.hiviewdfx.HiLog; +import ohos.hiviewdfx.HiLogLabel; +import ohos.multimodalinput.event.MultimodalEvent; +import ohos.multimodalinput.standard.MultimodalEventHandle; +import ohos.multimodalinput.standard.SystemEventHandle; +import ohos.samples.multimodalevent.ResourceTable; +import ohos.samples.multimodalevent.utils.Utils; + +import java.lang.ref.WeakReference; + +/** + * SystemEventAbilitySlice + * + * @since 2021-05-25 + */ +public class SystemEventAbilitySlice extends AbilitySlice { + private static final String TAG = "SystemEventAbilitySlice"; + + private static final HiLogLabel LABEL_LOG = new HiLogLabel(3, 0xD000F00, TAG); + + private String message = "Page closed"; + + private Utils utils = Utils.getInstance(); + + private SystemEventHandle systemEventHandle = new SystemEventHandle() { + @Override + public boolean onMute(MultimodalEvent multimodalEvent) { + return false; + } + + @Override + public boolean onClosePage(MultimodalEvent multimodalEvent) { + HiLog.info(LABEL_LOG, "onClosePage"); + if (multimodalEvent != null) { + showSystemEvent(); + } + return false; + } + }; + + @Override + protected void onStart(Intent intent) { + super.onStart(intent); + setUIContent(ResourceTable.Layout_system_event_ability_slice); + MultimodalEventHandle.registerStandardizedEventHandle(getAbility(), systemEventHandle); + } + + private void showSystemEvent() { + WeakReference referenceContext = new WeakReference<>(getContext()); + utils.showDialogBox(message, referenceContext.get()); + } + + @Override + protected void onStop() { + super.onStop(); + utils.distroyDialogBox(); + MultimodalEventHandle.unregisterStandardizedEventHandle(getAbility(), systemEventHandle); + } +} diff --git a/UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/slice/TelephoneEventAbilitySlice.java b/UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/slice/TelephoneEventAbilitySlice.java new file mode 100644 index 0000000000..59da82a34b --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/slice/TelephoneEventAbilitySlice.java @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ohos.samples.multimodalevent.slice; + +import ohos.aafwk.ability.AbilitySlice; +import ohos.aafwk.content.Intent; +import ohos.app.Context; +import ohos.hiviewdfx.HiLog; +import ohos.hiviewdfx.HiLogLabel; +import ohos.multimodalinput.event.MultimodalEvent; +import ohos.multimodalinput.standard.MultimodalEventHandle; +import ohos.multimodalinput.standard.TelephoneEventHandle; +import ohos.samples.multimodalevent.ResourceTable; +import ohos.samples.multimodalevent.utils.Utils; + +import java.lang.ref.WeakReference; + +/** + * TelephoneEventAbilitySlice + * + * @since 2021-05-24 + */ +public class TelephoneEventAbilitySlice extends AbilitySlice { + private static final String TAG = "TelephoneEventAbilitySlice"; + + private static final HiLogLabel LABEL_LOG = new HiLogLabel(3, 0xD000F00, TAG); + + private String message = "This is showTelephoneEvent"; + + private Utils utils = Utils.getInstance(); + + private TelephoneEventHandle telephoneEventHandle = new TelephoneEventHandle() { + @Override + public boolean onAnswer(MultimodalEvent multimodalEvent) { + return false; + } + + @Override + public boolean onRefuse(MultimodalEvent multimodalEvent) { + return false; + } + + @Override + public boolean onHangup(MultimodalEvent multimodalEvent) { + return false; + } + + @Override + public boolean onTelephoneControl(MultimodalEvent multimodalEvent) { + HiLog.info(LABEL_LOG, "onTelephoneControl"); + if (multimodalEvent != null) { + showTelphoneEvent(); + } + return false; + } + }; + + private void showTelphoneEvent() { + WeakReference referenceContext = new WeakReference<>(getContext()); + utils.showDialogBox(message, referenceContext.get()); + } + + @Override + protected void onStart(Intent intent) { + super.onStart(intent); + setUIContent(ResourceTable.Layout_tel_event_ability_slice); + MultimodalEventHandle.registerStandardizedEventHandle(getAbility(), telephoneEventHandle); + } + + @Override + protected void onStop() { + super.onStop(); + utils.distroyDialogBox(); + MultimodalEventHandle.unregisterStandardizedEventHandle(getAbility(), telephoneEventHandle); + } +} diff --git a/UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/slice/TouchEventAbilitySlice.java b/UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/slice/TouchEventAbilitySlice.java new file mode 100644 index 0000000000..c1ab7a2483 --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/slice/TouchEventAbilitySlice.java @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ohos.samples.multimodalevent.slice; + +import ohos.aafwk.ability.AbilitySlice; +import ohos.aafwk.content.Intent; +import ohos.app.Context; +import ohos.hiviewdfx.HiLog; +import ohos.hiviewdfx.HiLogLabel; +import ohos.multimodalinput.standard.MultimodalEventHandle; +import ohos.multimodalinput.standard.TouchEventHandle; +import ohos.samples.multimodalevent.ResourceTable; +import ohos.samples.multimodalevent.utils.Utils; + +import java.lang.ref.WeakReference; + +/** + * TouchEventAbilitySlice + * + * @since 2021-05-24 + */ +public class TouchEventAbilitySlice extends AbilitySlice { + private static final String TAG = "TouchEventAbilitySlice"; + + private static final HiLogLabel LABEL_LOG = new HiLogLabel(3, 0xD000F00, TAG); + + private static int count = 0; + + private String message = "This is touchEvent"; + + private Utils utils = Utils.getInstance(); + + private TouchEventHandle touchEventHandle = touchEvent -> { + HiLog.info(LABEL_LOG, "ontouch touchevent2"); + if (touchEvent != null) { + if (count > 0) { + return false; + } + count++; + showTouchEvent(); + } + return false; + }; + + private void showTouchEvent() { + WeakReference referenceContext = new WeakReference<>(getContext()); + utils.showDialogBox(message, referenceContext.get()); + } + + @Override + protected void onStart(Intent intent) { + super.onStart(intent); + setUIContent(ResourceTable.Layout_touch_event_ability_slice); + MultimodalEventHandle.registerStandardizedEventHandle(getAbility(), touchEventHandle); + } + + @Override + protected void onStop() { + super.onStop(); + utils.distroyDialogBox(); + MultimodalEventHandle.unregisterStandardizedEventHandle(getAbility(), touchEventHandle); + } +} diff --git a/UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/utils/Utils.java b/UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/utils/Utils.java new file mode 100644 index 0000000000..a06239845c --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/java/ohos/samples/multimodalevent/utils/Utils.java @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ohos.samples.multimodalevent.utils; + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Locale; + +import ohos.agp.utils.TextAlignment; +import ohos.agp.window.dialog.ListDialog; +import ohos.app.Context; + +import static ohos.agp.components.ComponentContainer.LayoutConfig.MATCH_CONTENT; + +/** + * Utils + * + * @since 2021-06-08 + */ +public class Utils { + private static final int DIALOG_BOX_WIDTH = 985; + + /** + * listDialog ListDialog + */ + private ListDialog listDialog; + + private static Utils instance; + + private Utils() { + } + + public static synchronized Utils getInstance() { + if (instance == null) { + instance = new Utils(); + } + return instance; + } + + /** + * showDialogBox + * + * @param message string + * @param context Context + */ + public void showDialogBox(String message, Context context) { + listDialog = new ListDialog(context); + listDialog.setAlignment(TextAlignment.CENTER); + listDialog.setSize(DIALOG_BOX_WIDTH, MATCH_CONTENT); + listDialog.setAutoClosable(true); + String[] items = new String[]{ + message, "Current Time:" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", + Locale.getDefault()).format(new Date().getTime()) + }; + listDialog.setItems(items); + listDialog.show(); + } + + /** + * showDialogBox + */ + public void distroyDialogBox() { + if (listDialog != null) { + listDialog.destroy(); + } + } +} diff --git a/UI/MultimodalEvent/entry/src/main/resources/base/element/color.json b/UI/MultimodalEvent/entry/src/main/resources/base/element/color.json new file mode 100644 index 0000000000..9c4751cd0d --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/resources/base/element/color.json @@ -0,0 +1,64 @@ +{ + "color": [ + { + "name": "color_button_blue_empty", + "value": "#0000FF" + }, + { + "name": "color_button_blue_pressed", + "value": "#0000CC" + }, + { + "name": "color_button_blue_text", + "value": "#FFFFFF" + }, + { + "name": "color_button_gray_empty", + "value": "#E5E5E5" + }, + { + "name": "color_button_gray_pressed", + "value": "#D0D0D0" + }, + { + "name": "color_button_gray_text", + "value": "#0F0F0F" + }, + { + "name": "color_button_white_empty", + "value": "#FAFAFA" + }, + { + "name": "color_button_white_pressed", + "value": "#E5E5E5" + }, + { + "name": "color_button_white_text", + "value": "#0F0F0F" + }, + { + "name": "color_transparent", + "value": "#00000000" + }, + { + "name": "color_white", + "value": "#FFFFFF" + }, + { + "name": "color_dialog_title_text", + "value": "#000000" + }, + { + "name": "color_dialog_content_text", + "value": "#5F5F5F" + }, + { + "name": "color_dialog_button_text_blue", + "value": "#0044FF" + }, + { + "name": "color_dialog_button_line", + "value": "#9F9F9F" + } + ] +} \ No newline at end of file diff --git a/UI/MultimodalEvent/entry/src/main/resources/base/element/float.json b/UI/MultimodalEvent/entry/src/main/resources/base/element/float.json new file mode 100644 index 0000000000..39d19dd54f --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/resources/base/element/float.json @@ -0,0 +1,44 @@ +{ + "float": [ + { + "name": "button_height", + "value": "40vp" + }, + { + "name": "button_width", + "value": "280vp" + }, + { + "name": "button_margin", + "value": "10vp" + }, + { + "name": "button_text_size", + "value": "18fp" + }, + { + "name": "dialog_padding", + "value": "20vp" + }, + { + "name": "dialog_content_padding", + "value": "10vp" + }, + { + "name": "title_text_size", + "value": "18fp" + }, + { + "name": "content_text_size", + "value": "16fp" + }, + { + "name": "dialog_button_height", + "value": "40vp" + }, + { + "name": "dialog_check_box_size", + "value": "20vp" + } + ] +} \ No newline at end of file diff --git a/UI/MultimodalEvent/entry/src/main/resources/base/element/string.json b/UI/MultimodalEvent/entry/src/main/resources/base/element/string.json new file mode 100644 index 0000000000..f198b9d448 --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/resources/base/element/string.json @@ -0,0 +1,64 @@ +{ + "string": [ + { + "name": "app_name", + "value": "MultimodalEvent" + }, + { + "name": "mainability_description", + "value": "Java_Phone_Empty Feature Ability" + }, + { + "name": "key_text", + "value": "Please Press Key" + }, + { + "name": "media_text", + "value": "Sound Player" + }, + { + "name": "system_text", + "value": "Please Close Page" + }, + { + "name": "common_enter_text", + "value": "Please Press Enter Key" + }, + { + "name": "sound_player", + "value": "Sound Player" + }, + { + "name": "please_play", + "value": "Please Play" + }, + { + "name": "touch_event_handle", + "value": "TouchEventHandle" + }, + { + "name": "key_event_handle", + "value": "KeyEventHandle" + }, + { + "name": "common_event_handle", + "value": "CommonEventHandle" + }, + { + "name": "media_event_handle", + "value": "MediaEventHandle" + }, + { + "name": "system_event_handle", + "value": "SystemEventHandle" + }, + { + "name": "telephone_event_handle", + "value": "TelephoneEventHandle" + }, + { + "name": "touch_event", + "value": "TouchEvent" + } + ] +} \ No newline at end of file diff --git a/UI/MultimodalEvent/entry/src/main/resources/base/graphic/background_ability_main.xml b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/background_ability_main.xml new file mode 100644 index 0000000000..44fb138779 --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/background_ability_main.xml @@ -0,0 +1,20 @@ + + + + + \ No newline at end of file diff --git a/UI/MultimodalEvent/entry/src/main/resources/base/graphic/background_button_element.xml b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/background_button_element.xml new file mode 100644 index 0000000000..03369baa8b --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/background_button_element.xml @@ -0,0 +1,23 @@ + + + + + + + \ No newline at end of file diff --git a/UI/MultimodalEvent/entry/src/main/resources/base/graphic/background_dialog.xml b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/background_dialog.xml new file mode 100644 index 0000000000..3602061530 --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/background_dialog.xml @@ -0,0 +1,21 @@ + + + + + + \ No newline at end of file diff --git a/UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_bg.xml b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_bg.xml new file mode 100644 index 0000000000..6fd0ed08ca --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_bg.xml @@ -0,0 +1,23 @@ + + + + + + + \ No newline at end of file diff --git a/UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_blue.xml b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_blue.xml new file mode 100644 index 0000000000..c7ac8a58fa --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_blue.xml @@ -0,0 +1,22 @@ + + + + + + \ No newline at end of file diff --git a/UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_blue_empty.xml b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_blue_empty.xml new file mode 100644 index 0000000000..7d0ecf30a5 --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_blue_empty.xml @@ -0,0 +1,21 @@ + + + + + + \ No newline at end of file diff --git a/UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_blue_pressed.xml b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_blue_pressed.xml new file mode 100644 index 0000000000..1d11532e05 --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_blue_pressed.xml @@ -0,0 +1,21 @@ + + + + + + \ No newline at end of file diff --git a/UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_gray.xml b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_gray.xml new file mode 100644 index 0000000000..8f28594239 --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_gray.xml @@ -0,0 +1,22 @@ + + + + + + \ No newline at end of file diff --git a/UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_gray_empty.xml b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_gray_empty.xml new file mode 100644 index 0000000000..20ffd312b5 --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_gray_empty.xml @@ -0,0 +1,21 @@ + + + + + + \ No newline at end of file diff --git a/UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_gray_pressed.xml b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_gray_pressed.xml new file mode 100644 index 0000000000..29132e747d --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_gray_pressed.xml @@ -0,0 +1,21 @@ + + + + + + \ No newline at end of file diff --git a/UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_white.xml b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_white.xml new file mode 100644 index 0000000000..4e0079165a --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_white.xml @@ -0,0 +1,22 @@ + + + + + + \ No newline at end of file diff --git a/UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_white_empty.xml b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_white_empty.xml new file mode 100644 index 0000000000..d4bb25a22b --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_white_empty.xml @@ -0,0 +1,21 @@ + + + + + + \ No newline at end of file diff --git a/UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_white_pressed.xml b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_white_pressed.xml new file mode 100644 index 0000000000..b90569bb1a --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/button_white_pressed.xml @@ -0,0 +1,21 @@ + + + + + + \ No newline at end of file diff --git a/UI/MultimodalEvent/entry/src/main/resources/base/graphic/dialog_button.xml b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/dialog_button.xml new file mode 100644 index 0000000000..174065f8b2 --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/dialog_button.xml @@ -0,0 +1,22 @@ + + + + + + \ No newline at end of file diff --git a/UI/MultimodalEvent/entry/src/main/resources/base/graphic/list_item.xml b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/list_item.xml new file mode 100644 index 0000000000..e7a8dff1bb --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/list_item.xml @@ -0,0 +1,22 @@ + + + + + + \ No newline at end of file diff --git a/UI/MultimodalEvent/entry/src/main/resources/base/graphic/list_item_clicked.xml b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/list_item_clicked.xml new file mode 100644 index 0000000000..5242e7b270 --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/list_item_clicked.xml @@ -0,0 +1,20 @@ + + + + + \ No newline at end of file diff --git a/UI/MultimodalEvent/entry/src/main/resources/base/graphic/list_item_nomral.xml b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/list_item_nomral.xml new file mode 100644 index 0000000000..85330edb5f --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/list_item_nomral.xml @@ -0,0 +1,20 @@ + + + + + \ No newline at end of file diff --git a/UI/MultimodalEvent/entry/src/main/resources/base/graphic/single_box.xml b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/single_box.xml new file mode 100644 index 0000000000..9e5a6084e7 --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/single_box.xml @@ -0,0 +1,22 @@ + + + + + + \ No newline at end of file diff --git a/UI/MultimodalEvent/entry/src/main/resources/base/graphic/single_box_checked.xml b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/single_box_checked.xml new file mode 100644 index 0000000000..349249c0e2 --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/single_box_checked.xml @@ -0,0 +1,25 @@ + + + + + + + + \ No newline at end of file diff --git a/UI/MultimodalEvent/entry/src/main/resources/base/graphic/single_box_normal.xml b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/single_box_normal.xml new file mode 100644 index 0000000000..28f162a2a9 --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/single_box_normal.xml @@ -0,0 +1,25 @@ + + + + + + + + \ No newline at end of file diff --git a/UI/MultimodalEvent/entry/src/main/resources/base/graphic/textfield_bg.xml b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/textfield_bg.xml new file mode 100644 index 0000000000..50e311561e --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/resources/base/graphic/textfield_bg.xml @@ -0,0 +1,26 @@ + + + + + + + + \ No newline at end of file diff --git a/UI/MultimodalEvent/entry/src/main/resources/base/layout/common_event_ability_slice.xml b/UI/MultimodalEvent/entry/src/main/resources/base/layout/common_event_ability_slice.xml new file mode 100644 index 0000000000..d2c748c693 --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/resources/base/layout/common_event_ability_slice.xml @@ -0,0 +1,39 @@ + + + + + + + \ No newline at end of file diff --git a/UI/MultimodalEvent/entry/src/main/resources/base/layout/key_event_ability_slice.xml b/UI/MultimodalEvent/entry/src/main/resources/base/layout/key_event_ability_slice.xml new file mode 100644 index 0000000000..b302ee3a0b --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/resources/base/layout/key_event_ability_slice.xml @@ -0,0 +1,33 @@ + + + + + + + \ No newline at end of file diff --git a/UI/MultimodalEvent/entry/src/main/resources/base/layout/main_ability_slice.xml b/UI/MultimodalEvent/entry/src/main/resources/base/layout/main_ability_slice.xml new file mode 100644 index 0000000000..f8b4fbc387 --- /dev/null +++ b/UI/MultimodalEvent/entry/src/main/resources/base/layout/main_ability_slice.xml @@ -0,0 +1,106 @@ + + + + + +