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
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# assessment_SeptemberTraining
This Repo is to submit the Android assignments. (September 2021 training)

## Asignment-1

| Layout-1 | Layout-2|
:-------------------------:|:-------------------------:
| <img src="https://user-images.githubusercontent.com/77436328/147749279-c3d85ede-ff6a-4971-9645-ebd3ded173a3.png" width="300" height="500"> | <img src="https://user-images.githubusercontent.com/77436328/147749234-1c3b3367-06dd-4613-8380-0ca770a25e24.png" width="330" height="500">|


## Assignment -2

| Layout-1 | Layout-2|
:-------------------------:|:-------------------------:
| <img src="https://user-images.githubusercontent.com/77436328/152938533-7921fc03-7c20-4ff2-b701-f41d44c9e2de.png" width="300" height="500"> | <img src="https://user-images.githubusercontent.com/77436328/152938259-8cd6f55a-f63e-47b6-9081-4f69ce5a9a39.png" width="330" height="500">|

## Assignment -3

| Layout-1 | Layout-2|
:-------------------------:|:-------------------------:
| <img src="https://user-images.githubusercontent.com/77436328/152941218-d45054ba-ba79-499a-8d03-621c0efa144d.png" width="300" height="500"> | <img src="https://user-images.githubusercontent.com/77436328/152941546-48bd0926-8fa8-4a91-bf0a-0105e85ec385.png" width="330" height="500">|
Binary file not shown.
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()
}
}
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']
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# config module specific ProGuard rules here.
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"app": {
"bundleName": "com.example.mystery",
"vendor": "example",
"version": {
"code": 1000000,
"name": "1.0.0"
}
},
"deviceConfig": {},
"module": {
"package": "com.example.mystery",
"name": ".MyApplication",
"mainAbility": "com.example.mystery.MainAbility",
"deviceType": [
"phone"
],
"distro": {
"deliveryWithInstall": true,
"moduleName": "entry",
"moduleType": "entry",
"installationFree": true
},
"abilities": [
{
"skills": [
{
"entities": [
"entity.system.home"
],
"actions": [
"action.system.home"
]
}
],
"orientation": "unspecified",
"name": "com.example.mystery.MainAbility",
"icon": "$media:icon",
"description": "$string:mainability_description",
"label": "$string:entry_MainAbility",
"type": "page",
"launchType": "standard"
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.example.mystery;

import com.example.mystery.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,10 @@
package com.example.mystery;

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.example.mystery.slice;

import com.example.mystery.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,16 @@
{
"string": [
{
"name": "entry_MainAbility",
"value": "entry_MainAbility"
},
{
"name": "mainability_description",
"value": "Java_Empty Ability"
},
{
"name": "mainability_HelloWorld",
"value": "Hello World"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<shape xmlns:ohos="http://schemas.huawei.com/res/ohos"
ohos:shape="rectangle">
<solid
ohos:color="#FFFFFF"/>
ohos:hint_color="#A8FFF"

ohos:hint_color="$color:black"
</shape>
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="utf-8"?>
<DirectionalLayout
xmlns:ohos="http://schemas.huawei.com/res/ohos"
ohos:height="match_parent"
ohos:width="match_parent"
ohos:alignment="center"
ohos:orientation="vertical">

<Button
ohos:id="$+id:button"
ohos:width="match_content"
ohos:height="match_content"
ohos:text_size="30fp"
ohos:text="Name"
ohos:hint_color="$ohos:color:id_color_activated_end_transparent"
ohos:left_margin="1vp"
ohos:bottom_margin="100vp"
ohos:right_padding="2vp"
ohos:left_padding="2vp"
/>
<Text
ohos:height="match_content"
ohos:width="match_content"
ohos:text_size="30fp"
ohos:text="Phone Area"
ohos:hint_color="$ohos:color:id_color_text_secondary"
ohos:bottom_margin="90vp"
ohos:right_margin="2vp"
ohos:right_padding="2vp"
ohos:left_padding="1vp"
ohos:left_margin="1vp"
/>

<Text
ohos:height="match_content"
ohos:width="match_content"
ohos:text_size="30fp"
ohos:text="Address"
ohos:bottom_margin="80vp"
ohos:right_margin="2vp"
ohos:right_padding="2vp"
ohos:left_padding="1vp"
ohos:left_margin="1vp"

/>
<Text
ohos:height="match_content"
ohos:width="match_content"
ohos:text_size="30fp"
ohos:text="City"
ohos:bottom_margin="70vp"
ohos:right_margin="2vp"
ohos:right_padding="2vp"
ohos:left_padding="1vp"
ohos:left_margin="1vp"
/>
<Text
ohos:height="match_content"
ohos:width="match_content"
ohos:text_size="30fp"
ohos:text="State Zip"
ohos:bottom_margin="60vp"
ohos:right_margin="2vp"
ohos:right_padding="2vp"
ohos:left_padding="1vp"
ohos:left_margin="1vp"
/>
<Text
ohos:height="match_content"
ohos:width="match_content"
ohos:text_size="30fp"
ohos:text="Email"
ohos:bottom_margin="50vp"
ohos:right_margin="2vp"
ohos:right_padding="2vp"
ohos:left_padding="1vp"
ohos:left_margin="1vp"
/>
<Text
ohos:height="match_content"
ohos:width="match_content"
ohos:text_size="30fp"
ohos:text="Birthday"
ohos:bottom_margin="40vp"
ohos:right_margin="2vp"
ohos:right_padding="2vp"
ohos:left_padding="1vp"
ohos:left_margin="1vp"
/>

</DirectionalLayout>
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,16 @@
{
"string": [
{
"name": "entry_MainAbility",
"value": "entry_MainAbility"
},
{
"name": "mainability_description",
"value": "Java_Empty Ability"
},
{
"name": "mainability_HelloWorld",
"value": "Hello World"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"string": [
{
"name": "entry_MainAbility",
"value": "entry_MainAbility"
},
{
"name": "mainability_description",
"value": "Java_Empty Ability"
},
{
"name": "mainability_HelloWorld",
"value": "你好,世界"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.example.mystery;

import ohos.aafwk.ability.delegation.AbilityDelegatorRegistry;
import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class ExampleOhosTest {
@Test
public void testBundleName() {
final String actualBundleName = AbilityDelegatorRegistry.getArguments().getTestBundleName();
assertEquals("com.example.mystery", actualBundleName);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.example.mystery;

import org.junit.Test;

public class ExampleTest {
@Test
public void onStart() {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Project-wide Gradle settings.
# IDE (e.g. DevEco Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# If the Chinese output is garbled, please configure the following parameter.
# This function is enabled by default when the DevEco Studio builds the hap/app,if you need disable gradle parallel,you should set org.gradle.parallel false.
# more information see https://docs.gradle.org/current/userguide/performance.html
# org.gradle.parallel=false
# org.gradle.jvmargs=-Dfile.encoding=GBK
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://repo.huaweicloud.com/gradle/gradle-6.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading