diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..a6ebb99 Binary files /dev/null and b/.DS_Store differ diff --git a/Assignment_for_Intents__Serialization.docx b/Assignment_for_Intents__Serialization.docx index b686fe9..c090dad 100644 Binary files a/Assignment_for_Intents__Serialization.docx and b/Assignment_for_Intents__Serialization.docx differ diff --git a/Intents_and_serialization b/Intents_and_serialization new file mode 160000 index 0000000..1e89fc6 --- /dev/null +++ b/Intents_and_serialization @@ -0,0 +1 @@ +Subproject commit 1e89fc65e5d198a9109d64656415245411acc0a9 diff --git a/UI_Components_and_Layouts/.DS_Store b/UI_Components_and_Layouts/.DS_Store new file mode 100644 index 0000000..7de2b65 Binary files /dev/null and b/UI_Components_and_Layouts/.DS_Store differ diff --git a/UI_Components_and_Layouts/build.gradle b/UI_Components_and_Layouts/build.gradle new file mode 100644 index 0000000..29cfcd9 --- /dev/null +++ b/UI_Components_and_Layouts/build.gradle @@ -0,0 +1,38 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. +apply plugin: 'com.huawei.ohos.app' + +//For instructions on signature configuration, see https://developer.harmonyos.com/en/docs/documentation/doc-guides/ide_debug_device-0000001053822404#EN-US_TOPIC_0000001154985555__section1112183053510 +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' + classpath 'com.huawei.ohos:decctest:1.2.4.0' + } +} + +allprojects { + repositories { + maven { + url 'https://repo.huaweicloud.com/repository/maven/' + } + maven { + url 'https://developer.huawei.com/repo/' + } + jcenter() + } +} diff --git a/UI_Components_and_Layouts/build/outputs/hap/debug/car/entry-debug-rich-unsigned.hap b/UI_Components_and_Layouts/build/outputs/hap/debug/car/entry-debug-rich-unsigned.hap new file mode 100644 index 0000000..f19c079 Binary files /dev/null and b/UI_Components_and_Layouts/build/outputs/hap/debug/car/entry-debug-rich-unsigned.hap differ diff --git a/UI_Components_and_Layouts/build/outputs/hap/debug/phone/entry-debug-rich-unsigned.hap b/UI_Components_and_Layouts/build/outputs/hap/debug/phone/entry-debug-rich-unsigned.hap new file mode 100644 index 0000000..f19c079 Binary files /dev/null and b/UI_Components_and_Layouts/build/outputs/hap/debug/phone/entry-debug-rich-unsigned.hap differ diff --git a/UI_Components_and_Layouts/build/outputs/hap/debug/tablet/entry-debug-rich-unsigned.hap b/UI_Components_and_Layouts/build/outputs/hap/debug/tablet/entry-debug-rich-unsigned.hap new file mode 100644 index 0000000..f19c079 Binary files /dev/null and b/UI_Components_and_Layouts/build/outputs/hap/debug/tablet/entry-debug-rich-unsigned.hap differ diff --git a/UI_Components_and_Layouts/build/outputs/hap/debug/tv/entry-debug-rich-unsigned.hap b/UI_Components_and_Layouts/build/outputs/hap/debug/tv/entry-debug-rich-unsigned.hap new file mode 100644 index 0000000..f19c079 Binary files /dev/null and b/UI_Components_and_Layouts/build/outputs/hap/debug/tv/entry-debug-rich-unsigned.hap differ diff --git a/UI_Components_and_Layouts/build/outputs/hap/debug/wearable/entry-debug-rich-unsigned.hap b/UI_Components_and_Layouts/build/outputs/hap/debug/wearable/entry-debug-rich-unsigned.hap new file mode 100644 index 0000000..f19c079 Binary files /dev/null and b/UI_Components_and_Layouts/build/outputs/hap/debug/wearable/entry-debug-rich-unsigned.hap differ diff --git a/UI_Components_and_Layouts/entry/.DS_Store b/UI_Components_and_Layouts/entry/.DS_Store new file mode 100644 index 0000000..9a874b5 Binary files /dev/null and b/UI_Components_and_Layouts/entry/.DS_Store differ diff --git a/UI_Components_and_Layouts/entry/.gitignore b/UI_Components_and_Layouts/entry/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/UI_Components_and_Layouts/entry/.gitignore @@ -0,0 +1 @@ +/build diff --git a/UI_Components_and_Layouts/entry/build.gradle b/UI_Components_and_Layouts/entry/build.gradle new file mode 100644 index 0000000..b34f366 --- /dev/null +++ b/UI_Components_and_Layouts/entry/build.gradle @@ -0,0 +1,27 @@ +apply plugin: 'com.huawei.ohos.hap' +apply plugin: 'com.huawei.ohos.decctest' +//For instructions on signature configuration, see https://developer.harmonyos.com/en/docs/documentation/doc-guides/ide_debug_device-0000001053822404#EN-US_TOPIC_0000001154985555__section1112183053510 +ohos { + compileSdkVersion 5 + defaultConfig { + compatibleSdkVersion 4 + } + buildTypes { + release { + proguardOpt { + proguardEnabled false + rulesFiles 'proguard-rules.pro' + } + } + } + +} + +dependencies { + implementation fileTree(dir: 'libs', include: ['*.jar', '*.har']) + testImplementation 'junit:junit:4.13' + ohosTestImplementation 'com.huawei.ohos.testkit:runner:1.0.0.100' +} +decc { + supportType = ['html','xml'] +} diff --git a/UI_Components_and_Layouts/entry/proguard-rules.pro b/UI_Components_and_Layouts/entry/proguard-rules.pro new file mode 100644 index 0000000..f7666e4 --- /dev/null +++ b/UI_Components_and_Layouts/entry/proguard-rules.pro @@ -0,0 +1 @@ +# config module specific ProGuard rules here. \ No newline at end of file diff --git a/UI_Components_and_Layouts/entry/src/.DS_Store b/UI_Components_and_Layouts/entry/src/.DS_Store new file mode 100644 index 0000000..7b0d367 Binary files /dev/null and b/UI_Components_and_Layouts/entry/src/.DS_Store differ diff --git a/UI_Components_and_Layouts/entry/src/main/.DS_Store b/UI_Components_and_Layouts/entry/src/main/.DS_Store new file mode 100644 index 0000000..55c1fcb Binary files /dev/null and b/UI_Components_and_Layouts/entry/src/main/.DS_Store differ diff --git a/UI_Components_and_Layouts/entry/src/main/config.json b/UI_Components_and_Layouts/entry/src/main/config.json new file mode 100644 index 0000000..f7f4916 --- /dev/null +++ b/UI_Components_and_Layouts/entry/src/main/config.json @@ -0,0 +1,68 @@ +{ + "app": { + "bundleName": "com.ajith.assignment", + "vendor": "ajith", + "version": { + "code": 1000000, + "name": "1.0.0" + } + }, + "deviceConfig": {}, + "module": { + "package": "com.ajith.assignment", + "name": ".MyApplication", + "mainAbility": "com.ajith.assignment.MainAbility", + "deviceType": [ + "phone", + "tablet", + "tv", + "wearable", + "car" + ], + "distro": { + "deliveryWithInstall": true, + "moduleName": "entry", + "moduleType": "entry", + "installationFree": true + }, + "abilities": [ + { + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + "orientation": "unspecified", + "name": "com.ajith.assignment.MainAbility", + "icon": "$media:backbutton", + "description": "$string:mainability_description", + "label": "$string:entry_MainAbility", + "type": "page", + "launchType": "standard" + }, + { + "orientation": "unspecified", + "name": "com.ajith.assignment.MainAbility2", + "icon": "$media:backbutton", + "description": "$string:mainability2_description", + "label": "$string:entry_MainAbility2", + "type": "page", + "launchType": "standard" + }, + { + "orientation": "unspecified", + "name": "com.ajith.assignment.MainAbility3", + "icon": "$media:icon", + "description": "$string:mainability3_description", + "label": "$string:entry_MainAbility3", + "type": "page", + "launchType": "standard" + } + ] + } +} \ No newline at end of file diff --git a/UI_Components_and_Layouts/entry/src/main/java/.DS_Store b/UI_Components_and_Layouts/entry/src/main/java/.DS_Store new file mode 100644 index 0000000..35a54bf Binary files /dev/null and b/UI_Components_and_Layouts/entry/src/main/java/.DS_Store differ diff --git a/UI_Components_and_Layouts/entry/src/main/java/com/.DS_Store b/UI_Components_and_Layouts/entry/src/main/java/com/.DS_Store new file mode 100644 index 0000000..5ee7ba9 Binary files /dev/null and b/UI_Components_and_Layouts/entry/src/main/java/com/.DS_Store differ diff --git a/UI_Components_and_Layouts/entry/src/main/java/com/ajith/.DS_Store b/UI_Components_and_Layouts/entry/src/main/java/com/ajith/.DS_Store new file mode 100644 index 0000000..3bbd7ee Binary files /dev/null and b/UI_Components_and_Layouts/entry/src/main/java/com/ajith/.DS_Store differ diff --git a/UI_Components_and_Layouts/entry/src/main/java/com/ajith/assignment/MainAbility.java b/UI_Components_and_Layouts/entry/src/main/java/com/ajith/assignment/MainAbility.java new file mode 100644 index 0000000..79a9283 --- /dev/null +++ b/UI_Components_and_Layouts/entry/src/main/java/com/ajith/assignment/MainAbility.java @@ -0,0 +1,13 @@ +package com.ajith.assignment; + +import com.ajith.assignment.slice.MainAbilitySlice; +import ohos.aafwk.ability.Ability; +import ohos.aafwk.content.Intent; + +public class MainAbility extends Ability { + @Override + public void onStart(Intent intent) { + super.onStart(intent); + super.setMainRoute(MainAbilitySlice.class.getName()); + } +} diff --git a/UI_Components_and_Layouts/entry/src/main/java/com/ajith/assignment/MainAbility2.java b/UI_Components_and_Layouts/entry/src/main/java/com/ajith/assignment/MainAbility2.java new file mode 100644 index 0000000..cbd57a7 --- /dev/null +++ b/UI_Components_and_Layouts/entry/src/main/java/com/ajith/assignment/MainAbility2.java @@ -0,0 +1,13 @@ +package com.ajith.assignment; + +import com.ajith.assignment.slice.MainAbility2Slice; +import ohos.aafwk.ability.Ability; +import ohos.aafwk.content.Intent; + +public class MainAbility2 extends Ability { + @Override + public void onStart(Intent intent) { + super.onStart(intent); + super.setMainRoute(MainAbility2Slice.class.getName()); + } +} diff --git a/UI_Components_and_Layouts/entry/src/main/java/com/ajith/assignment/MainAbility3.java b/UI_Components_and_Layouts/entry/src/main/java/com/ajith/assignment/MainAbility3.java new file mode 100644 index 0000000..1e5f0cc --- /dev/null +++ b/UI_Components_and_Layouts/entry/src/main/java/com/ajith/assignment/MainAbility3.java @@ -0,0 +1,13 @@ +package com.ajith.assignment; + +import com.ajith.assignment.slice.MainAbility3Slice; +import ohos.aafwk.ability.Ability; +import ohos.aafwk.content.Intent; + +public class MainAbility3 extends Ability { + @Override + public void onStart(Intent intent) { + super.onStart(intent); + super.setMainRoute(MainAbility3Slice.class.getName()); + } +} diff --git a/UI_Components_and_Layouts/entry/src/main/java/com/ajith/assignment/MyApplication.java b/UI_Components_and_Layouts/entry/src/main/java/com/ajith/assignment/MyApplication.java new file mode 100644 index 0000000..235587d --- /dev/null +++ b/UI_Components_and_Layouts/entry/src/main/java/com/ajith/assignment/MyApplication.java @@ -0,0 +1,10 @@ +package com.ajith.assignment; + +import ohos.aafwk.ability.AbilityPackage; + +public class MyApplication extends AbilityPackage { + @Override + public void onInitialize() { + super.onInitialize(); + } +} diff --git a/UI_Components_and_Layouts/entry/src/main/java/com/ajith/assignment/slice/MainAbility2Slice.java b/UI_Components_and_Layouts/entry/src/main/java/com/ajith/assignment/slice/MainAbility2Slice.java new file mode 100644 index 0000000..19d3f84 --- /dev/null +++ b/UI_Components_and_Layouts/entry/src/main/java/com/ajith/assignment/slice/MainAbility2Slice.java @@ -0,0 +1,23 @@ +package com.ajith.assignment.slice; + +import com.ajith.assignment.ResourceTable; +import ohos.aafwk.ability.AbilitySlice; +import ohos.aafwk.content.Intent; + +public class MainAbility2Slice extends AbilitySlice { + @Override + public void onStart(Intent intent) { + super.onStart(intent); + super.setUIContent(ResourceTable.Layout_ability_main2); + } + + @Override + public void onActive() { + super.onActive(); + } + + @Override + public void onForeground(Intent intent) { + super.onForeground(intent); + } +} diff --git a/UI_Components_and_Layouts/entry/src/main/java/com/ajith/assignment/slice/MainAbility3Slice.java b/UI_Components_and_Layouts/entry/src/main/java/com/ajith/assignment/slice/MainAbility3Slice.java new file mode 100644 index 0000000..da0910b --- /dev/null +++ b/UI_Components_and_Layouts/entry/src/main/java/com/ajith/assignment/slice/MainAbility3Slice.java @@ -0,0 +1,23 @@ +package com.ajith.assignment.slice; + +import com.ajith.assignment.ResourceTable; +import ohos.aafwk.ability.AbilitySlice; +import ohos.aafwk.content.Intent; + +public class MainAbility3Slice extends AbilitySlice { + @Override + public void onStart(Intent intent) { + super.onStart(intent); + super.setUIContent(ResourceTable.Layout_ability_main3); + } + + @Override + public void onActive() { + super.onActive(); + } + + @Override + public void onForeground(Intent intent) { + super.onForeground(intent); + } +} diff --git a/UI_Components_and_Layouts/entry/src/main/java/com/ajith/assignment/slice/MainAbilitySlice.java b/UI_Components_and_Layouts/entry/src/main/java/com/ajith/assignment/slice/MainAbilitySlice.java new file mode 100644 index 0000000..0881f28 --- /dev/null +++ b/UI_Components_and_Layouts/entry/src/main/java/com/ajith/assignment/slice/MainAbilitySlice.java @@ -0,0 +1,23 @@ +package com.ajith.assignment.slice; + +import com.ajith.assignment.ResourceTable; +import ohos.aafwk.ability.AbilitySlice; +import ohos.aafwk.content.Intent; + +public class MainAbilitySlice extends AbilitySlice { + @Override + public void onStart(Intent intent) { + super.onStart(intent); + super.setUIContent(ResourceTable.Layout_ability_main); + } + + @Override + public void onActive() { + super.onActive(); + } + + @Override + public void onForeground(Intent intent) { + super.onForeground(intent); + } +} diff --git a/UI_Components_and_Layouts/entry/src/main/resources/base/element/string.json b/UI_Components_and_Layouts/entry/src/main/resources/base/element/string.json new file mode 100644 index 0000000..f684d26 --- /dev/null +++ b/UI_Components_and_Layouts/entry/src/main/resources/base/element/string.json @@ -0,0 +1,40 @@ +{ + "string": [ + { + "name": "entry_MainAbility", + "value": "entry_MainAbility" + }, + { + "name": "mainability_description", + "value": "Java_Empty Ability" + }, + { + "name": "mainability_HelloWorld", + "value": "Hello World" + }, + { + "name": "mainability2_description", + "value": "Java_Empty Ability" + }, + { + "name": "mainability2_HelloWorld", + "value": "Hello World" + }, + { + "name": "entry_MainAbility2", + "value": "entry_MainAbility2" + }, + { + "name": "mainability3_description", + "value": "Java_Empty Ability" + }, + { + "name": "mainability3_HelloWorld", + "value": "Hello World" + }, + { + "name": "entry_MainAbility3", + "value": "entry_MainAbility3" + } + ] +} \ No newline at end of file diff --git a/UI_Components_and_Layouts/entry/src/main/resources/base/graphic/Background.jpg b/UI_Components_and_Layouts/entry/src/main/resources/base/graphic/Background.jpg new file mode 100644 index 0000000..492ddd8 Binary files /dev/null and b/UI_Components_and_Layouts/entry/src/main/resources/base/graphic/Background.jpg differ diff --git a/UI_Components_and_Layouts/entry/src/main/resources/base/graphic/background_ability_main.xml b/UI_Components_and_Layouts/entry/src/main/resources/base/graphic/background_ability_main.xml new file mode 100644 index 0000000..f3bc253 --- /dev/null +++ b/UI_Components_and_Layouts/entry/src/main/resources/base/graphic/background_ability_main.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/UI_Components_and_Layouts/entry/src/main/resources/base/graphic/background_ability_main2.xml b/UI_Components_and_Layouts/entry/src/main/resources/base/graphic/background_ability_main2.xml new file mode 100644 index 0000000..7e5ae1b --- /dev/null +++ b/UI_Components_and_Layouts/entry/src/main/resources/base/graphic/background_ability_main2.xml @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/UI_Components_and_Layouts/entry/src/main/resources/base/graphic/background_ability_main3.xml b/UI_Components_and_Layouts/entry/src/main/resources/base/graphic/background_ability_main3.xml new file mode 100644 index 0000000..b82f6c0 --- /dev/null +++ b/UI_Components_and_Layouts/entry/src/main/resources/base/graphic/background_ability_main3.xml @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/UI_Components_and_Layouts/entry/src/main/resources/base/graphic/backgroundtint.xml b/UI_Components_and_Layouts/entry/src/main/resources/base/graphic/backgroundtint.xml new file mode 100644 index 0000000..dfc3fc8 --- /dev/null +++ b/UI_Components_and_Layouts/entry/src/main/resources/base/graphic/backgroundtint.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/UI_Components_and_Layouts/entry/src/main/resources/base/graphic/blueback.xml b/UI_Components_and_Layouts/entry/src/main/resources/base/graphic/blueback.xml new file mode 100644 index 0000000..619c1f8 --- /dev/null +++ b/UI_Components_and_Layouts/entry/src/main/resources/base/graphic/blueback.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/UI_Components_and_Layouts/entry/src/main/resources/base/graphic/greenbackforbutton.xml b/UI_Components_and_Layouts/entry/src/main/resources/base/graphic/greenbackforbutton.xml new file mode 100644 index 0000000..5fb55e3 --- /dev/null +++ b/UI_Components_and_Layouts/entry/src/main/resources/base/graphic/greenbackforbutton.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/UI_Components_and_Layouts/entry/src/main/resources/base/layout/ability_main.xml b/UI_Components_and_Layouts/entry/src/main/resources/base/layout/ability_main.xml new file mode 100644 index 0000000..8d4c622 --- /dev/null +++ b/UI_Components_and_Layouts/entry/src/main/resources/base/layout/ability_main.xml @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/UI_Components_and_Layouts/entry/src/main/resources/base/layout/ability_main2.xml b/UI_Components_and_Layouts/entry/src/main/resources/base/layout/ability_main2.xml new file mode 100644 index 0000000..2639373 --- /dev/null +++ b/UI_Components_and_Layouts/entry/src/main/resources/base/layout/ability_main2.xml @@ -0,0 +1,238 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +