Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
Binary file modified Assignment_for_Intents__Serialization.docx
Binary file not shown.
1 change: 1 addition & 0 deletions Intents_and_serialization
Submodule Intents_and_serialization added at 1e89fc
Binary file added UI_Components_and_Layouts/.DS_Store
Binary file not shown.
38 changes: 38 additions & 0 deletions UI_Components_and_Layouts/build.gradle
Original file line number Diff line number Diff line change
@@ -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()
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added UI_Components_and_Layouts/entry/.DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions UI_Components_and_Layouts/entry/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
27 changes: 27 additions & 0 deletions UI_Components_and_Layouts/entry/build.gradle
Original file line number Diff line number Diff line change
@@ -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']
}
1 change: 1 addition & 0 deletions UI_Components_and_Layouts/entry/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# config module specific ProGuard rules here.
Binary file added UI_Components_and_Layouts/entry/src/.DS_Store
Binary file not shown.
Binary file not shown.
68 changes: 68 additions & 0 deletions UI_Components_and_Layouts/entry/src/main/config.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -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());
}
}
Original file line number Diff line number Diff line change
@@ -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());
}
}
Original file line number Diff line number Diff line change
@@ -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());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.ajith.assignment;

import ohos.aafwk.ability.AbilityPackage;

public class MyApplication extends AbilityPackage {
@Override
public void onInitialize() {
super.onInitialize();
}
}
Original file line number Diff line number Diff line change
@@ -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);
}
}
Original file line number Diff line number Diff line change
@@ -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);
}
}
Original file line number Diff line number Diff line change
@@ -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);
}
}
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<shape xmlns:ohos="http://schemas.huawei.com/res/ohos"
ohos:shape="rectangle">
<corners
ohos:radius="40"/>
<stroke ohos:color="black" ohos:width="2"/>
</shape>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<shape
xmlns:ohos="http://schemas.huawei.com/res/ohos"
ohos:shape="rectangle">

<stroke ohos:color="#FFFFFFFF" ohos:width="2"/>
<corners ohos:radius="40"/>
</shape>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<shape xmlns:ohos="http://schemas.huawei.com/res/ohos"
ohos:shape="rectangle">
<solid ohos:color="white"/>
<corners
ohos:radius="10"/>
<stroke ohos:color="black" ohos:width="2"/>
</shape>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<shape
xmlns:ohos="http://schemas.huawei.com/res/ohos"
ohos:shape="rectangle">

<solid ohos:color="#Eff1f3"/>
</shape>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<shape xmlns:ohos="http://schemas.huawei.com/res/ohos"
ohos:shape="rectangle">
<corners
ohos:radius="80"/>
<solid ohos:color="#FF3053BF"/>
</shape>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<shape xmlns:ohos="http://schemas.huawei.com/res/ohos"
ohos:shape="rectangle">
<corners
ohos:radius="80"/>
<solid ohos:color="#FF28BA10"/>
</shape>
Loading