diff --git a/3-1/Mobile_Programming/.DS_Store b/3-1/Mobile_Programming/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..8bd2b08e2d96b8ef6b8924120f9447964934db75 Binary files /dev/null and b/3-1/Mobile_Programming/.DS_Store differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/.gitignore b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..aa724b77071afcbd9bb398053e05adaf7ac9405a --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/.gitignore @@ -0,0 +1,15 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild +.cxx +local.properties diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/.idea/.gitignore b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/.idea/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..26d33521af10bcc7fd8cea344038eaaeb78d0ef5 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/.idea/compiler.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/.idea/compiler.xml new file mode 100644 index 0000000000000000000000000000000000000000..61a9130cd9669c3843e6445dfe1fee2d493869bc --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/.idea/compiler.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="CompilerConfiguration"> + <bytecodeTargetLevel target="1.8" /> + </component> +</project> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/.idea/gradle.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/.idea/gradle.xml new file mode 100644 index 0000000000000000000000000000000000000000..23a89bbb6ca829a47211d20c8b11960088ea4950 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/.idea/gradle.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="GradleMigrationSettings" migrationVersion="1" /> + <component name="GradleSettings"> + <option name="linkedExternalProjectsSettings"> + <GradleProjectSettings> + <option name="testRunner" value="PLATFORM" /> + <option name="distributionType" value="DEFAULT_WRAPPED" /> + <option name="externalProjectPath" value="$PROJECT_DIR$" /> + <option name="gradleJvm" value="1.8" /> + <option name="modules"> + <set> + <option value="$PROJECT_DIR$" /> + <option value="$PROJECT_DIR$/app" /> + </set> + </option> + <option name="resolveModulePerSourceSet" value="false" /> + <option name="useQualifiedModuleNames" value="true" /> + </GradleProjectSettings> + </option> + </component> +</project> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/.idea/jarRepositories.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/.idea/jarRepositories.xml new file mode 100644 index 0000000000000000000000000000000000000000..a5f05cd8c87d4a72b0242026524cb32639fca7f0 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/.idea/jarRepositories.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="RemoteRepositoriesConfiguration"> + <remote-repository> + <option name="id" value="central" /> + <option name="name" value="Maven Central repository" /> + <option name="url" value="https://repo1.maven.org/maven2" /> + </remote-repository> + <remote-repository> + <option name="id" value="jboss.community" /> + <option name="name" value="JBoss Community repository" /> + <option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" /> + </remote-repository> + <remote-repository> + <option name="id" value="BintrayJCenter" /> + <option name="name" value="BintrayJCenter" /> + <option name="url" value="https://jcenter.bintray.com/" /> + </remote-repository> + <remote-repository> + <option name="id" value="Google" /> + <option name="name" value="Google" /> + <option name="url" value="https://dl.google.com/dl/android/maven2/" /> + </remote-repository> + </component> +</project> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/.idea/misc.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/.idea/misc.xml new file mode 100644 index 0000000000000000000000000000000000000000..d5d35ec44f10991b508f6454a85204a276726364 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/.idea/misc.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK"> + <output url="file://$PROJECT_DIR$/build/classes" /> + </component> + <component name="ProjectType"> + <option name="id" value="Android" /> + </component> +</project> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/.gitignore b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..42afabfd2abebf31384ca7797186a27a4b7dbee8 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/build.gradle b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..78d16ee2005d0aefee2cccbbdcda637568e2e20f --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/build.gradle @@ -0,0 +1,39 @@ +plugins { + id 'com.android.application' +} + +android { + compileSdkVersion 30 + buildToolsVersion "30.0.3" + + defaultConfig { + applicationId "com.example.simple" + minSdkVersion 26 + targetSdkVersion 30 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} + +dependencies { + + implementation 'androidx.appcompat:appcompat:1.2.0' + implementation 'com.google.android.material:material:1.3.0' + implementation 'androidx.constraintlayout:constraintlayout:2.0.4' + testImplementation 'junit:junit:4.+' + androidTestImplementation 'androidx.test.ext:junit:1.1.2' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/proguard-rules.pro b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/proguard-rules.pro new file mode 100644 index 0000000000000000000000000000000000000000..481bb434814107eb79d7a30b676d344b0df2f8ce --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/androidTest/java/com/example/simple/ExampleInstrumentedTest.java b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/androidTest/java/com/example/simple/ExampleInstrumentedTest.java new file mode 100644 index 0000000000000000000000000000000000000000..33c04fddaf6441aa9e229c5f6b2d72be64ba09a9 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/androidTest/java/com/example/simple/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package com.example.simple; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("com.example.simple", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/AndroidManifest.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000000000000000000000000000000000000..d135e466a760e4eb19135290e66699727a61c735 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/AndroidManifest.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="com.example.simple"> + + <application + android:allowBackup="true" + android:icon="@mipmap/ic_launcher" + android:label="@string/app_name" + android:roundIcon="@mipmap/ic_launcher_round" + android:supportsRtl="true" + android:theme="@style/Theme.Simple"> + <activity android:name=".MainActivity"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + </application> + +</manifest> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/java/com/example/simple/MainActivity.java b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/java/com/example/simple/MainActivity.java new file mode 100644 index 0000000000000000000000000000000000000000..2f3513b5a0fc28d1b3ea9ad63758e1ab21fd553f --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/java/com/example/simple/MainActivity.java @@ -0,0 +1,164 @@ +package com.example.simple; + +import androidx.appcompat.app.AppCompatActivity; +import android.view.*; +import android.os.Bundle; +import android.widget.Button; +import android.widget.TextView; +import java.util.ArrayList; + + +public class MainActivity extends AppCompatActivity { + private int opnd = 0; + private int temp = 0; + private int result = 0; + private ArrayList<Integer> number = new ArrayList<Integer>(); + private ArrayList<Character> op = new ArrayList<Character>(); + private ArrayList<Character> op1 = new ArrayList<Character>(); + + @Override + protected void onCreate(Bundle savedInstanceState) { + number.add(0); + op.add('0'); + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + ((Button)findViewById(R.id.button_0)).setOnClickListener( + (v) -> { appendDigit(0);} + ); + + ((Button)findViewById(R.id.button_1)).setOnClickListener( + (v) -> { appendDigit(1);} + ); + ((Button)findViewById(R.id.button_2)).setOnClickListener( + (v)->{appendDigit(2);} + ); + ((Button)findViewById(R.id.button_3)).setOnClickListener( + (v)->{appendDigit(3);} + ); + ((Button)findViewById(R.id.button_4)).setOnClickListener( + (v)->{appendDigit(4);} + ); + ((Button)findViewById(R.id.button_5)).setOnClickListener( + (v)->{appendDigit(5);} + ); + ((Button)findViewById(R.id.button_6)).setOnClickListener( + (v)->{appendDigit(6);} + ); + ((Button)findViewById(R.id.button_7)).setOnClickListener( + (v)->{appendDigit(7);} + ); + ((Button)findViewById(R.id.button_8)).setOnClickListener( + (v)->{appendDigit(8);} + ); + ((Button)findViewById(R.id.button_9)).setOnClickListener( + (v)->{appendDigit(9);} + ); + + ((Button)findViewById(R.id.button_c)).setOnClickListener( + (v)-> { + op.clear(); + number.clear(); + temp=0; + opnd = 0; + result=0; + final TextView txtResult = (TextView) findViewById(R.id.text_result); + txtResult.setText(""); + } + ); + ((Button)findViewById(R.id.button_add)).setOnClickListener( + (v)-> { + number.add(opnd); + op.add('+'); + opnd = 0; + final TextView txtResult = (TextView) findViewById(R.id.text_result); + txtResult.setText(""); + + } + ); + ((Button)findViewById(R.id.button_sub)).setOnClickListener( + (v)-> { + number.add(opnd); + op.add('-'); + opnd = 0; + final TextView txtResult = (TextView) findViewById(R.id.text_result); + txtResult.setText(""); + + } + ); + ((Button)findViewById(R.id.button_mul)).setOnClickListener( + (v)-> { + number.add(opnd); + op.add('*'); + opnd = 0; + final TextView txtResult = (TextView) findViewById(R.id.text_result); + txtResult.setText(""); + + } + ); + ((Button)findViewById(R.id.button32_div)).setOnClickListener( + (v)-> { + number.add(opnd); + op.add('/'); + opnd = 0; + final TextView txtResult = (TextView) findViewById(R.id.text_result); + txtResult.setText(""); + + } + ); + ((Button)findViewById(R.id.button_calc)).setOnClickListener( + (v)-> { + int i=1; + op.add('='); + number.add(opnd); + while(op.get(i)!='=') { + if (op.get(i) == '*') { + temp = number.get(i) * number.get(i + 1); + number.remove(i); + number.remove(i); + number.add(i, temp); + op.remove(i); + } else if (op.get(i) == '/') { + temp = number.get(i) / number.get(i + 1); + number.remove(i); + number.remove(i); + number.add(i, temp); + op.remove(i); + } else if (op.get(i) == '+') { + i++; + } else if (op.get(i) == '-') { + i++; + } + } + + + result=number.get(1); + for(i=1;i<=number.size()-1;i++){ + if(op.get(i)=='+'){ + result=result+number.get(i+1); + } + else if(op.get(i)=='-'){ + result=result-number.get(i+1); + } + } + + final TextView txtResult = (TextView) findViewById(R.id.text_result); + txtResult.setText(""+result); + + temp=0; + opnd = 0; + result=0; + op.clear(); + number.clear(); + } + ); + + + } + + private void appendDigit(int a){ + opnd=opnd*10 +a; + final TextView txtResult = (TextView)findViewById(R.id.text_result); + txtResult.setText(""+opnd); + } +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000000000000000000000000000000000000..2b068d11462a4b96669193de13a711a3a36220a0 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:aapt="http://schemas.android.com/aapt" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z"> + <aapt:attr name="android:fillColor"> + <gradient + android:endX="85.84757" + android:endY="92.4963" + android:startX="42.9492" + android:startY="49.59793" + android:type="linear"> + <item + android:color="#44000000" + android:offset="0.0" /> + <item + android:color="#00000000" + android:offset="1.0" /> + </gradient> + </aapt:attr> + </path> + <path + android:fillColor="#FFFFFF" + android:fillType="nonZero" + android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z" + android:strokeWidth="1" + android:strokeColor="#00000000" /> +</vector> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/drawable/ic_launcher_background.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000000000000000000000000000000000000..07d5da9cbf141911847041df5d7b87f0dd5ef9d4 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <path + android:fillColor="#3DDC84" + android:pathData="M0,0h108v108h-108z" /> + <path + android:fillColor="#00000000" + android:pathData="M9,0L9,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,0L19,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M29,0L29,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M39,0L39,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M49,0L49,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M59,0L59,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M69,0L69,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M79,0L79,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M89,0L89,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M99,0L99,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,9L108,9" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,19L108,19" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,29L108,29" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,39L108,39" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,49L108,49" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,59L108,59" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,69L108,69" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,79L108,79" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,89L108,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,99L108,99" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,29L89,29" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,39L89,39" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,49L89,49" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,59L89,59" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,69L89,69" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,79L89,79" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M29,19L29,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M39,19L39,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M49,19L49,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M59,19L59,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M69,19L69,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M79,19L79,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> +</vector> diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/layout/activity_main.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000000000000000000000000000000000000..4728f726fc75d5c23eb67ecb66ca28b528d5e79d --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,146 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context=".MainActivity"> + + <TextView + android:id="@+id/text_result" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintHorizontal_bias="0.498" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintRight_toRightOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.297" /> + + <TableLayout + android:layout_width="389dp" + android:layout_height="206dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/textView"> + + <TableRow + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <Button + android:id="@+id/button_1" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="1" /> + + <Button + android:id="@+id/button_2" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="2" /> + + <Button + android:id="@+id/button_3" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="3" /> + + <Button + android:id="@+id/button_add" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="+" /> + </TableRow> + + <TableRow + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <Button + android:id="@+id/button_4" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="4" /> + + <Button + android:id="@+id/button_5" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="5" /> + + <Button + android:id="@+id/button_6" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="6" /> + + <Button + android:id="@+id/button_sub" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="-" /> + </TableRow> + + <TableRow + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <Button + android:id="@+id/button_7" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="7" /> + + <Button + android:id="@+id/button_8" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="8" /> + + <Button + android:id="@+id/button_9" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="9" /> + + <Button + android:id="@+id/button_mul" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="*" /> + </TableRow> + + <TableRow + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <Button + android:id="@+id/button_c" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="c" /> + + <Button + android:id="@+id/button_0" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="0" /> + + <Button + android:id="@+id/button_calc" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="=" /> + + <Button + android:id="@+id/button32_div" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="/" /> + </TableRow> + </TableLayout> + +</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000000000000000000000000000000000000..eca70cfe52eac1ba66ba280a68ca7be8fcf88a16 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@drawable/ic_launcher_background" /> + <foreground android:drawable="@drawable/ic_launcher_foreground" /> +</adaptive-icon> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000000000000000000000000000000000000..eca70cfe52eac1ba66ba280a68ca7be8fcf88a16 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@drawable/ic_launcher_background" /> + <foreground android:drawable="@drawable/ic_launcher_foreground" /> +</adaptive-icon> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-hdpi/ic_launcher.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..a571e60098c92c2baca8a5df62f2929cbff01b52 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..61da551c5594a1f9d26193983d2cd69189014603 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-mdpi/ic_launcher.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..c41dd28531901b2c23927768c84bb6765ebcc1db Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..db5080a752731b34d38d7c634732b2cd999125d0 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..6dba46dab19242bf475ddf2e0a10042de6a0be16 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..da31a871c8dc461a1ea114510bfac640307b0a90 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..15ac681720f3df43c647bf0c081f0314ee34eae1 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..b216f2d313cc673d8b8c4da591c174ebed52795c Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..f25a419744727fb48b4b4137b6c6a3a8f2620d51 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..e96783ccce844001359f968f5cd9d85b341bd3fb Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/values-night/themes.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/values-night/themes.xml new file mode 100644 index 0000000000000000000000000000000000000000..a26446f1436fdf13f657c3eae2bfa81c3742e71d --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/values-night/themes.xml @@ -0,0 +1,16 @@ +<resources xmlns:tools="http://schemas.android.com/tools"> + <!-- Base application theme. --> + <style name="Theme.Simple" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> + <!-- Primary brand color. --> + <item name="colorPrimary">@color/purple_200</item> + <item name="colorPrimaryVariant">@color/purple_700</item> + <item name="colorOnPrimary">@color/black</item> + <!-- Secondary brand color. --> + <item name="colorSecondary">@color/teal_200</item> + <item name="colorSecondaryVariant">@color/teal_200</item> + <item name="colorOnSecondary">@color/black</item> + <!-- Status bar color. --> + <item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item> + <!-- Customize your theme here. --> + </style> +</resources> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/values/colors.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/values/colors.xml new file mode 100644 index 0000000000000000000000000000000000000000..f8c6127d327620c93d2b2d00342a68e97b98a48d --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/values/colors.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <color name="purple_200">#FFBB86FC</color> + <color name="purple_500">#FF6200EE</color> + <color name="purple_700">#FF3700B3</color> + <color name="teal_200">#FF03DAC5</color> + <color name="teal_700">#FF018786</color> + <color name="black">#FF000000</color> + <color name="white">#FFFFFFFF</color> +</resources> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/values/strings.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/values/strings.xml new file mode 100644 index 0000000000000000000000000000000000000000..e7119f8b9a750a34841cf2b048187f878ef080d5 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ +<resources> + <string name="app_name">Simple</string> +</resources> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/values/themes.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/values/themes.xml new file mode 100644 index 0000000000000000000000000000000000000000..39a52850d4c3f83701e324c1ecc3d24c394f1a35 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/main/res/values/themes.xml @@ -0,0 +1,16 @@ +<resources xmlns:tools="http://schemas.android.com/tools"> + <!-- Base application theme. --> + <style name="Theme.Simple" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> + <!-- Primary brand color. --> + <item name="colorPrimary">@color/purple_500</item> + <item name="colorPrimaryVariant">@color/purple_700</item> + <item name="colorOnPrimary">@color/white</item> + <!-- Secondary brand color. --> + <item name="colorSecondary">@color/teal_200</item> + <item name="colorSecondaryVariant">@color/teal_700</item> + <item name="colorOnSecondary">@color/black</item> + <!-- Status bar color. --> + <item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item> + <!-- Customize your theme here. --> + </style> +</resources> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/test/java/com/example/simple/ExampleUnitTest.java b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/test/java/com/example/simple/ExampleUnitTest.java new file mode 100644 index 0000000000000000000000000000000000000000..43df73eba6dc24aef16e8f6ad339f90d1daa64dd --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/app/src/test/java/com/example/simple/ExampleUnitTest.java @@ -0,0 +1,17 @@ +package com.example.simple; + +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/build.gradle b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..dfbc7c14144f78c77042100b30a5b8695b4c8ea4 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/build.gradle @@ -0,0 +1,24 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. +buildscript { + repositories { + google() + jcenter() + } + dependencies { + classpath "com.android.tools.build:gradle:4.1.2" + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + google() + jcenter() + } +} + +task clean(type: Delete) { + delete rootProject.buildDir +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/gradle.properties b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/gradle.properties new file mode 100644 index 0000000000000000000000000000000000000000..52f5917cb0d0c47fd00ba8ee85c14eb27e1c41cc --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/gradle.properties @@ -0,0 +1,19 @@ +# Project-wide Gradle settings. +# IDE (e.g. Android 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. +org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app"s APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true +# Automatically convert third-party libraries to use AndroidX +android.enableJetifier=true \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/gradle/wrapper/gradle-wrapper.jar b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..f6b961fd5a86aa5fbfe90f707c3138408be7c718 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/gradle/wrapper/gradle-wrapper.jar differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/gradle/wrapper/gradle-wrapper.properties b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000000000000000000000000000000000..54d9886883a773ccf56b07ad7fa52195267c3348 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Thu Mar 18 18:20:43 KST 2021 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/gradlew b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/gradlew new file mode 100755 index 0000000000000000000000000000000000000000..cccdd3d517fc5249beaefa600691cf150f2fa3e6 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/gradlew @@ -0,0 +1,172 @@ +#!/usr/bin/env sh + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/gradlew.bat b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/gradlew.bat new file mode 100644 index 0000000000000000000000000000000000000000..e95643d6a2ca62258464e83c72f5156dc941c609 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/gradlew.bat @@ -0,0 +1,84 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/settings.gradle b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/settings.gradle new file mode 100644 index 0000000000000000000000000000000000000000..918ba36148a4e1580d64677fce93de8d448a9fb6 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assginment1/settings.gradle @@ -0,0 +1,2 @@ +include ':app' +rootProject.name = "Simple" \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/.gitignore b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..aa724b77071afcbd9bb398053e05adaf7ac9405a --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/.gitignore @@ -0,0 +1,15 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild +.cxx +local.properties diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/.idea/.gitignore b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/.idea/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..26d33521af10bcc7fd8cea344038eaaeb78d0ef5 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/.idea/compiler.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/.idea/compiler.xml new file mode 100644 index 0000000000000000000000000000000000000000..61a9130cd9669c3843e6445dfe1fee2d493869bc --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/.idea/compiler.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="CompilerConfiguration"> + <bytecodeTargetLevel target="1.8" /> + </component> +</project> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/.idea/gradle.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/.idea/gradle.xml new file mode 100644 index 0000000000000000000000000000000000000000..23a89bbb6ca829a47211d20c8b11960088ea4950 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/.idea/gradle.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="GradleMigrationSettings" migrationVersion="1" /> + <component name="GradleSettings"> + <option name="linkedExternalProjectsSettings"> + <GradleProjectSettings> + <option name="testRunner" value="PLATFORM" /> + <option name="distributionType" value="DEFAULT_WRAPPED" /> + <option name="externalProjectPath" value="$PROJECT_DIR$" /> + <option name="gradleJvm" value="1.8" /> + <option name="modules"> + <set> + <option value="$PROJECT_DIR$" /> + <option value="$PROJECT_DIR$/app" /> + </set> + </option> + <option name="resolveModulePerSourceSet" value="false" /> + <option name="useQualifiedModuleNames" value="true" /> + </GradleProjectSettings> + </option> + </component> +</project> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/.idea/jarRepositories.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/.idea/jarRepositories.xml new file mode 100644 index 0000000000000000000000000000000000000000..a5f05cd8c87d4a72b0242026524cb32639fca7f0 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/.idea/jarRepositories.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="RemoteRepositoriesConfiguration"> + <remote-repository> + <option name="id" value="central" /> + <option name="name" value="Maven Central repository" /> + <option name="url" value="https://repo1.maven.org/maven2" /> + </remote-repository> + <remote-repository> + <option name="id" value="jboss.community" /> + <option name="name" value="JBoss Community repository" /> + <option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" /> + </remote-repository> + <remote-repository> + <option name="id" value="BintrayJCenter" /> + <option name="name" value="BintrayJCenter" /> + <option name="url" value="https://jcenter.bintray.com/" /> + </remote-repository> + <remote-repository> + <option name="id" value="Google" /> + <option name="name" value="Google" /> + <option name="url" value="https://dl.google.com/dl/android/maven2/" /> + </remote-repository> + </component> +</project> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/.idea/misc.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/.idea/misc.xml new file mode 100644 index 0000000000000000000000000000000000000000..d5d35ec44f10991b508f6454a85204a276726364 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/.idea/misc.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK"> + <output url="file://$PROJECT_DIR$/build/classes" /> + </component> + <component name="ProjectType"> + <option name="id" value="Android" /> + </component> +</project> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/.gitignore b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..42afabfd2abebf31384ca7797186a27a4b7dbee8 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/build.gradle b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..8c331a9544bbb315a37d7e183477ab9c9c97551b --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/build.gradle @@ -0,0 +1,39 @@ +plugins { + id 'com.android.application' +} + +android { + compileSdkVersion 30 + buildToolsVersion "30.0.3" + + defaultConfig { + applicationId "com.example.canvas" + minSdkVersion 26 + targetSdkVersion 30 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} + +dependencies { + + implementation 'androidx.appcompat:appcompat:1.2.0' + implementation 'com.google.android.material:material:1.3.0' + implementation 'androidx.constraintlayout:constraintlayout:2.0.4' + testImplementation 'junit:junit:4.+' + androidTestImplementation 'androidx.test.ext:junit:1.1.2' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/proguard-rules.pro b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/proguard-rules.pro new file mode 100644 index 0000000000000000000000000000000000000000..481bb434814107eb79d7a30b676d344b0df2f8ce --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/androidTest/java/com/example/canvas/ExampleInstrumentedTest.java b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/androidTest/java/com/example/canvas/ExampleInstrumentedTest.java new file mode 100644 index 0000000000000000000000000000000000000000..d991b9c7ee99891f6091340d1f62bb905530b5bf --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/androidTest/java/com/example/canvas/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package com.example.canvas; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("com.example.canvas", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/AndroidManifest.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000000000000000000000000000000000000..ac325dbad89abdcb8e0f84ed48c6871efcee48f6 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/AndroidManifest.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="com.example.canvas"> + + <application + android:allowBackup="true" + android:icon="@mipmap/ic_launcher" + android:label="@string/app_name" + android:roundIcon="@mipmap/ic_launcher_round" + android:supportsRtl="true" + android:theme="@style/Theme.Canvas"> + <activity android:name=".MainActivity"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + </application> + +</manifest> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/java/com/example/canvas/MainActivity.java b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/java/com/example/canvas/MainActivity.java new file mode 100644 index 0000000000000000000000000000000000000000..559dd7f517fa762bc0aa910795abc772d43b674c --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/java/com/example/canvas/MainActivity.java @@ -0,0 +1,34 @@ +package com.example.canvas; + +import androidx.appcompat.app.AppCompatActivity; + +import android.graphics.Color; +import android.view.View; + +import android.os.Bundle; + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + } + public void onColorButtonClick(View v){ + SingleTouchView singleTouch = findViewById(R.id.singletouchview); + switch (v.getId()) { + case R.id.btn_black: + singleTouch.setColor(Color.BLACK); + break; + case R.id.btn_red: + singleTouch.setColor(Color.RED); + break; + case R.id.btn_green: + singleTouch.setColor(Color.GREEN); + break; + case R.id.btn_clear: + singleTouch.clearPath(); + break; + } + } +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/java/com/example/canvas/SingleTouchView.java b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/java/com/example/canvas/SingleTouchView.java new file mode 100644 index 0000000000000000000000000000000000000000..5510a513cbfd9be27322da22e3a71691b721a1e9 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/java/com/example/canvas/SingleTouchView.java @@ -0,0 +1,71 @@ +package com.example.canvas; + +import android.graphics.Color; +import android.view.MotionEvent; +import android.view.View; +import android.graphics.Canvas; +import android.util.AttributeSet; +import android.content.Context; +import android.graphics.Paint; +import android.graphics.Path; +import java.util.ArrayList; +public class SingleTouchView extends View{ + + public static Paint paint = new Paint(); + public static Path path = new Path(); + public static ArrayList<Path> pathlist= new ArrayList<Path>(); + public static ArrayList<Integer> color= new ArrayList<Integer>(); + public static int current_color = Color.BLACK; + public SingleTouchView(Context context, AttributeSet attrs){ + super(context, attrs); + paint.setStrokeWidth(10.0f); + paint.setColor(current_color); + paint.setStyle(Paint.Style.STROKE); + paint.setStrokeJoin(Paint.Join.ROUND); + paint.setAntiAlias(true); + } + + protected void onDraw(Canvas canvas){ + for(int i=0;i<pathlist.size();i++){ + paint.setColor(color.get(i)); + canvas.drawPath(pathlist.get(i),paint); + invalidate(); + } + } + + public void setColor(int c){ + paint.setColor(c); + path = new Path(); + current_color=(paint.getColor()); + invalidate(); + } + + public void clearPath(){ + + pathlist.clear(); + color.clear(); + path.reset(); + invalidate(); + } + public boolean onTouchEvent(MotionEvent event){ + float eventX = event.getX(); + float eventY = event.getY(); + + switch(event.getAction()){ + case MotionEvent.ACTION_DOWN: + path.moveTo(eventX,eventY); + break; + case MotionEvent.ACTION_MOVE: + path.lineTo(eventX,eventY); + pathlist.add(path); + color.add(current_color); + break; + case MotionEvent.ACTION_UP: + break; + default: + return false; + } + invalidate(); + return true; + } +} diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000000000000000000000000000000000000..2b068d11462a4b96669193de13a711a3a36220a0 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:aapt="http://schemas.android.com/aapt" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z"> + <aapt:attr name="android:fillColor"> + <gradient + android:endX="85.84757" + android:endY="92.4963" + android:startX="42.9492" + android:startY="49.59793" + android:type="linear"> + <item + android:color="#44000000" + android:offset="0.0" /> + <item + android:color="#00000000" + android:offset="1.0" /> + </gradient> + </aapt:attr> + </path> + <path + android:fillColor="#FFFFFF" + android:fillType="nonZero" + android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z" + android:strokeWidth="1" + android:strokeColor="#00000000" /> +</vector> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/drawable/ic_launcher_background.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000000000000000000000000000000000000..07d5da9cbf141911847041df5d7b87f0dd5ef9d4 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <path + android:fillColor="#3DDC84" + android:pathData="M0,0h108v108h-108z" /> + <path + android:fillColor="#00000000" + android:pathData="M9,0L9,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,0L19,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M29,0L29,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M39,0L39,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M49,0L49,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M59,0L59,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M69,0L69,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M79,0L79,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M89,0L89,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M99,0L99,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,9L108,9" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,19L108,19" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,29L108,29" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,39L108,39" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,49L108,49" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,59L108,59" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,69L108,69" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,79L108,79" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,89L108,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,99L108,99" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,29L89,29" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,39L89,39" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,49L89,49" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,59L89,59" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,69L89,69" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,79L89,79" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M29,19L29,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M39,19L39,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M49,19L49,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M59,19L59,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M69,19L69,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M79,19L79,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> +</vector> diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/layout/activity_main.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000000000000000000000000000000000000..79e60ee13d6ad686fa22eb5e20c03e409ac8e478 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context=".MainActivity"> + + <com.example.canvas.SingleTouchView + android:id="@+id/singletouchview" + android:layout_width="366dp" + android:layout_height="618dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.488" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.141" /> + + <LinearLayout + android:id="@+id/linearLayout" + android:layout_width="379dp" + android:layout_height="48dp" + android:orientation="horizontal" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.406" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.976"> + + <android.widget.Button + android:id="@+id/btn_black" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_weight="1" + android:background="@android:color/background_dark" + android:onClick="onColorButtonClick" + android:text="Black" + android:textColor="@color/white" + app:rippleColor="#FFFFFF" + tools:layout_editor_absoluteX="13dp" + tools:layout_editor_absoluteY="667dp" /> + + <android.widget.Button + android:id="@+id/btn_green" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_weight="1" + android:background="@android:color/holo_green_light" + android:onClick="onColorButtonClick" + android:text="Green" + tools:layout_editor_absoluteX="203dp" + tools:layout_editor_absoluteY="667dp" /> + + <android.widget.Button + android:id="@+id/btn_red" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_weight="1" + android:background="@android:color/holo_red_light" + android:onClick="onColorButtonClick" + android:text="Red" /> + + <android.widget.Button + android:id="@+id/btn_clear" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_weight="1" + android:background="@color/white" + android:onClick="onColorButtonClick" + android:text="Clear" + android:textColor="@color/black" + tools:layout_editor_absoluteX="298dp" + tools:layout_editor_absoluteY="667dp" /> + </LinearLayout> + +</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000000000000000000000000000000000000..eca70cfe52eac1ba66ba280a68ca7be8fcf88a16 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@drawable/ic_launcher_background" /> + <foreground android:drawable="@drawable/ic_launcher_foreground" /> +</adaptive-icon> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000000000000000000000000000000000000..eca70cfe52eac1ba66ba280a68ca7be8fcf88a16 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@drawable/ic_launcher_background" /> + <foreground android:drawable="@drawable/ic_launcher_foreground" /> +</adaptive-icon> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-hdpi/ic_launcher.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..a571e60098c92c2baca8a5df62f2929cbff01b52 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..61da551c5594a1f9d26193983d2cd69189014603 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-mdpi/ic_launcher.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..c41dd28531901b2c23927768c84bb6765ebcc1db Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..db5080a752731b34d38d7c634732b2cd999125d0 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..6dba46dab19242bf475ddf2e0a10042de6a0be16 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..da31a871c8dc461a1ea114510bfac640307b0a90 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..15ac681720f3df43c647bf0c081f0314ee34eae1 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..b216f2d313cc673d8b8c4da591c174ebed52795c Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..f25a419744727fb48b4b4137b6c6a3a8f2620d51 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..e96783ccce844001359f968f5cd9d85b341bd3fb Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/values-night/themes.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/values-night/themes.xml new file mode 100644 index 0000000000000000000000000000000000000000..55e931121ca74a44f1e2a7911096dd2028932efd --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/values-night/themes.xml @@ -0,0 +1,16 @@ +<resources xmlns:tools="http://schemas.android.com/tools"> + <!-- Base application theme. --> + <style name="Theme.Canvas" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> + <!-- Primary brand color. --> + <item name="colorPrimary">@color/purple_200</item> + <item name="colorPrimaryVariant">@color/purple_700</item> + <item name="colorOnPrimary">@color/black</item> + <!-- Secondary brand color. --> + <item name="colorSecondary">@color/teal_200</item> + <item name="colorSecondaryVariant">@color/teal_200</item> + <item name="colorOnSecondary">@color/black</item> + <!-- Status bar color. --> + <item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item> + <!-- Customize your theme here. --> + </style> +</resources> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/values/colors.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/values/colors.xml new file mode 100644 index 0000000000000000000000000000000000000000..f8c6127d327620c93d2b2d00342a68e97b98a48d --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/values/colors.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <color name="purple_200">#FFBB86FC</color> + <color name="purple_500">#FF6200EE</color> + <color name="purple_700">#FF3700B3</color> + <color name="teal_200">#FF03DAC5</color> + <color name="teal_700">#FF018786</color> + <color name="black">#FF000000</color> + <color name="white">#FFFFFFFF</color> +</resources> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/values/strings.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/values/strings.xml new file mode 100644 index 0000000000000000000000000000000000000000..388b8e703f37ef116192135e1eb003afc91a8c3c --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ +<resources> + <string name="app_name">canvas</string> +</resources> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/values/themes.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/values/themes.xml new file mode 100644 index 0000000000000000000000000000000000000000..8ac55432c281dcf9981534e8d208e212359cea09 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/main/res/values/themes.xml @@ -0,0 +1,16 @@ +<resources xmlns:tools="http://schemas.android.com/tools"> + <!-- Base application theme. --> + <style name="Theme.Canvas" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> + <!-- Primary brand color. --> + <item name="colorPrimary">@color/purple_500</item> + <item name="colorPrimaryVariant">@color/purple_700</item> + <item name="colorOnPrimary">@color/white</item> + <!-- Secondary brand color. --> + <item name="colorSecondary">@color/teal_200</item> + <item name="colorSecondaryVariant">@color/teal_700</item> + <item name="colorOnSecondary">@color/black</item> + <!-- Status bar color. --> + <item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item> + <!-- Customize your theme here. --> + </style> +</resources> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/test/java/com/example/canvas/ExampleUnitTest.java b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/test/java/com/example/canvas/ExampleUnitTest.java new file mode 100644 index 0000000000000000000000000000000000000000..e2bd3eaf5551ab3f9ecd4b1b6212632fc291ec3e --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/app/src/test/java/com/example/canvas/ExampleUnitTest.java @@ -0,0 +1,17 @@ +package com.example.canvas; + +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/build.gradle b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..dfbc7c14144f78c77042100b30a5b8695b4c8ea4 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/build.gradle @@ -0,0 +1,24 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. +buildscript { + repositories { + google() + jcenter() + } + dependencies { + classpath "com.android.tools.build:gradle:4.1.2" + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + google() + jcenter() + } +} + +task clean(type: Delete) { + delete rootProject.buildDir +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/gradle.properties b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/gradle.properties new file mode 100644 index 0000000000000000000000000000000000000000..52f5917cb0d0c47fd00ba8ee85c14eb27e1c41cc --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/gradle.properties @@ -0,0 +1,19 @@ +# Project-wide Gradle settings. +# IDE (e.g. Android 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. +org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app"s APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true +# Automatically convert third-party libraries to use AndroidX +android.enableJetifier=true \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/gradle/wrapper/gradle-wrapper.jar b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..f6b961fd5a86aa5fbfe90f707c3138408be7c718 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/gradle/wrapper/gradle-wrapper.jar differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/gradle/wrapper/gradle-wrapper.properties b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000000000000000000000000000000000..b073fb55b5462363c289a08c1c3db7b247a9a40a --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Thu Apr 01 17:02:52 KST 2021 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/gradlew b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/gradlew new file mode 100755 index 0000000000000000000000000000000000000000..cccdd3d517fc5249beaefa600691cf150f2fa3e6 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/gradlew @@ -0,0 +1,172 @@ +#!/usr/bin/env sh + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/gradlew.bat b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/gradlew.bat new file mode 100644 index 0000000000000000000000000000000000000000..e95643d6a2ca62258464e83c72f5156dc941c609 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/gradlew.bat @@ -0,0 +1,84 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/settings.gradle b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/settings.gradle new file mode 100644 index 0000000000000000000000000000000000000000..a9d77cdfa28ab27e0072a7ba2a8babccca3e33c1 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn2/settings.gradle @@ -0,0 +1,2 @@ +include ':app' +rootProject.name = "canvas" \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/.gitignore b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..aa724b77071afcbd9bb398053e05adaf7ac9405a --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/.gitignore @@ -0,0 +1,15 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild +.cxx +local.properties diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/.idea/.gitignore b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/.idea/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..26d33521af10bcc7fd8cea344038eaaeb78d0ef5 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/.idea/compiler.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/.idea/compiler.xml new file mode 100644 index 0000000000000000000000000000000000000000..61a9130cd9669c3843e6445dfe1fee2d493869bc --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/.idea/compiler.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="CompilerConfiguration"> + <bytecodeTargetLevel target="1.8" /> + </component> +</project> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/.idea/gradle.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/.idea/gradle.xml new file mode 100644 index 0000000000000000000000000000000000000000..23a89bbb6ca829a47211d20c8b11960088ea4950 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/.idea/gradle.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="GradleMigrationSettings" migrationVersion="1" /> + <component name="GradleSettings"> + <option name="linkedExternalProjectsSettings"> + <GradleProjectSettings> + <option name="testRunner" value="PLATFORM" /> + <option name="distributionType" value="DEFAULT_WRAPPED" /> + <option name="externalProjectPath" value="$PROJECT_DIR$" /> + <option name="gradleJvm" value="1.8" /> + <option name="modules"> + <set> + <option value="$PROJECT_DIR$" /> + <option value="$PROJECT_DIR$/app" /> + </set> + </option> + <option name="resolveModulePerSourceSet" value="false" /> + <option name="useQualifiedModuleNames" value="true" /> + </GradleProjectSettings> + </option> + </component> +</project> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/.idea/jarRepositories.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/.idea/jarRepositories.xml new file mode 100644 index 0000000000000000000000000000000000000000..a5f05cd8c87d4a72b0242026524cb32639fca7f0 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/.idea/jarRepositories.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="RemoteRepositoriesConfiguration"> + <remote-repository> + <option name="id" value="central" /> + <option name="name" value="Maven Central repository" /> + <option name="url" value="https://repo1.maven.org/maven2" /> + </remote-repository> + <remote-repository> + <option name="id" value="jboss.community" /> + <option name="name" value="JBoss Community repository" /> + <option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" /> + </remote-repository> + <remote-repository> + <option name="id" value="BintrayJCenter" /> + <option name="name" value="BintrayJCenter" /> + <option name="url" value="https://jcenter.bintray.com/" /> + </remote-repository> + <remote-repository> + <option name="id" value="Google" /> + <option name="name" value="Google" /> + <option name="url" value="https://dl.google.com/dl/android/maven2/" /> + </remote-repository> + </component> +</project> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/.idea/misc.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/.idea/misc.xml new file mode 100644 index 0000000000000000000000000000000000000000..d5d35ec44f10991b508f6454a85204a276726364 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/.idea/misc.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK"> + <output url="file://$PROJECT_DIR$/build/classes" /> + </component> + <component name="ProjectType"> + <option name="id" value="Android" /> + </component> +</project> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/.gitignore b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..42afabfd2abebf31384ca7797186a27a4b7dbee8 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/build.gradle b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..6aafdf462eac1133a58b3911e8548a00b113497f --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/build.gradle @@ -0,0 +1,39 @@ +plugins { + id 'com.android.application' +} + +android { + compileSdkVersion 30 + buildToolsVersion "30.0.3" + + defaultConfig { + applicationId "com.example.restaurantreserv" + minSdkVersion 26 + targetSdkVersion 30 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} + +dependencies { + + implementation 'androidx.appcompat:appcompat:1.2.0' + implementation 'com.google.android.material:material:1.3.0' + implementation 'androidx.constraintlayout:constraintlayout:2.0.4' + testImplementation 'junit:junit:4.+' + androidTestImplementation 'androidx.test.ext:junit:1.1.2' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/proguard-rules.pro b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/proguard-rules.pro new file mode 100644 index 0000000000000000000000000000000000000000..481bb434814107eb79d7a30b676d344b0df2f8ce --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/androidTest/java/com/example/restaurantreserv/ExampleInstrumentedTest.java b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/androidTest/java/com/example/restaurantreserv/ExampleInstrumentedTest.java new file mode 100644 index 0000000000000000000000000000000000000000..622dd0f1854fb2f09c8a45e4cb085e137b52ec2c --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/androidTest/java/com/example/restaurantreserv/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package com.example.restaurantreserv; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("com.example.restaurantreserv", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/AndroidManifest.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000000000000000000000000000000000000..9f868804df401724f028a064fd341ff95620abb6 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/AndroidManifest.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="com.example.restaurantreserv"> + + <application + android:allowBackup="true" + android:icon="@mipmap/ic_launcher" + android:label="@string/app_name" + android:roundIcon="@mipmap/ic_launcher_round" + android:supportsRtl="true" + android:theme="@style/Theme.RestaurantReserv"> + <activity android:name=".MainActivity"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + </application> + +</manifest> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/java/com/example/restaurantreserv/MainActivity.java b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/java/com/example/restaurantreserv/MainActivity.java new file mode 100644 index 0000000000000000000000000000000000000000..8a3ca4a5a8d8a85381d8716d0dea4afbadea7735 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/java/com/example/restaurantreserv/MainActivity.java @@ -0,0 +1,94 @@ +package com.example.restaurantreserv; + +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.app.AppCompatActivity; + +import android.content.DialogInterface; +import android.icu.util.Calendar; +import android.os.Bundle; +import android.view.MenuInflater; +import android.view.View; +import android.widget.CalendarView; +import android.widget.EditText; +import android.widget.TimePicker; +import android.view.Menu; +import android.view.MenuItem; +import android.widget.Button; +import android.widget.Toast; + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + CalendarView cal = (CalendarView)findViewById(R.id.calendarView); + cal.setOnDateChangeListener(new CalendarView.OnDateChangeListener() { + @Override + public void onSelectedDayChange(@NonNull CalendarView view, int year, int month, int dayOfMonth) { + EditText date = (EditText)findViewById(R.id.textDate); + date.setText(year+"/"+(month+1)+"/"+dayOfMonth); + } + }); + TimePicker timePicker = (TimePicker)findViewById(R.id.timepicker); + timePicker.setOnTimeChangedListener(new TimePicker.OnTimeChangedListener() { + @Override + public void onTimeChanged(TimePicker view, int hourOfDay, int minute) { + EditText time = (EditText)findViewById(R.id.textTime); + time.setText(hourOfDay+":"+minute); + } + }); + Button reserve_button =findViewById(R.id.button); + reserve_button.setOnClickListener(new View.OnClickListener(){ + public void onClick(View view){ + show_reserve(); + } + }); + } + public boolean onCreateOptionsMenu(Menu menu){ + MenuInflater inflater = getMenuInflater(); + inflater.inflate(R.menu.reservmenu,menu); + return true; + } + + public boolean onOptionsItemSelected(MenuItem item){ + if(item.getItemId()==R.id.clear){ + final Calendar c= Calendar.getInstance(); + CalendarView cal = (CalendarView)findViewById(R.id.calendarView); + TimePicker timePicker = (TimePicker)findViewById(R.id.timepicker); + cal.setDate(c.getTimeInMillis()); + int hour = c.get(Calendar.HOUR_OF_DAY); + int min = c.get(Calendar.MINUTE); + int current_mon = c.get(Calendar.MONTH); + int current_date = c.get(Calendar.DATE); + int current_year = c.get(Calendar.YEAR); + timePicker.setHour(hour); + timePicker.setMinute(min); + EditText date = (EditText)findViewById(R.id.textDate); + date.setText(current_year+"/"+(current_mon+1)+"/"+current_date); + } + return true; + } + void show_reserve(){ + AlertDialog.Builder bd = new AlertDialog.Builder (MainActivity.this); + EditText date = (EditText)findViewById(R.id.textDate); + EditText time = (EditText)findViewById(R.id.textTime); + bd.setTitle("RESERVE"); + bd.setMessage("DATE : "+date.getText()+", TIME : "+time.getText()); + bd.setPositiveButton("Yes", new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + Toast.makeText(getBaseContext(),"CONFIRMED", Toast.LENGTH_SHORT).show(); + } + }); + bd.setNegativeButton("No", new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + Toast.makeText(getBaseContext(),"CANCLED",Toast.LENGTH_SHORT).show(); + } + }); + bd.show(); + } +} diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000000000000000000000000000000000000..2b068d11462a4b96669193de13a711a3a36220a0 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:aapt="http://schemas.android.com/aapt" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z"> + <aapt:attr name="android:fillColor"> + <gradient + android:endX="85.84757" + android:endY="92.4963" + android:startX="42.9492" + android:startY="49.59793" + android:type="linear"> + <item + android:color="#44000000" + android:offset="0.0" /> + <item + android:color="#00000000" + android:offset="1.0" /> + </gradient> + </aapt:attr> + </path> + <path + android:fillColor="#FFFFFF" + android:fillType="nonZero" + android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z" + android:strokeWidth="1" + android:strokeColor="#00000000" /> +</vector> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/drawable/ic_launcher_background.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000000000000000000000000000000000000..07d5da9cbf141911847041df5d7b87f0dd5ef9d4 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <path + android:fillColor="#3DDC84" + android:pathData="M0,0h108v108h-108z" /> + <path + android:fillColor="#00000000" + android:pathData="M9,0L9,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,0L19,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M29,0L29,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M39,0L39,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M49,0L49,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M59,0L59,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M69,0L69,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M79,0L79,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M89,0L89,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M99,0L99,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,9L108,9" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,19L108,19" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,29L108,29" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,39L108,39" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,49L108,49" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,59L108,59" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,69L108,69" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,79L108,79" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,89L108,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,99L108,99" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,29L89,29" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,39L89,39" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,49L89,49" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,59L89,59" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,69L89,69" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,79L89,79" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M29,19L29,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M39,19L39,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M49,19L49,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M59,19L59,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M69,19L69,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M79,19L79,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> +</vector> diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/layout/activity_main.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000000000000000000000000000000000000..96a1e73076097e6a4946f4641d048fb719bb7a76 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,93 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context=".MainActivity"> + + <TextView + android:id="@+id/textView" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/title" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.498" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.0" /> + + <CalendarView + android:id="@+id/calendarView" + android:layout_width="351dp" + android:layout_height="301dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="@+id/textView" + app:layout_constraintVertical_bias="0.072" /> + + <TimePicker + android:id="@+id/timepicker" + android:layout_width="352dp" + android:layout_height="147dp" + android:layout_marginTop="344dp" + android:timePickerMode="spinner" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.533" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="@+id/textView" /> + + <Button + android:id="@+id/button" + android:layout_width="343dp" + android:layout_height="51dp" + android:text="@string/reserve" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.485" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.973" /> + + <LinearLayout + android:id="@+id/linearLayout" + android:layout_width="354dp" + android:layout_height="47dp" + android:orientation="horizontal" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.543" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.874"> + + <TextView + android:id="@+id/textView2" + android:layout_width="58dp" + android:layout_height="23dp" + android:layout_weight="1" + android:text="@string/reserve_date" + tools:layout_editor_absoluteX="31dp" + tools:layout_editor_absoluteY="612dp" /> + + <EditText + android:id="@+id/textDate" + android:layout_width="115dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:ems="10" + android:inputType="textPersonName" /> + + <EditText + android:id="@+id/textTime" + android:layout_width="114dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:ems="10" + android:inputType="textPersonName" + tools:layout_editor_absoluteX="249dp" + tools:layout_editor_absoluteY="598dp" /> + </LinearLayout> +</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/menu/reservmenu.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/menu/reservmenu.xml new file mode 100644 index 0000000000000000000000000000000000000000..1a24f4a6c07ee86829eec26f6e4fffbdad441db8 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/menu/reservmenu.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<menu xmlns:android="http://schemas.android.com/apk/res/android"> + + <item + android:id="@+id/clear" + android:title="Clear" /> +</menu> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000000000000000000000000000000000000..eca70cfe52eac1ba66ba280a68ca7be8fcf88a16 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@drawable/ic_launcher_background" /> + <foreground android:drawable="@drawable/ic_launcher_foreground" /> +</adaptive-icon> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000000000000000000000000000000000000..eca70cfe52eac1ba66ba280a68ca7be8fcf88a16 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@drawable/ic_launcher_background" /> + <foreground android:drawable="@drawable/ic_launcher_foreground" /> +</adaptive-icon> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-hdpi/ic_launcher.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..a571e60098c92c2baca8a5df62f2929cbff01b52 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..61da551c5594a1f9d26193983d2cd69189014603 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-mdpi/ic_launcher.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..c41dd28531901b2c23927768c84bb6765ebcc1db Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..db5080a752731b34d38d7c634732b2cd999125d0 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..6dba46dab19242bf475ddf2e0a10042de6a0be16 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..da31a871c8dc461a1ea114510bfac640307b0a90 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..15ac681720f3df43c647bf0c081f0314ee34eae1 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..b216f2d313cc673d8b8c4da591c174ebed52795c Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..f25a419744727fb48b4b4137b6c6a3a8f2620d51 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..e96783ccce844001359f968f5cd9d85b341bd3fb Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/values-night/themes.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/values-night/themes.xml new file mode 100644 index 0000000000000000000000000000000000000000..7b790f935bf61b5d77dcfdeb5315dbe39d942332 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/values-night/themes.xml @@ -0,0 +1,16 @@ +<resources xmlns:tools="http://schemas.android.com/tools"> + <!-- Base application theme. --> + <style name="Theme.RestaurantReserv" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> + <!-- Primary brand color. --> + <item name="colorPrimary">@color/purple_200</item> + <item name="colorPrimaryVariant">@color/purple_700</item> + <item name="colorOnPrimary">@color/black</item> + <!-- Secondary brand color. --> + <item name="colorSecondary">@color/teal_200</item> + <item name="colorSecondaryVariant">@color/teal_200</item> + <item name="colorOnSecondary">@color/black</item> + <!-- Status bar color. --> + <item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item> + <!-- Customize your theme here. --> + </style> +</resources> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/values/colors.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/values/colors.xml new file mode 100644 index 0000000000000000000000000000000000000000..f8c6127d327620c93d2b2d00342a68e97b98a48d --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/values/colors.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <color name="purple_200">#FFBB86FC</color> + <color name="purple_500">#FF6200EE</color> + <color name="purple_700">#FF3700B3</color> + <color name="teal_200">#FF03DAC5</color> + <color name="teal_700">#FF018786</color> + <color name="black">#FF000000</color> + <color name="white">#FFFFFFFF</color> +</resources> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/values/strings.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/values/strings.xml new file mode 100644 index 0000000000000000000000000000000000000000..153e4e6678819d223702bc6eadf64fa1ed50ff9f --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/values/strings.xml @@ -0,0 +1,6 @@ +<resources> + <string name="app_name">restaurantReserv</string> + <string name="title">식당 예약 어플리케이</string> + <string name="reserve_date">예약 날짜 : </string> + <string name="reserve">예약</string> +</resources> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/values/themes.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/values/themes.xml new file mode 100644 index 0000000000000000000000000000000000000000..cfa9c8c8b451ad469d8a10a046a9d64fa28376e8 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/main/res/values/themes.xml @@ -0,0 +1,16 @@ +<resources xmlns:tools="http://schemas.android.com/tools"> + <!-- Base application theme. --> + <style name="Theme.RestaurantReserv" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> + <!-- Primary brand color. --> + <item name="colorPrimary">@color/purple_500</item> + <item name="colorPrimaryVariant">@color/purple_700</item> + <item name="colorOnPrimary">@color/white</item> + <!-- Secondary brand color. --> + <item name="colorSecondary">@color/teal_200</item> + <item name="colorSecondaryVariant">@color/teal_700</item> + <item name="colorOnSecondary">@color/black</item> + <!-- Status bar color. --> + <item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item> + <!-- Customize your theme here. --> + </style> +</resources> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/test/java/com/example/restaurantreserv/ExampleUnitTest.java b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/test/java/com/example/restaurantreserv/ExampleUnitTest.java new file mode 100644 index 0000000000000000000000000000000000000000..b7a0edb682182a60f3a50ae45a68757756cbc5c9 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/app/src/test/java/com/example/restaurantreserv/ExampleUnitTest.java @@ -0,0 +1,17 @@ +package com.example.restaurantreserv; + +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/build.gradle b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..dfbc7c14144f78c77042100b30a5b8695b4c8ea4 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/build.gradle @@ -0,0 +1,24 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. +buildscript { + repositories { + google() + jcenter() + } + dependencies { + classpath "com.android.tools.build:gradle:4.1.2" + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + google() + jcenter() + } +} + +task clean(type: Delete) { + delete rootProject.buildDir +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/gradle.properties b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/gradle.properties new file mode 100644 index 0000000000000000000000000000000000000000..52f5917cb0d0c47fd00ba8ee85c14eb27e1c41cc --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/gradle.properties @@ -0,0 +1,19 @@ +# Project-wide Gradle settings. +# IDE (e.g. Android 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. +org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app"s APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true +# Automatically convert third-party libraries to use AndroidX +android.enableJetifier=true \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/gradle/wrapper/gradle-wrapper.jar b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..f6b961fd5a86aa5fbfe90f707c3138408be7c718 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/gradle/wrapper/gradle-wrapper.jar differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/gradle/wrapper/gradle-wrapper.properties b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000000000000000000000000000000000..3510ba8798b6ecc24220748b675ff6abba5147fc --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Thu Apr 08 17:02:34 KST 2021 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/gradlew b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/gradlew new file mode 100755 index 0000000000000000000000000000000000000000..cccdd3d517fc5249beaefa600691cf150f2fa3e6 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/gradlew @@ -0,0 +1,172 @@ +#!/usr/bin/env sh + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/gradlew.bat b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/gradlew.bat new file mode 100644 index 0000000000000000000000000000000000000000..e95643d6a2ca62258464e83c72f5156dc941c609 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/gradlew.bat @@ -0,0 +1,84 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/settings.gradle b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/settings.gradle new file mode 100644 index 0000000000000000000000000000000000000000..ec65f36a0dae76b861d084546cd8aea6f30bb997 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn3/settings.gradle @@ -0,0 +1,2 @@ +include ':app' +rootProject.name = "restaurantReserv" \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/.gitignore b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..aa724b77071afcbd9bb398053e05adaf7ac9405a --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/.gitignore @@ -0,0 +1,15 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild +.cxx +local.properties diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/.idea/.gitignore b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/.idea/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..26d33521af10bcc7fd8cea344038eaaeb78d0ef5 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/.idea/compiler.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/.idea/compiler.xml new file mode 100644 index 0000000000000000000000000000000000000000..61a9130cd9669c3843e6445dfe1fee2d493869bc --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/.idea/compiler.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="CompilerConfiguration"> + <bytecodeTargetLevel target="1.8" /> + </component> +</project> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/.idea/gradle.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/.idea/gradle.xml new file mode 100644 index 0000000000000000000000000000000000000000..23a89bbb6ca829a47211d20c8b11960088ea4950 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/.idea/gradle.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="GradleMigrationSettings" migrationVersion="1" /> + <component name="GradleSettings"> + <option name="linkedExternalProjectsSettings"> + <GradleProjectSettings> + <option name="testRunner" value="PLATFORM" /> + <option name="distributionType" value="DEFAULT_WRAPPED" /> + <option name="externalProjectPath" value="$PROJECT_DIR$" /> + <option name="gradleJvm" value="1.8" /> + <option name="modules"> + <set> + <option value="$PROJECT_DIR$" /> + <option value="$PROJECT_DIR$/app" /> + </set> + </option> + <option name="resolveModulePerSourceSet" value="false" /> + <option name="useQualifiedModuleNames" value="true" /> + </GradleProjectSettings> + </option> + </component> +</project> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/.idea/jarRepositories.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/.idea/jarRepositories.xml new file mode 100644 index 0000000000000000000000000000000000000000..a5f05cd8c87d4a72b0242026524cb32639fca7f0 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/.idea/jarRepositories.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="RemoteRepositoriesConfiguration"> + <remote-repository> + <option name="id" value="central" /> + <option name="name" value="Maven Central repository" /> + <option name="url" value="https://repo1.maven.org/maven2" /> + </remote-repository> + <remote-repository> + <option name="id" value="jboss.community" /> + <option name="name" value="JBoss Community repository" /> + <option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" /> + </remote-repository> + <remote-repository> + <option name="id" value="BintrayJCenter" /> + <option name="name" value="BintrayJCenter" /> + <option name="url" value="https://jcenter.bintray.com/" /> + </remote-repository> + <remote-repository> + <option name="id" value="Google" /> + <option name="name" value="Google" /> + <option name="url" value="https://dl.google.com/dl/android/maven2/" /> + </remote-repository> + </component> +</project> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/.idea/misc.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/.idea/misc.xml new file mode 100644 index 0000000000000000000000000000000000000000..d5d35ec44f10991b508f6454a85204a276726364 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/.idea/misc.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK"> + <output url="file://$PROJECT_DIR$/build/classes" /> + </component> + <component name="ProjectType"> + <option name="id" value="Android" /> + </component> +</project> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/.gitignore b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..42afabfd2abebf31384ca7797186a27a4b7dbee8 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/build.gradle b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..38df9e6df603275be5bfe5ffe04ad90f170a1cc7 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/build.gradle @@ -0,0 +1,40 @@ +plugins { + id 'com.android.application' +} + +android { + compileSdkVersion 30 + buildToolsVersion "30.0.3" + + defaultConfig { + applicationId "com.example.dictionary" + minSdkVersion 26 + targetSdkVersion 30 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} + +dependencies { + + implementation 'androidx.appcompat:appcompat:1.2.0' + implementation 'com.google.android.material:material:1.3.0' + implementation 'androidx.constraintlayout:constraintlayout:2.0.4' + implementation 'androidx.legacy:legacy-support-v4:1.0.0' + testImplementation 'junit:junit:4.+' + androidTestImplementation 'androidx.test.ext:junit:1.1.2' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/proguard-rules.pro b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/proguard-rules.pro new file mode 100644 index 0000000000000000000000000000000000000000..481bb434814107eb79d7a30b676d344b0df2f8ce --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/androidTest/java/com/example/dictionary/ExampleInstrumentedTest.java b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/androidTest/java/com/example/dictionary/ExampleInstrumentedTest.java new file mode 100644 index 0000000000000000000000000000000000000000..cdd4aab97d5f1340605c1b04a28191455005e9d9 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/androidTest/java/com/example/dictionary/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package com.example.dictionary; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("com.example.dictionary", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/AndroidManifest.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000000000000000000000000000000000000..c3024e5ca699504b6f905bb8bc95046063805ecb --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/AndroidManifest.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="com.example.dictionary"> + + <application + android:allowBackup="true" + android:icon="@mipmap/ic_launcher" + android:label="@string/app_name" + android:roundIcon="@mipmap/ic_launcher_round" + android:supportsRtl="true" + android:theme="@style/Theme.Dictionary"> + <activity android:name=".MainActivity"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + </application> + +</manifest> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/java/com/example/dictionary/Data.java b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/java/com/example/dictionary/Data.java new file mode 100644 index 0000000000000000000000000000000000000000..bbbf6007f6847a5f79443a8c4f82744bb41edfbd --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/java/com/example/dictionary/Data.java @@ -0,0 +1,41 @@ +package com.example.dictionary; + +public class Data { + + static String[] words = { + "Fragment", + "Activity", + "ListView", + "Adapter", + "View", + "TextView", + "ListAdapter", + "ImageView", + "LayoutInflater", + "MenuInflater", + "Window", + "Log", + "Property", + "ArraySet", + "TimeUtils" + }; + + static String[] definitions = { + "프래그먼트(fragment)는 하니콤 버전(API 버전 11)부터 추가된 기능이다. 프래그먼트는 태블릿과 같은 넓은 화면을 가지는 모바일 장치를 위한 매카니즘이다.", + "액티비티(activity)는 사용자 인터페이스 화면을 가지는 하나의 작업을 담당하는 컴포넌트이다.", + "ListView는 스크롤 가능한 항목의 목록을 표시하는 뷰 그룹입니다.", + "Adapter 객체는 AdapterView해당 뷰에 대한 기본 데이터와 해당 뷰 간의 연결 역할을합니다. 어댑터는 데이터 항목에 대한 액세스를 제공합니다.", + "이 클래스는 사용자 인터페이스 구성 요소의 기본 구성 요소를 나타냅니다. 뷰는 화면의 직사각형 영역을 차지하며 그리기 및 이벤트 처리를 담당합니다.", + "사용자에게 텍스트를 표시하는 사용자 인터페이스 요소이다.", + "확장 Adapter은 a ListView 와 목록을 백업하는 데이터 사이의 다리 입니다. 종종 데이터는 커서에서 가져 오지만 필수는 아닙니다. ListView는 ListAdapter에 래핑 된 모든 데이터를 표시 할 수 있습니다.", + "이미지 리소스를 표시 Bitmap 또는 Drawable자원. ImageView도 일반적으로 사용 apply tints to an image되며 처리 image scaling됩니다.", + "레이아웃 XML 파일을 해당 View 객체로 인스턴스화합니다. 직접적으로 사용되지 않습니다. 대신에 getLayoutInflater () 또는 getSystemService (Class)를 사용하여 이미 현재 컨텍스트에 연결되어 있다", + "이 클래스는 메뉴 XML 파일을 Menu 객체로 인스턴스화하는 데 사용됩니다.", + "톱 레벨의 윈도우의 외관과 동작 정책의 추상 기본 클래스입니다. 이 클래스의 인스턴스는 창 관리자에 추가 된 최상위보기로 사용해야합니다. 배경, 제목 영역, 기본 키 처리 등과 같은 표준 UI 정책을 제공합니다.", + "로그 출력을 보내기위한 API. 일반적으로 로그를 작성하려면 Log.v (), Log.d (), Log.i (), Log.w () 및 Log.e () 메서드를 사용해야합니다. 그런 다음 logcat에서 로그를 볼 수 있습니다.", + "속성은 호스트 개체에 보관되는 변경 가능한 값을 나타내는 데 사용할 수있는 추상화입니다. 속성의 set (Object, Object) 또는 get (Object) 메서드는 호스트 객체의 비공개 필드 또는 \"setter\"및 \"getter\"메서드를 통해 구현하거나 다른 메커니즘을 통해 구현할 수 있습니다.", + "ArraySet은 전통적인 HashSet보다 메모리 효율이 높도록 설계된 일반적인 세트 데이터 구조입니다. 이 디자인은 ArrayMap과 매우 유사하며 모든 문제점이 설명되어 있습니다. 그러나이 구현은 ArrayMap과 별개이므로 Object 배열에는 매핑의 쌍 대신에 집합의 각 항목에 대해 하나의 항목 만 포함됩니다.", + "표준 시간대와 관련된 유틸리티 메서드가 포함 된 클래스입니다." + }; +} + diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/java/com/example/dictionary/DefinitionFragment.java b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/java/com/example/dictionary/DefinitionFragment.java new file mode 100644 index 0000000000000000000000000000000000000000..268c81e2557e543991a9861bce697f41928813c9 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/java/com/example/dictionary/DefinitionFragment.java @@ -0,0 +1,79 @@ +package com.example.dictionary; + +import android.os.Bundle; +import android.widget.TextView; +import androidx.fragment.app.Fragment; + +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +/** + * A simple {@link Fragment} subclass. + * Use the {@link DefinitionFragment#newInstance} factory method to + * create an instance of this fragment. + */ +public class DefinitionFragment extends Fragment { + final static String ARG_POSITION = "position"; + // TODO: Rename parameter arguments, choose names that match + // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER + private static final String ARG_PARAM1 = "param1"; + private static final String ARG_PARAM2 = "param2"; + + // TODO: Rename and change types of parameters + private String mParam1; + private String mParam2; + + public DefinitionFragment() { + // Required empty public constructor + } + + /** + * Use this factory method to create a new instance of + * this fragment using the provided parameters. + * + * @param param1 Parameter 1. + * @param param2 Parameter 2. + * @return A new instance of fragment DefinitionFragment. + */ + // TODO: Rename and change types and number of parameters + public static DefinitionFragment newInstance(String param1, String param2) { + DefinitionFragment fragment = new DefinitionFragment(); + Bundle args = new Bundle(); + args.putString(ARG_PARAM1, param1); + args.putString(ARG_PARAM2, param2); + fragment.setArguments(args); + return fragment; + } + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + if (getArguments() != null) { + mParam1 = getArguments().getString(ARG_PARAM1); + mParam2 = getArguments().getString(ARG_PARAM2); + } + } + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_definition, container, false); + } + + public void onStart(){ + super.onStart(); + + Bundle args = getArguments(); + if(args != null){ + int pos = args.getInt("position"); + updateDefinitionView(pos); + } + } + + public void updateDefinitionView(int position){ + TextView def = (TextView) getView().findViewById(R.id.definition); + def.setText(Data.definitions[position]); + } +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/java/com/example/dictionary/MainActivity.java b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/java/com/example/dictionary/MainActivity.java new file mode 100644 index 0000000000000000000000000000000000000000..1b7299a2b94b835cc35134c036101654a2320211 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/java/com/example/dictionary/MainActivity.java @@ -0,0 +1,38 @@ +package com.example.dictionary; + +import androidx.appcompat.app.AppCompatActivity; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentTransaction; + +import android.os.Bundle; + +public class MainActivity extends AppCompatActivity implements WordFragment.OnWordSelectedListener { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + if(findViewById(R.id.fragment_container)!=null){ + WordFragment wordFragment = new WordFragment(); + FragmentManager fm = getSupportFragmentManager(); + fm.beginTransaction().add(R.id.fragment_container,wordFragment).commit(); + } + } + public void onWordSelected(int position) { + if (findViewById(R.id.fragment_container) == null) { + DefinitionFragment defFrag = (DefinitionFragment) getSupportFragmentManager() + .findFragmentById(R.id.definition_fragment); + defFrag.updateDefinitionView(position); + } else { + DefinitionFragment newFragment = new DefinitionFragment(); + Bundle args = new Bundle(); + args.putInt(DefinitionFragment.ARG_POSITION, position); + newFragment.setArguments(args); + FragmentTransaction transaction = getSupportFragmentManager().beginTransaction(); + transaction.replace(R.id.fragment_container, newFragment); + transaction.addToBackStack(null); + transaction.commit(); + } + } +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/java/com/example/dictionary/WordFragment.java b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/java/com/example/dictionary/WordFragment.java new file mode 100644 index 0000000000000000000000000000000000000000..2bbd107623ee78d7e89d4af08860d3ba35d2ad28 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/java/com/example/dictionary/WordFragment.java @@ -0,0 +1,84 @@ +package com.example.dictionary; + +import android.os.Bundle; + +import androidx.fragment.app.Fragment; + +import android.widget.AdapterView; +import android.widget.ListView; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.ArrayAdapter; + + +/** + * A simple {@link Fragment} subclass. + * Use the {@link WordFragment#newInstance} factory method to + * create an instance of this fragment. + */ +public class WordFragment extends Fragment { + + // TODO: Rename parameter arguments, choose names that match + // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER + private static final String ARG_PARAM1 = "param1"; + private static final String ARG_PARAM2 = "param2"; + + // TODO: Rename and change types of parameters + private String mParam1; + private String mParam2; + + public WordFragment() { + // Required empty public constructor + } + + public interface OnWordSelectedListener{ + public void onWordSelected(int position); + } + + OnWordSelectedListener mWordSelectedListener; + /** + * Use this factory method to create a new instance of + * this fragment using the provided parameters. + * + * @param param1 Parameter 1. + * @param param2 Parameter 2. + * @return A new instance of fragment WordFragment. + */ + // TODO: Rename and change types and number of parameters + public static WordFragment newInstance(String param1, String param2) { + WordFragment fragment = new WordFragment(); + Bundle args = new Bundle(); + args.putString(ARG_PARAM1, param1); + args.putString(ARG_PARAM2, param2); + fragment.setArguments(args); + return fragment; + } + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + if (getArguments() != null) { + mParam1 = getArguments().getString(ARG_PARAM1); + mParam2 = getArguments().getString(ARG_PARAM2); + } + } + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + View view = inflater.inflate(R.layout.fragment_word,container,false); + + ListView listView =view.findViewById(R.id.word_list); + listView.setAdapter(new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_1,Data.words)); + listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { + @Override + public void onItemClick(AdapterView<?> parent, View view, int position, long id) { + mWordSelectedListener.onWordSelected(position); + } + }); + mWordSelectedListener = (MainActivity)getActivity(); + return view; + } +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000000000000000000000000000000000000..2b068d11462a4b96669193de13a711a3a36220a0 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:aapt="http://schemas.android.com/aapt" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z"> + <aapt:attr name="android:fillColor"> + <gradient + android:endX="85.84757" + android:endY="92.4963" + android:startX="42.9492" + android:startY="49.59793" + android:type="linear"> + <item + android:color="#44000000" + android:offset="0.0" /> + <item + android:color="#00000000" + android:offset="1.0" /> + </gradient> + </aapt:attr> + </path> + <path + android:fillColor="#FFFFFF" + android:fillType="nonZero" + android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z" + android:strokeWidth="1" + android:strokeColor="#00000000" /> +</vector> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/drawable/ic_launcher_background.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000000000000000000000000000000000000..07d5da9cbf141911847041df5d7b87f0dd5ef9d4 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <path + android:fillColor="#3DDC84" + android:pathData="M0,0h108v108h-108z" /> + <path + android:fillColor="#00000000" + android:pathData="M9,0L9,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,0L19,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M29,0L29,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M39,0L39,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M49,0L49,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M59,0L59,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M69,0L69,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M79,0L79,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M89,0L89,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M99,0L99,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,9L108,9" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,19L108,19" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,29L108,29" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,39L108,39" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,49L108,49" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,59L108,59" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,69L108,69" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,79L108,79" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,89L108,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,99L108,99" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,29L89,29" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,39L89,39" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,49L89,49" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,59L89,59" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,69L89,69" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,79L89,79" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M29,19L29,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M39,19L39,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M49,19L49,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M59,19L59,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M69,19L69,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M79,19L79,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> +</vector> diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/layout-land/activity_main.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/layout-land/activity_main.xml new file mode 100644 index 0000000000000000000000000000000000000000..22e692c646e3b368a7f6f3a2e82f12bee7b38eb3 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/layout-land/activity_main.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="horizontal" > + <fragment + android:id="@+id/words_fragment" + android:name="com.example.dictionary.WordFragment" + android:layout_width="0dp" + android:layout_height="match_parent" + android:layout_weight="1" /> + <fragment + android:id="@+id/definition_fragment" + android:name="com.example.dictionary.DefinitionFragment" + android:layout_width="0dp" + android:layout_height="match_parent" + android:layout_weight="2" /> +</LinearLayout> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/layout/activity_main.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000000000000000000000000000000000000..0e5e42dd3765146344d74ccbf1b3b193329dd7f1 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context=".MainActivity"> + + <FrameLayout + android:layout_width="match_parent" + android:layout_height="match_parent" + android:id="@+id/fragment_container" + /> + +</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/layout/fragment_definition.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/layout/fragment_definition.xml new file mode 100644 index 0000000000000000000000000000000000000000..7166add6ed524eba9f5cc0148bc244e83c3df937 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/layout/fragment_definition.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8"?> +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context=".DefinitionFragment"> + + <!-- TODO: Update blank fragment layout --> + <TextView + android:id="@+id/definition" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="#4CAF50" + android:text="@string/hello_blank_fragment" /> + +</FrameLayout> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/layout/fragment_word.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/layout/fragment_word.xml new file mode 100644 index 0000000000000000000000000000000000000000..6c69cfd480bc7052de7e4abd200b1dc9ef3394bc --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/layout/fragment_word.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context=".WordFragment"> + + <!-- TODO: Update blank fragment layout --> + <ListView + android:layout_width="match_parent" + android:layout_height="match_parent" + android:id="@+id/word_list" /> + +</FrameLayout> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000000000000000000000000000000000000..eca70cfe52eac1ba66ba280a68ca7be8fcf88a16 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@drawable/ic_launcher_background" /> + <foreground android:drawable="@drawable/ic_launcher_foreground" /> +</adaptive-icon> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000000000000000000000000000000000000..eca70cfe52eac1ba66ba280a68ca7be8fcf88a16 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@drawable/ic_launcher_background" /> + <foreground android:drawable="@drawable/ic_launcher_foreground" /> +</adaptive-icon> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-hdpi/ic_launcher.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..a571e60098c92c2baca8a5df62f2929cbff01b52 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..61da551c5594a1f9d26193983d2cd69189014603 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-mdpi/ic_launcher.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..c41dd28531901b2c23927768c84bb6765ebcc1db Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..db5080a752731b34d38d7c634732b2cd999125d0 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..6dba46dab19242bf475ddf2e0a10042de6a0be16 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..da31a871c8dc461a1ea114510bfac640307b0a90 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..15ac681720f3df43c647bf0c081f0314ee34eae1 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..b216f2d313cc673d8b8c4da591c174ebed52795c Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..f25a419744727fb48b4b4137b6c6a3a8f2620d51 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..e96783ccce844001359f968f5cd9d85b341bd3fb Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/values-night/themes.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/values-night/themes.xml new file mode 100644 index 0000000000000000000000000000000000000000..4fac392613001dd396c08530743d831bb4da1470 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/values-night/themes.xml @@ -0,0 +1,16 @@ +<resources xmlns:tools="http://schemas.android.com/tools"> + <!-- Base application theme. --> + <style name="Theme.Dictionary" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> + <!-- Primary brand color. --> + <item name="colorPrimary">@color/purple_200</item> + <item name="colorPrimaryVariant">@color/purple_700</item> + <item name="colorOnPrimary">@color/black</item> + <!-- Secondary brand color. --> + <item name="colorSecondary">@color/teal_200</item> + <item name="colorSecondaryVariant">@color/teal_200</item> + <item name="colorOnSecondary">@color/black</item> + <!-- Status bar color. --> + <item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item> + <!-- Customize your theme here. --> + </style> +</resources> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/values/colors.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/values/colors.xml new file mode 100644 index 0000000000000000000000000000000000000000..f8c6127d327620c93d2b2d00342a68e97b98a48d --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/values/colors.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <color name="purple_200">#FFBB86FC</color> + <color name="purple_500">#FF6200EE</color> + <color name="purple_700">#FF3700B3</color> + <color name="teal_200">#FF03DAC5</color> + <color name="teal_700">#FF018786</color> + <color name="black">#FF000000</color> + <color name="white">#FFFFFFFF</color> +</resources> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/values/strings.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/values/strings.xml new file mode 100644 index 0000000000000000000000000000000000000000..46b7da073b07d51a82a9e9bae85c3891ffa13a68 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/values/strings.xml @@ -0,0 +1,5 @@ +<resources> + <string name="app_name">Dictionary</string> + <!-- TODO: Remove or change this placeholder text --> + <string name="hello_blank_fragment">Hello blank fragment</string> +</resources> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/values/themes.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/values/themes.xml new file mode 100644 index 0000000000000000000000000000000000000000..724503ba4e56eb57a4061a620ededd9703b71368 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/main/res/values/themes.xml @@ -0,0 +1,16 @@ +<resources xmlns:tools="http://schemas.android.com/tools"> + <!-- Base application theme. --> + <style name="Theme.Dictionary" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> + <!-- Primary brand color. --> + <item name="colorPrimary">@color/purple_500</item> + <item name="colorPrimaryVariant">@color/purple_700</item> + <item name="colorOnPrimary">@color/white</item> + <!-- Secondary brand color. --> + <item name="colorSecondary">@color/teal_200</item> + <item name="colorSecondaryVariant">@color/teal_700</item> + <item name="colorOnSecondary">@color/black</item> + <!-- Status bar color. --> + <item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item> + <!-- Customize your theme here. --> + </style> +</resources> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/test/java/com/example/dictionary/ExampleUnitTest.java b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/test/java/com/example/dictionary/ExampleUnitTest.java new file mode 100644 index 0000000000000000000000000000000000000000..ed83b6b6688f60e47d7ef46419f80658f8f1fece --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/app/src/test/java/com/example/dictionary/ExampleUnitTest.java @@ -0,0 +1,17 @@ +package com.example.dictionary; + +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/build.gradle b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..dfbc7c14144f78c77042100b30a5b8695b4c8ea4 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/build.gradle @@ -0,0 +1,24 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. +buildscript { + repositories { + google() + jcenter() + } + dependencies { + classpath "com.android.tools.build:gradle:4.1.2" + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + google() + jcenter() + } +} + +task clean(type: Delete) { + delete rootProject.buildDir +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/gradle.properties b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/gradle.properties new file mode 100644 index 0000000000000000000000000000000000000000..52f5917cb0d0c47fd00ba8ee85c14eb27e1c41cc --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/gradle.properties @@ -0,0 +1,19 @@ +# Project-wide Gradle settings. +# IDE (e.g. Android 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. +org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app"s APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true +# Automatically convert third-party libraries to use AndroidX +android.enableJetifier=true \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/gradle/wrapper/gradle-wrapper.jar b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..f6b961fd5a86aa5fbfe90f707c3138408be7c718 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/gradle/wrapper/gradle-wrapper.jar differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/gradle/wrapper/gradle-wrapper.properties b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000000000000000000000000000000000..c9d24326a6f8973edc13a5084fccb8002f943d18 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Thu Apr 15 17:04:35 KST 2021 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/gradlew b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/gradlew new file mode 100755 index 0000000000000000000000000000000000000000..cccdd3d517fc5249beaefa600691cf150f2fa3e6 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/gradlew @@ -0,0 +1,172 @@ +#!/usr/bin/env sh + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/gradlew.bat b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/gradlew.bat new file mode 100644 index 0000000000000000000000000000000000000000..e95643d6a2ca62258464e83c72f5156dc941c609 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/gradlew.bat @@ -0,0 +1,84 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/settings.gradle b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/settings.gradle new file mode 100644 index 0000000000000000000000000000000000000000..e8ed4e11a9f96032aa6a24559209025b3ba91e71 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn4/settings.gradle @@ -0,0 +1,2 @@ +include ':app' +rootProject.name = "Dictionary" \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/.gitignore b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..aa724b77071afcbd9bb398053e05adaf7ac9405a --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/.gitignore @@ -0,0 +1,15 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild +.cxx +local.properties diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/.idea/.gitignore b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/.idea/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..26d33521af10bcc7fd8cea344038eaaeb78d0ef5 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/.idea/.name b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/.idea/.name new file mode 100644 index 0000000000000000000000000000000000000000..b3405b3b32436569d6c9166762efd07fff07e534 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/.idea/.name @@ -0,0 +1 @@ +My Application \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/.idea/compiler.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/.idea/compiler.xml new file mode 100644 index 0000000000000000000000000000000000000000..61a9130cd9669c3843e6445dfe1fee2d493869bc --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/.idea/compiler.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="CompilerConfiguration"> + <bytecodeTargetLevel target="1.8" /> + </component> +</project> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/.idea/gradle.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/.idea/gradle.xml new file mode 100644 index 0000000000000000000000000000000000000000..23a89bbb6ca829a47211d20c8b11960088ea4950 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/.idea/gradle.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="GradleMigrationSettings" migrationVersion="1" /> + <component name="GradleSettings"> + <option name="linkedExternalProjectsSettings"> + <GradleProjectSettings> + <option name="testRunner" value="PLATFORM" /> + <option name="distributionType" value="DEFAULT_WRAPPED" /> + <option name="externalProjectPath" value="$PROJECT_DIR$" /> + <option name="gradleJvm" value="1.8" /> + <option name="modules"> + <set> + <option value="$PROJECT_DIR$" /> + <option value="$PROJECT_DIR$/app" /> + </set> + </option> + <option name="resolveModulePerSourceSet" value="false" /> + <option name="useQualifiedModuleNames" value="true" /> + </GradleProjectSettings> + </option> + </component> +</project> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/.idea/jarRepositories.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/.idea/jarRepositories.xml new file mode 100644 index 0000000000000000000000000000000000000000..a5f05cd8c87d4a72b0242026524cb32639fca7f0 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/.idea/jarRepositories.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="RemoteRepositoriesConfiguration"> + <remote-repository> + <option name="id" value="central" /> + <option name="name" value="Maven Central repository" /> + <option name="url" value="https://repo1.maven.org/maven2" /> + </remote-repository> + <remote-repository> + <option name="id" value="jboss.community" /> + <option name="name" value="JBoss Community repository" /> + <option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" /> + </remote-repository> + <remote-repository> + <option name="id" value="BintrayJCenter" /> + <option name="name" value="BintrayJCenter" /> + <option name="url" value="https://jcenter.bintray.com/" /> + </remote-repository> + <remote-repository> + <option name="id" value="Google" /> + <option name="name" value="Google" /> + <option name="url" value="https://dl.google.com/dl/android/maven2/" /> + </remote-repository> + </component> +</project> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/.idea/misc.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/.idea/misc.xml new file mode 100644 index 0000000000000000000000000000000000000000..d5d35ec44f10991b508f6454a85204a276726364 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/.idea/misc.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK"> + <output url="file://$PROJECT_DIR$/build/classes" /> + </component> + <component name="ProjectType"> + <option name="id" value="Android" /> + </component> +</project> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/.gitignore b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..42afabfd2abebf31384ca7797186a27a4b7dbee8 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/build.gradle b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..efd51662dc33fff2d12e7baf036ddea366ecaee6 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/build.gradle @@ -0,0 +1,39 @@ +plugins { + id 'com.android.application' +} + +android { + compileSdkVersion 30 + buildToolsVersion "30.0.3" + + defaultConfig { + applicationId "com.example.myapplication" + minSdkVersion 26 + targetSdkVersion 30 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} + +dependencies { + + implementation 'androidx.appcompat:appcompat:1.2.0' + implementation 'com.google.android.material:material:1.3.0' + implementation 'androidx.constraintlayout:constraintlayout:2.0.4' + testImplementation 'junit:junit:4.+' + androidTestImplementation 'androidx.test.ext:junit:1.1.2' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/proguard-rules.pro b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/proguard-rules.pro new file mode 100644 index 0000000000000000000000000000000000000000..481bb434814107eb79d7a30b676d344b0df2f8ce --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/androidTest/java/com/example/myapplication/ExampleInstrumentedTest.java b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/androidTest/java/com/example/myapplication/ExampleInstrumentedTest.java new file mode 100644 index 0000000000000000000000000000000000000000..982ba517a4b447bebc00ed3d1e784228226aef3b --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/androidTest/java/com/example/myapplication/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package com.example.myapplication; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("com.example.myapplication", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/AndroidManifest.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000000000000000000000000000000000000..d8f67c272ee1311d0ce6419561e1938a0dbcd28b --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/AndroidManifest.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="com.example.myapplication"> + + <application + android:allowBackup="true" + android:icon="@mipmap/ic_launcher" + android:label="@string/app_name" + android:roundIcon="@mipmap/ic_launcher_round" + android:supportsRtl="true" + android:theme="@style/Theme.MyApplication"> + <service + android:name=".AnimationService" + android:exported="false"></service> + + <activity android:name=".MainActivity"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + </application> + +</manifest> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/java/com/example/myapplication/AnimationService.java b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/java/com/example/myapplication/AnimationService.java new file mode 100644 index 0000000000000000000000000000000000000000..fb0fa19f6ebaa88abffbbb76269109c4635eb763 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/java/com/example/myapplication/AnimationService.java @@ -0,0 +1,56 @@ +package com.example.myapplication; + +import android.app.IntentService; +import android.content.Intent; +import android.os.Messenger; +import android.os.Message; +public class AnimationService extends IntentService { + + public AnimationService() { + super("AnimationService"); + } + + @Override + protected void onHandleIntent(Intent intent) { + Messenger valMessenger = (Messenger)intent.getExtras().get("ValueMessenger"); + float startAngle = intent.getFloatExtra("StartValue",0); + float endAngle = intent.getFloatExtra("EndValue",0); + float incAngle = intent.getFloatExtra("IncValue",1); + float stepTime = intent.getFloatExtra("UpdateTime",10); + while(startAngle<endAngle){ + Message msg = Message.obtain(); + msg.obj = new Float(startAngle); + try{ + valMessenger.send(msg); + Thread.sleep((long)stepTime); + }catch(android.os.RemoteException ex){ + + }catch(InterruptedException ex){ + + } + if(MainActivity.is_animate == true) { + startAngle += incAngle; + } + } + + } + + /** + * Handle action Foo in the provided background thread with the provided + * parameters + * + */ + private void handleActionFoo(String param1, String param2) { + // TODO: Handle action Foo + throw new UnsupportedOperationException("Not yet implemented"); + } + + /** + * Handle action Baz in the provided background thread with the provided + * parameters. + */ + private void handleActionBaz(String param1, String param2) { + // TODO: Handle action Baz + throw new UnsupportedOperationException("Not yet implemented"); + } +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/java/com/example/myapplication/GLStop.java b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/java/com/example/myapplication/GLStop.java new file mode 100644 index 0000000000000000000000000000000000000000..cf63db07edc19975d2e22f9aae2cb9d93a20dd4f --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/java/com/example/myapplication/GLStop.java @@ -0,0 +1,20 @@ +package com.example.myapplication; + +import android.app.Activity; +import android.opengl.GLSurfaceView; + + +public class GLStop extends Activity{ + private GLSurfaceView mGLView; + + @Override + protected void onPause() { + super.onPause(); + mGLView.onPause(); + } + + protected void onResume() { + super.onResume(); + mGLView.onResume(); + } +} diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/java/com/example/myapplication/MainActivity.java b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/java/com/example/myapplication/MainActivity.java new file mode 100644 index 0000000000000000000000000000000000000000..2e37c13331b15c62aabbd68fbdf826776c557a0f --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/java/com/example/myapplication/MainActivity.java @@ -0,0 +1,37 @@ +package com.example.myapplication; + +import androidx.appcompat.app.AppCompatActivity; +import android.content.Intent; +import android.os.Bundle; +import android.view.View; +import android.os.Messenger; + +public class MainActivity extends AppCompatActivity { + public static boolean is_animate = false; + public int start = 1; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + } + public void onClickStart(View view){ + is_animate=true; + Intent intent = new Intent(this, AnimationService.class); + MyGLSurfaceView glview = (MyGLSurfaceView) findViewById(R.id.glView); + Messenger angleReceiver = glview.getAngleReceiver(); + intent.putExtra("ValueMessenger", angleReceiver); + intent.putExtra("StartValue", 0.0f); + intent.putExtra("EndValue", 360.0f); + intent.putExtra("IncValue", 1.0f); + intent.putExtra("UpdateTime", 100.0f); + startService(intent); + + } + + public void onClickStop(View view){ + // MyGLSurfaceView s_glview = (MyGLSurfaceView) findViewById(R.id.glView); + // s_glview.onPause(); + is_animate = false; + } +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/java/com/example/myapplication/MyGLRenderer.java b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/java/com/example/myapplication/MyGLRenderer.java new file mode 100644 index 0000000000000000000000000000000000000000..7e49ba2669406e55665f930783c0d071e0cc53e4 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/java/com/example/myapplication/MyGLRenderer.java @@ -0,0 +1,75 @@ +package com.example.myapplication; + +import javax.microedition.khronos.opengles.GL10; +import javax.microedition.khronos.egl.EGLConfig; + +import android.opengl.GLES20; +import android.opengl.GLSurfaceView; +import android.opengl.Matrix; +import android.util.Log; + +public class MyGLRenderer implements GLSurfaceView.Renderer { + + private static final String TAG = "MyGLRenderer"; + private Square mSquare; + + private final float[] mMVPMatrix = new float[16]; + private final float[] mProjectionMatrix = new float[16]; + private final float[] mViewMatrix = new float[16]; + private final float[] mRotationMatrix = new float[16]; + private final float[] mScaleMatrix = new float[16]; + + private float mAngle; + + @Override + public void onSurfaceCreated(GL10 unused, EGLConfig config) { + GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); + mSquare = new Square(); + } + + @Override + public void onDrawFrame(GL10 unused) { + float[] scratch = new float[16]; + + GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT); + + Matrix.setIdentityM(mScaleMatrix, 0); + Matrix.scaleM(mScaleMatrix, 0, 0.5f, 0.5f, 0.5f); + Matrix.setRotateM(mRotationMatrix, 0, mAngle, 0, 0, 1.0f); + Matrix.multiplyMM(scratch, 0, mRotationMatrix, 0, mScaleMatrix, 0); + + Matrix.setLookAtM(mViewMatrix, 0, 0, 0, -3, 0f, 0f, 0f, 0f, 1.0f, 0.0f); + + Matrix.multiplyMM(scratch, 0, mViewMatrix, 0, scratch, 0); + + Matrix.multiplyMM(mMVPMatrix, 0, mProjectionMatrix, 0, scratch, 0); + + mSquare.draw(mMVPMatrix); + } + + @Override + public void onSurfaceChanged(GL10 unused, int width, int height) { + GLES20.glViewport(0, 0, width, height); + float ratio = (float) width / height; + Matrix.frustumM(mProjectionMatrix, 0, -ratio, ratio, -1, 1, 3, 7); + } + + public static int loadShader(int type, String shaderCode){ + int shader = GLES20.glCreateShader(type); + GLES20.glShaderSource(shader, shaderCode); + GLES20.glCompileShader(shader); + return shader; + } + + public static void checkGlError(String glOperation) { + int error; + while ((error = GLES20.glGetError()) != GLES20.GL_NO_ERROR) { + Log.e(TAG, glOperation + ": glError " + error); + throw new RuntimeException(glOperation + ": glError " + error); + } + } + + public void setAngle(float angle){ + mAngle=angle; + } +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/java/com/example/myapplication/MyGLSurfaceView.java b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/java/com/example/myapplication/MyGLSurfaceView.java new file mode 100644 index 0000000000000000000000000000000000000000..da827657d129e8d4514b6bfa690c6b7e40312ade --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/java/com/example/myapplication/MyGLSurfaceView.java @@ -0,0 +1,38 @@ +package com.example.myapplication; + +import android.content.Context; +import android.opengl.GLSurfaceView; +import android.os.Messenger; +import android.os.Message; +import android.os.Handler; +import android.util.AttributeSet; + +public class MyGLSurfaceView extends GLSurfaceView { + + private final MyGLRenderer mRenderer; + + public MyGLSurfaceView(Context context, AttributeSet attrs) { + super(context,attrs); + + setEGLContextClientVersion(2); + + mRenderer = new MyGLRenderer(); + setRenderer(mRenderer); + + setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY); + } + + private Handler handler = new Handler(){ + public void handleMessage(Message message){ + mRenderer.setAngle((Float)(message.obj)); + requestRender(); + } + }; + + public Messenger getAngleReceiver(){ + return new Messenger(handler); + } + // 1. define and create a handler instance. + // 2. create a messenger instance with the handler (mAngleReceiver). + +} diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/java/com/example/myapplication/Square.java b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/java/com/example/myapplication/Square.java new file mode 100644 index 0000000000000000000000000000000000000000..8a0dd91c127d7ecf1dc2c189a410e69c830d302f --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/java/com/example/myapplication/Square.java @@ -0,0 +1,112 @@ +package com.example.myapplication; + +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.FloatBuffer; +import java.nio.ShortBuffer; +import android.opengl.GLES20; +/** + * A two-dimensional square for use as a drawn object in OpenGL ES 2.0. + */ +public class Square { + private final String vertexShaderCode = + // This matrix member variable provides a hook to manipulate + // the coordinates of the objects that use this vertex shader + "uniform mat4 uMVPMatrix;" + + "attribute vec4 vPosition;" + + "void main() {" + + // The matrix must be included as a modifier of gl_Position. + // Note that the uMVPMatrix factor *must be first* in order + // for the matrix multiplication product to be correct. + " gl_Position = uMVPMatrix * vPosition;" + + "}"; + private final String fragmentShaderCode = + "precision mediump float;" + + "uniform vec4 vColor;" + + "void main() {" + + " gl_FragColor = vColor;" + + "}"; + private final FloatBuffer vertexBuffer; + private final ShortBuffer drawListBuffer; + private final int mProgram; + private int mPositionHandle; + private int mColorHandle; + private int mMVPMatrixHandle; + // number of coordinates per vertex in this array + static final int COORDS_PER_VERTEX = 3; + static float squareCoords[] = { + -0.5f, 0.5f, 0.0f, // top left + -0.5f, -0.5f, 0.0f, // bottom left + 0.5f, -0.5f, 0.0f, // bottom right + 0.5f, 0.5f, 0.0f }; // top right + private final short drawOrder[] = { 0, 1, 2, 0, 2, 3 }; // order to draw vertices + private final int vertexStride = COORDS_PER_VERTEX * 4; // 4 bytes per vertex + float color[] = { 0.2f, 0.709803922f, 0.898039216f, 1.0f }; + /** + * Sets up the drawing object data for use in an OpenGL ES context. + */ + public Square() { + // initialize vertex byte buffer for shape coordinates + ByteBuffer bb = ByteBuffer.allocateDirect( + // (# of coordinate values * 4 bytes per float) + squareCoords.length * 4); + bb.order(ByteOrder.nativeOrder()); + vertexBuffer = bb.asFloatBuffer(); + vertexBuffer.put(squareCoords); + vertexBuffer.position(0); + // initialize byte buffer for the draw list + ByteBuffer dlb = ByteBuffer.allocateDirect( + // (# of coordinate values * 2 bytes per short) + drawOrder.length * 2); + dlb.order(ByteOrder.nativeOrder()); + drawListBuffer = dlb.asShortBuffer(); + drawListBuffer.put(drawOrder); + drawListBuffer.position(0); + // prepare shaders and OpenGL program + int vertexShader = MyGLRenderer.loadShader( + GLES20.GL_VERTEX_SHADER, + vertexShaderCode); + int fragmentShader = MyGLRenderer.loadShader( + GLES20.GL_FRAGMENT_SHADER, + fragmentShaderCode); + mProgram = GLES20.glCreateProgram(); // create empty OpenGL Program + GLES20.glAttachShader(mProgram, vertexShader); // add the vertex shader to program + GLES20.glAttachShader(mProgram, fragmentShader); // add the fragment shader to program + GLES20.glLinkProgram(mProgram); // create OpenGL program executables + } + /** + * Encapsulates the OpenGL ES instructions for drawing this shape. + * + * @param mvpMatrix - The Model View Project matrix in which to draw + * this shape. + */ + public void draw(float[] mvpMatrix) { + // Add program to OpenGL environment + GLES20.glUseProgram(mProgram); + // get handle to vertex shader's vPosition member + mPositionHandle = GLES20.glGetAttribLocation(mProgram, "vPosition"); + // Enable a handle to the triangle vertices + GLES20.glEnableVertexAttribArray(mPositionHandle); + // Prepare the triangle coordinate data + GLES20.glVertexAttribPointer( + mPositionHandle, COORDS_PER_VERTEX, + GLES20.GL_FLOAT, false, + vertexStride, vertexBuffer); + // get handle to fragment shader's vColor member + mColorHandle = GLES20.glGetUniformLocation(mProgram, "vColor"); + // Set color for drawing the triangle + GLES20.glUniform4fv(mColorHandle, 1, color, 0); + // get handle to shape's transformation matrix + mMVPMatrixHandle = GLES20.glGetUniformLocation(mProgram, "uMVPMatrix"); + MyGLRenderer.checkGlError("glGetUniformLocation"); + // Apply the projection and view transformation + GLES20.glUniformMatrix4fv(mMVPMatrixHandle, 1, false, mvpMatrix, 0); + MyGLRenderer.checkGlError("glUniformMatrix4fv"); + // Draw the square + GLES20.glDrawElements( + GLES20.GL_TRIANGLES, drawOrder.length, + GLES20.GL_UNSIGNED_SHORT, drawListBuffer); + // Disable vertex array + GLES20.glDisableVertexAttribArray(mPositionHandle); + } +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000000000000000000000000000000000000..2b068d11462a4b96669193de13a711a3a36220a0 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:aapt="http://schemas.android.com/aapt" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z"> + <aapt:attr name="android:fillColor"> + <gradient + android:endX="85.84757" + android:endY="92.4963" + android:startX="42.9492" + android:startY="49.59793" + android:type="linear"> + <item + android:color="#44000000" + android:offset="0.0" /> + <item + android:color="#00000000" + android:offset="1.0" /> + </gradient> + </aapt:attr> + </path> + <path + android:fillColor="#FFFFFF" + android:fillType="nonZero" + android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z" + android:strokeWidth="1" + android:strokeColor="#00000000" /> +</vector> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/drawable/ic_launcher_background.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000000000000000000000000000000000000..07d5da9cbf141911847041df5d7b87f0dd5ef9d4 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <path + android:fillColor="#3DDC84" + android:pathData="M0,0h108v108h-108z" /> + <path + android:fillColor="#00000000" + android:pathData="M9,0L9,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,0L19,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M29,0L29,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M39,0L39,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M49,0L49,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M59,0L59,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M69,0L69,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M79,0L79,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M89,0L89,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M99,0L99,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,9L108,9" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,19L108,19" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,29L108,29" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,39L108,39" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,49L108,49" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,59L108,59" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,69L108,69" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,79L108,79" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,89L108,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,99L108,99" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,29L89,29" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,39L89,39" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,49L89,49" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,59L89,59" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,69L89,69" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,79L89,79" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M29,19L29,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M39,19L39,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M49,19L49,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M59,19L59,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M69,19L69,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M79,19L79,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> +</vector> diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/layout/activity_main.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000000000000000000000000000000000000..defb26f9fadf932da2fe79a0055aee14666c0f49 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context=".MainActivity"> + + <com.example.myapplication.MyGLSurfaceView + android:id="@+id/glView" + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_alignParentTop="true" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + <Button + android:id="@+id/startButton" + android:layout_width="171dp" + android:layout_height="50dp" + android:onClick="onClickStart" + android:text="Start Animation" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.066" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="@+id/glView" + app:layout_constraintVertical_bias="0.821" /> + + <Button + android:id="@+id/stopButton" + android:layout_width="171dp" + android:layout_height="50dp" + android:onClick="onClickStop" + android:text="Stop Animation" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.879" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="@+id/glView" + app:layout_constraintVertical_bias="0.822" /> + +</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000000000000000000000000000000000000..eca70cfe52eac1ba66ba280a68ca7be8fcf88a16 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@drawable/ic_launcher_background" /> + <foreground android:drawable="@drawable/ic_launcher_foreground" /> +</adaptive-icon> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000000000000000000000000000000000000..eca70cfe52eac1ba66ba280a68ca7be8fcf88a16 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@drawable/ic_launcher_background" /> + <foreground android:drawable="@drawable/ic_launcher_foreground" /> +</adaptive-icon> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-hdpi/ic_launcher.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..a571e60098c92c2baca8a5df62f2929cbff01b52 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..61da551c5594a1f9d26193983d2cd69189014603 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-mdpi/ic_launcher.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..c41dd28531901b2c23927768c84bb6765ebcc1db Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..db5080a752731b34d38d7c634732b2cd999125d0 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..6dba46dab19242bf475ddf2e0a10042de6a0be16 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..da31a871c8dc461a1ea114510bfac640307b0a90 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..15ac681720f3df43c647bf0c081f0314ee34eae1 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..b216f2d313cc673d8b8c4da591c174ebed52795c Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..f25a419744727fb48b4b4137b6c6a3a8f2620d51 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..e96783ccce844001359f968f5cd9d85b341bd3fb Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/values-night/themes.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/values-night/themes.xml new file mode 100644 index 0000000000000000000000000000000000000000..203e2191be2ee9dbdf57b486d1db9e5e3eb378c3 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/values-night/themes.xml @@ -0,0 +1,16 @@ +<resources xmlns:tools="http://schemas.android.com/tools"> + <!-- Base application theme. --> + <style name="Theme.MyApplication" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> + <!-- Primary brand color. --> + <item name="colorPrimary">@color/purple_200</item> + <item name="colorPrimaryVariant">@color/purple_700</item> + <item name="colorOnPrimary">@color/black</item> + <!-- Secondary brand color. --> + <item name="colorSecondary">@color/teal_200</item> + <item name="colorSecondaryVariant">@color/teal_200</item> + <item name="colorOnSecondary">@color/black</item> + <!-- Status bar color. --> + <item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item> + <!-- Customize your theme here. --> + </style> +</resources> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/values/colors.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/values/colors.xml new file mode 100644 index 0000000000000000000000000000000000000000..f8c6127d327620c93d2b2d00342a68e97b98a48d --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/values/colors.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <color name="purple_200">#FFBB86FC</color> + <color name="purple_500">#FF6200EE</color> + <color name="purple_700">#FF3700B3</color> + <color name="teal_200">#FF03DAC5</color> + <color name="teal_700">#FF018786</color> + <color name="black">#FF000000</color> + <color name="white">#FFFFFFFF</color> +</resources> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/values/strings.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/values/strings.xml new file mode 100644 index 0000000000000000000000000000000000000000..3de1a3968d8b34c920ca224de40811509c6625ed --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ +<resources> + <string name="app_name">My Application</string> +</resources> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/values/themes.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/values/themes.xml new file mode 100644 index 0000000000000000000000000000000000000000..eebc2d049ba5a94989c1c43246b5346d5167cbe1 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/main/res/values/themes.xml @@ -0,0 +1,16 @@ +<resources xmlns:tools="http://schemas.android.com/tools"> + <!-- Base application theme. --> + <style name="Theme.MyApplication" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> + <!-- Primary brand color. --> + <item name="colorPrimary">@color/purple_500</item> + <item name="colorPrimaryVariant">@color/purple_700</item> + <item name="colorOnPrimary">@color/white</item> + <!-- Secondary brand color. --> + <item name="colorSecondary">@color/teal_200</item> + <item name="colorSecondaryVariant">@color/teal_700</item> + <item name="colorOnSecondary">@color/black</item> + <!-- Status bar color. --> + <item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item> + <!-- Customize your theme here. --> + </style> +</resources> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/test/java/com/example/myapplication/ExampleUnitTest.java b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/test/java/com/example/myapplication/ExampleUnitTest.java new file mode 100644 index 0000000000000000000000000000000000000000..bf43ee59f6e0688f3d98cfb4a973382257e5d9d1 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/app/src/test/java/com/example/myapplication/ExampleUnitTest.java @@ -0,0 +1,17 @@ +package com.example.myapplication; + +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/build.gradle b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..dfbc7c14144f78c77042100b30a5b8695b4c8ea4 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/build.gradle @@ -0,0 +1,24 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. +buildscript { + repositories { + google() + jcenter() + } + dependencies { + classpath "com.android.tools.build:gradle:4.1.2" + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + google() + jcenter() + } +} + +task clean(type: Delete) { + delete rootProject.buildDir +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/gradle.properties b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/gradle.properties new file mode 100644 index 0000000000000000000000000000000000000000..52f5917cb0d0c47fd00ba8ee85c14eb27e1c41cc --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/gradle.properties @@ -0,0 +1,19 @@ +# Project-wide Gradle settings. +# IDE (e.g. Android 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. +org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app"s APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true +# Automatically convert third-party libraries to use AndroidX +android.enableJetifier=true \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/gradle/wrapper/gradle-wrapper.jar b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..f6b961fd5a86aa5fbfe90f707c3138408be7c718 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/gradle/wrapper/gradle-wrapper.jar differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/gradle/wrapper/gradle-wrapper.properties b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000000000000000000000000000000000..756d9e8eb7fac42a148543d8744fed8afd6537ff --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Thu May 06 17:08:56 KST 2021 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/gradlew b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/gradlew new file mode 100755 index 0000000000000000000000000000000000000000..cccdd3d517fc5249beaefa600691cf150f2fa3e6 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/gradlew @@ -0,0 +1,172 @@ +#!/usr/bin/env sh + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/gradlew.bat b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/gradlew.bat new file mode 100644 index 0000000000000000000000000000000000000000..e95643d6a2ca62258464e83c72f5156dc941c609 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/gradlew.bat @@ -0,0 +1,84 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/settings.gradle b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/settings.gradle new file mode 100644 index 0000000000000000000000000000000000000000..8cedfc0427702e3549ff991efcf188c7005bf0b9 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn5/settings.gradle @@ -0,0 +1,2 @@ +include ':app' +rootProject.name = "My Application" \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/.gitignore b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..aa724b77071afcbd9bb398053e05adaf7ac9405a --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/.gitignore @@ -0,0 +1,15 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild +.cxx +local.properties diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/.idea/.gitignore b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/.idea/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..26d33521af10bcc7fd8cea344038eaaeb78d0ef5 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/.idea/.name b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/.idea/.name new file mode 100644 index 0000000000000000000000000000000000000000..ab1891c9f4b427ab75fb1123c6dc24e211ca4885 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/.idea/.name @@ -0,0 +1 @@ +database \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/.idea/compiler.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/.idea/compiler.xml new file mode 100644 index 0000000000000000000000000000000000000000..61a9130cd9669c3843e6445dfe1fee2d493869bc --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/.idea/compiler.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="CompilerConfiguration"> + <bytecodeTargetLevel target="1.8" /> + </component> +</project> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/.idea/gradle.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/.idea/gradle.xml new file mode 100644 index 0000000000000000000000000000000000000000..23a89bbb6ca829a47211d20c8b11960088ea4950 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/.idea/gradle.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="GradleMigrationSettings" migrationVersion="1" /> + <component name="GradleSettings"> + <option name="linkedExternalProjectsSettings"> + <GradleProjectSettings> + <option name="testRunner" value="PLATFORM" /> + <option name="distributionType" value="DEFAULT_WRAPPED" /> + <option name="externalProjectPath" value="$PROJECT_DIR$" /> + <option name="gradleJvm" value="1.8" /> + <option name="modules"> + <set> + <option value="$PROJECT_DIR$" /> + <option value="$PROJECT_DIR$/app" /> + </set> + </option> + <option name="resolveModulePerSourceSet" value="false" /> + <option name="useQualifiedModuleNames" value="true" /> + </GradleProjectSettings> + </option> + </component> +</project> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/.idea/jarRepositories.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/.idea/jarRepositories.xml new file mode 100644 index 0000000000000000000000000000000000000000..a5f05cd8c87d4a72b0242026524cb32639fca7f0 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/.idea/jarRepositories.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="RemoteRepositoriesConfiguration"> + <remote-repository> + <option name="id" value="central" /> + <option name="name" value="Maven Central repository" /> + <option name="url" value="https://repo1.maven.org/maven2" /> + </remote-repository> + <remote-repository> + <option name="id" value="jboss.community" /> + <option name="name" value="JBoss Community repository" /> + <option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" /> + </remote-repository> + <remote-repository> + <option name="id" value="BintrayJCenter" /> + <option name="name" value="BintrayJCenter" /> + <option name="url" value="https://jcenter.bintray.com/" /> + </remote-repository> + <remote-repository> + <option name="id" value="Google" /> + <option name="name" value="Google" /> + <option name="url" value="https://dl.google.com/dl/android/maven2/" /> + </remote-repository> + </component> +</project> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/.idea/misc.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/.idea/misc.xml new file mode 100644 index 0000000000000000000000000000000000000000..d5d35ec44f10991b508f6454a85204a276726364 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/.idea/misc.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK"> + <output url="file://$PROJECT_DIR$/build/classes" /> + </component> + <component name="ProjectType"> + <option name="id" value="Android" /> + </component> +</project> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/.gitignore b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..42afabfd2abebf31384ca7797186a27a4b7dbee8 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/build.gradle b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..2b9bd6c5b4ba2924b76492897ee20605dae5dbe1 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/build.gradle @@ -0,0 +1,39 @@ +plugins { + id 'com.android.application' +} + +android { + compileSdkVersion 30 + buildToolsVersion "30.0.3" + + defaultConfig { + applicationId "com.example.database" + minSdkVersion 26 + targetSdkVersion 30 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} + +dependencies { + + implementation 'androidx.appcompat:appcompat:1.2.0' + implementation 'com.google.android.material:material:1.3.0' + implementation 'androidx.constraintlayout:constraintlayout:2.0.4' + testImplementation 'junit:junit:4.+' + androidTestImplementation 'androidx.test.ext:junit:1.1.2' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/proguard-rules.pro b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/proguard-rules.pro new file mode 100644 index 0000000000000000000000000000000000000000..481bb434814107eb79d7a30b676d344b0df2f8ce --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/androidTest/java/com/example/database/ExampleInstrumentedTest.java b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/androidTest/java/com/example/database/ExampleInstrumentedTest.java new file mode 100644 index 0000000000000000000000000000000000000000..bd21f45b93e33a2aa27793e3bbda5a70eb91b3d0 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/androidTest/java/com/example/database/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package com.example.database; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("com.example.database", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/AndroidManifest.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000000000000000000000000000000000000..1c9229e6ce8671146d3d663e102886b58e9344ae --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/AndroidManifest.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="com.example.database"> + + <application + android:allowBackup="true" + android:icon="@mipmap/ic_launcher" + android:label="@string/app_name" + android:roundIcon="@mipmap/ic_launcher_round" + android:supportsRtl="true" + android:theme="@style/Theme.Database"> + <activity android:name=".MainActivity"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + </application> + +</manifest> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/java/com/example/database/MainActivity.java b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/java/com/example/database/MainActivity.java new file mode 100644 index 0000000000000000000000000000000000000000..35fbb03c73781e254a5eda756b509ec07e2a22d8 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/java/com/example/database/MainActivity.java @@ -0,0 +1,156 @@ +package com.example.database; + +import android.content.Context; +import android.database.Cursor; +import android.database.sqlite.SQLiteDatabase; +import android.database.sqlite.SQLiteException; +import android.database.sqlite.SQLiteOpenHelper; +import android.os.Bundle; +import android.util.Log; +import android.view.View; +import android.widget.ArrayAdapter; +import android.widget.ListView; + +import androidx.appcompat.app.AppCompatActivity; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.util.ArrayList; + +class DBHelper extends SQLiteOpenHelper { + private static final String DATABASE_NAME = "spheregeom.db"; + private static final int DATABASE_VERSION = 1; + + public DBHelper(Context context) { + // invoke super constructor. + + super(context, DATABASE_NAME, null,DATABASE_VERSION); + + } + @Override + public void onCreate(SQLiteDatabase db) { + // create two tables, vertices and triangles + db.execSQL("create table vertices (_id integer primary key autoincrement, x float, y float, z float)"); + db.execSQL("create table triangles (_id integer primary key autoincrement, v0 integer, v1 integer, v2 integer)"); + } + + @Override + public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { + // drop the two tables, vertices and triangles + db.execSQL("drop table if exists vertices;"); + db.execSQL("drop table if exists triangles;"); + + onCreate(db); + } +} + +public class MainActivity extends AppCompatActivity { + private SQLiteDatabase db; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + // create a DBHelper instance + // obtain a database object from the DBHelper instance. + + DBHelper helper = new DBHelper(this); + try{ + db = helper.getWritableDatabase(); + } + catch(SQLiteException e){ + db = helper.getReadableDatabase(); + } + } + + public void readSphere(View view) { + // delete all the records from vertices. + // delete all the records from triangles. + + db.execSQL("delete from vertices"); + db.execSQL("delete from triangles"); + + // open the file R.raw.sphere and get InputStream instance + // Create a BufferedReader instance + + InputStream inputStream = this.getResources().openRawResource(R.raw.sphere); + BufferedReader buffreader = new BufferedReader(new InputStreamReader(inputStream)); + + String line; + + // Using the readLine() method, read each line from the file and + // insert the data into the associated table. That is, + // "v 0.1 0.3 2.5" --> insert into vertices values (null, 0.1, 0.3, 2.5); + // "f 10 3 23" --> insert into triangles value (null, 10, 3, 23); + + try{ + while ((line = buffreader.readLine())!=null){ + String[] tokens = line.split(" "); + if(tokens[0].equals("v")){ + db.execSQL("INSERT INTO vertices VALUES (null,'"+tokens[1] + "','"+tokens[2]+"','"+tokens[3]+"');"); + } + else if(tokens[0].equals("f")){ + db.execSQL("INSERT INTO triangles VALUES (null,'"+tokens[1] + "','"+tokens[2]+"','"+tokens[3]+"');"); + } + } + } + catch(IOException e){ + + } + + } + public void load_list(View view) { + Cursor cursor; + Cursor curs; + // select vertices with x less than -6 from the table vertices + // take the three values, x, y, z from each record and output them with Log.v(). + ListView listview = (ListView)findViewById(R.id.sphere_list); + ArrayList<String> list = new ArrayList<>(); + cursor = db.rawQuery("SELECT x,y,z FROM vertices ;",null); + while (cursor.moveToNext()) { + String x = cursor.getString(0); + String y = cursor.getString(1); + String z = cursor.getString(2); + String line = "vertex pos (" + x + "," + y + "," + z + ")"; + list.add(line); + } + curs = db.rawQuery("SELECT v0,v1,v2 FROM triangles ;",null); + while (cursor.moveToNext()) { + String v0 = curs.getString(0); + String v1 = curs.getString(1); + String v2 = curs.getString(2); + String line = "triangle pos (" + v0 + "," + v1 + "," + v2 + ")"; + list.add(line); + } +// cursor = db.rawQuery("SELECT x, y, z FROM triangles WHERE x >1560;",null); +// while (cursor.moveToNext()){ +// String x = cursor.getString(0); +// String y = cursor.getString(1); +// String z = cursor.getString(2); +// String line = "vertex pos ("+x+","+y+","+z+")"; +// list.add(line); +// } + ArrayAdapter ad = new ArrayAdapter(this,android.R.layout.simple_list_item_1,list); + listview.setAdapter(ad); + } + + public void queryDatabase(View view) { + Cursor cursor; + + // select vertices with x less than -6 from the table vertices + // take the three values, x, y, z from each record and output them with Log.v(). + + cursor = db.rawQuery("SELECT x, y, z FROM vertices WHERE x <-6;",null); + while (cursor.moveToNext()){ + String x = cursor.getString(0); + String y = cursor.getString(1); + String z = cursor.getString(2); + Log.v("OUT","vertex pos ("+x+","+y+","+z+")"); + + } + } + +} diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000000000000000000000000000000000000..2b068d11462a4b96669193de13a711a3a36220a0 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:aapt="http://schemas.android.com/aapt" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z"> + <aapt:attr name="android:fillColor"> + <gradient + android:endX="85.84757" + android:endY="92.4963" + android:startX="42.9492" + android:startY="49.59793" + android:type="linear"> + <item + android:color="#44000000" + android:offset="0.0" /> + <item + android:color="#00000000" + android:offset="1.0" /> + </gradient> + </aapt:attr> + </path> + <path + android:fillColor="#FFFFFF" + android:fillType="nonZero" + android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z" + android:strokeWidth="1" + android:strokeColor="#00000000" /> +</vector> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/drawable/ic_launcher_background.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000000000000000000000000000000000000..07d5da9cbf141911847041df5d7b87f0dd5ef9d4 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <path + android:fillColor="#3DDC84" + android:pathData="M0,0h108v108h-108z" /> + <path + android:fillColor="#00000000" + android:pathData="M9,0L9,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,0L19,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M29,0L29,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M39,0L39,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M49,0L49,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M59,0L59,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M69,0L69,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M79,0L79,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M89,0L89,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M99,0L99,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,9L108,9" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,19L108,19" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,29L108,29" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,39L108,39" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,49L108,49" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,59L108,59" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,69L108,69" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,79L108,79" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,89L108,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,99L108,99" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,29L89,29" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,39L89,39" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,49L89,49" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,59L89,59" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,69L89,69" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,79L89,79" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M29,19L29,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M39,19L39,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M49,19L49,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M59,19L59,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M69,19L69,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M79,19L79,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> +</vector> diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/layout/activity_main.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000000000000000000000000000000000000..170334f598d8693a26c5f0972b4f32e74cdfbf86 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context=".MainActivity"> + + <Button + android:id="@+id/button2" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:onClick="readSphere" + android:text="Read sphere.obj" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.0" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.023" /> + + <Button + android:id="@+id/button3" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:onClick="queryDatabase" + android:text="Query Database" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="1.0" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.124" /> + + <Button + android:id="@+id/button" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:onClick="load_list" + android:text="load_sphere" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.0" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.219" /> + + <ListView + android:id="@+id/sphere_list" + android:layout_width="392dp" + android:layout_height="476dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.473" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.862" /> +</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000000000000000000000000000000000000..eca70cfe52eac1ba66ba280a68ca7be8fcf88a16 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@drawable/ic_launcher_background" /> + <foreground android:drawable="@drawable/ic_launcher_foreground" /> +</adaptive-icon> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000000000000000000000000000000000000..eca70cfe52eac1ba66ba280a68ca7be8fcf88a16 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@drawable/ic_launcher_background" /> + <foreground android:drawable="@drawable/ic_launcher_foreground" /> +</adaptive-icon> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-hdpi/ic_launcher.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..a571e60098c92c2baca8a5df62f2929cbff01b52 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..61da551c5594a1f9d26193983d2cd69189014603 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-mdpi/ic_launcher.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..c41dd28531901b2c23927768c84bb6765ebcc1db Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..db5080a752731b34d38d7c634732b2cd999125d0 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..6dba46dab19242bf475ddf2e0a10042de6a0be16 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..da31a871c8dc461a1ea114510bfac640307b0a90 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..15ac681720f3df43c647bf0c081f0314ee34eae1 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..b216f2d313cc673d8b8c4da591c174ebed52795c Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..f25a419744727fb48b4b4137b6c6a3a8f2620d51 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..e96783ccce844001359f968f5cd9d85b341bd3fb Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/raw/sphere.obj b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/raw/sphere.obj new file mode 100644 index 0000000000000000000000000000000000000000..dde47bdf9a0ce50769619f9cf7401192e18ddf87 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/raw/sphere.obj @@ -0,0 +1,2320 @@ +v -5.58126 -1.22217 -1.77113 +v -5.60875 -1.22217 -1.8251 +v -5.45601 -1.17684 -1.93607 +v -5.40169 -1.17684 -1.82948 +v -5.60875 -1.22217 -1.8251 +v -5.65158 -1.22217 -1.86792 +v -5.5406 -1.17684 -2.02067 +v -5.45601 -1.17684 -1.93607 +v -5.65158 -1.22217 -1.86792 +v -5.70554 -1.22217 -1.89541 +v -5.6472 -1.17684 -2.07498 +v -5.5406 -1.17684 -2.02067 +v -5.70554 -1.22217 -1.89541 +v -5.76536 -1.22217 -1.90489 +v -5.76536 -1.17684 -2.0937 +v -5.6472 -1.17684 -2.07498 +v -5.76536 -1.22217 -1.90489 +v -5.82518 -1.22217 -1.89541 +v -5.88352 -1.17684 -2.07498 +v -5.76536 -1.17684 -2.0937 +v -5.82518 -1.22217 -1.89541 +v -5.87914 -1.22217 -1.86792 +v -5.99012 -1.17684 -2.02067 +v -5.88352 -1.17684 -2.07498 +v -5.87914 -1.22217 -1.86792 +v -5.92196 -1.22217 -1.8251 +v -6.07471 -1.17684 -1.93607 +v -5.99012 -1.17684 -2.02067 +v -5.92196 -1.22217 -1.8251 +v -5.94946 -1.22217 -1.77113 +v -6.12902 -1.17684 -1.82948 +v -6.07471 -1.17684 -1.93607 +v -5.94946 -1.22217 -1.77113 +v -5.95893 -1.22217 -1.71132 +v -6.14774 -1.17684 -1.71132 +v -6.12902 -1.17684 -1.82948 +v -5.95893 -1.22217 -1.71132 +v -5.94946 -1.22217 -1.6515 +v -6.12902 -1.17684 -1.59315 +v -6.14774 -1.17684 -1.71132 +v -5.94946 -1.22217 -1.6515 +v -5.92196 -1.22217 -1.59754 +v -6.07471 -1.17684 -1.48656 +v -6.12902 -1.17684 -1.59315 +v -5.92196 -1.22217 -1.59754 +v -5.87914 -1.22217 -1.55471 +v -5.99012 -1.17684 -1.40196 +v -6.07471 -1.17684 -1.48656 +v -5.87914 -1.22217 -1.55471 +v -5.82518 -1.22217 -1.52722 +v -5.88352 -1.17684 -1.34765 +v -5.99012 -1.17684 -1.40196 +v -5.82518 -1.22217 -1.52722 +v -5.76536 -1.22217 -1.51774 +v -5.76536 -1.17684 -1.32894 +v -5.88352 -1.17684 -1.34765 +v -5.76536 -1.22217 -1.51774 +v -5.70554 -1.22217 -1.52722 +v -5.6472 -1.17684 -1.34765 +v -5.76536 -1.17684 -1.32894 +v -5.70554 -1.22217 -1.52722 +v -5.65158 -1.22217 -1.55471 +v -5.5406 -1.17684 -1.40196 +v -5.6472 -1.17684 -1.34765 +v -5.65158 -1.22217 -1.55471 +v -5.60875 -1.22217 -1.59754 +v -5.45601 -1.17684 -1.48656 +v -5.5406 -1.17684 -1.40196 +v -5.60875 -1.22217 -1.59754 +v -5.58126 -1.22217 -1.6515 +v -5.40169 -1.17684 -1.59315 +v -5.45601 -1.17684 -1.48656 +v -5.58126 -1.22217 -1.6515 +v -5.57178 -1.22217 -1.71132 +v -5.38298 -1.17684 -1.71132 +v -5.40169 -1.17684 -1.59315 +v -5.57178 -1.22217 -1.71132 +v -5.58126 -1.22217 -1.77113 +v -5.40169 -1.17684 -1.82948 +v -5.38298 -1.17684 -1.71132 +v -5.40169 -1.17684 -1.82948 +v -5.45601 -1.17684 -1.93607 +v -5.31087 -1.10254 -2.04152 +v -5.23108 -1.10254 -1.88491 +v -5.45601 -1.17684 -1.93607 +v -5.5406 -1.17684 -2.02067 +v -5.43516 -1.10254 -2.1658 +v -5.31087 -1.10254 -2.04152 +v -5.5406 -1.17684 -2.02067 +v -5.6472 -1.17684 -2.07498 +v -5.59176 -1.10254 -2.24559 +v -5.43516 -1.10254 -2.1658 +v -5.6472 -1.17684 -2.07498 +v -5.76536 -1.17684 -2.0937 +v -5.76536 -1.10254 -2.27309 +v -5.59176 -1.10254 -2.24559 +v -5.76536 -1.17684 -2.0937 +v -5.88352 -1.17684 -2.07498 +v -5.93895 -1.10254 -2.24559 +v -5.76536 -1.10254 -2.27309 +v -5.88352 -1.17684 -2.07498 +v -5.99012 -1.17684 -2.02067 +v -6.09556 -1.10254 -2.1658 +v -5.93895 -1.10254 -2.24559 +v -5.99012 -1.17684 -2.02067 +v -6.07471 -1.17684 -1.93607 +v -6.21984 -1.10254 -2.04152 +v -6.09556 -1.10254 -2.1658 +v -6.07471 -1.17684 -1.93607 +v -6.12902 -1.17684 -1.82948 +v -6.29963 -1.10254 -1.88491 +v -6.21984 -1.10254 -2.04152 +v -6.12902 -1.17684 -1.82948 +v -6.14774 -1.17684 -1.71132 +v -6.32713 -1.10254 -1.71132 +v -6.29963 -1.10254 -1.88491 +v -6.14774 -1.17684 -1.71132 +v -6.12902 -1.17684 -1.59315 +v -6.29963 -1.10254 -1.53772 +v -6.32713 -1.10254 -1.71132 +v -6.12902 -1.17684 -1.59315 +v -6.07471 -1.17684 -1.48656 +v -6.21984 -1.10254 -1.38111 +v -6.29963 -1.10254 -1.53772 +v -6.07471 -1.17684 -1.48656 +v -5.99012 -1.17684 -1.40196 +v -6.09556 -1.10254 -1.25683 +v -6.21984 -1.10254 -1.38111 +v -5.99012 -1.17684 -1.40196 +v -5.88352 -1.17684 -1.34765 +v -5.93895 -1.10254 -1.17704 +v -6.09556 -1.10254 -1.25683 +v -5.88352 -1.17684 -1.34765 +v -5.76536 -1.17684 -1.32894 +v -5.76536 -1.10254 -1.14954 +v -5.93895 -1.10254 -1.17704 +v -5.76536 -1.17684 -1.32894 +v -5.6472 -1.17684 -1.34765 +v -5.59176 -1.10254 -1.17704 +v -5.76536 -1.10254 -1.14954 +v -5.6472 -1.17684 -1.34765 +v -5.5406 -1.17684 -1.40196 +v -5.43516 -1.10254 -1.25683 +v -5.59176 -1.10254 -1.17704 +v -5.5406 -1.17684 -1.40196 +v -5.45601 -1.17684 -1.48656 +v -5.31088 -1.10254 -1.38111 +v -5.43516 -1.10254 -1.25683 +v -5.45601 -1.17684 -1.48656 +v -5.40169 -1.17684 -1.59315 +v -5.23108 -1.10254 -1.53772 +v -5.31088 -1.10254 -1.38111 +v -5.40169 -1.17684 -1.59315 +v -5.38298 -1.17684 -1.71132 +v -5.20359 -1.10254 -1.71132 +v -5.23108 -1.10254 -1.53772 +v -5.38298 -1.17684 -1.71132 +v -5.40169 -1.17684 -1.82948 +v -5.23108 -1.10254 -1.88491 +v -5.20359 -1.10254 -1.71132 +v -5.23108 -1.10254 -1.88491 +v -5.31087 -1.10254 -2.04152 +v -5.17694 -1.00108 -2.13883 +v -5.07363 -1.00108 -1.93607 +v -5.31087 -1.10254 -2.04152 +v -5.43516 -1.10254 -2.1658 +v -5.33784 -1.00108 -2.29974 +v -5.17694 -1.00108 -2.13883 +v -5.43516 -1.10254 -2.1658 +v -5.59176 -1.10254 -2.24559 +v -5.5406 -1.00108 -2.40305 +v -5.33784 -1.00108 -2.29974 +v -5.59176 -1.10254 -2.24559 +v -5.76536 -1.10254 -2.27309 +v -5.76536 -1.00108 -2.43865 +v -5.5406 -1.00108 -2.40305 +v -5.76536 -1.10254 -2.27309 +v -5.93895 -1.10254 -2.24559 +v -5.99012 -1.00108 -2.40305 +v -5.76536 -1.00108 -2.43865 +v -5.93895 -1.10254 -2.24559 +v -6.09556 -1.10254 -2.1658 +v -6.19287 -1.00108 -2.29974 +v -5.99012 -1.00108 -2.40305 +v -6.09556 -1.10254 -2.1658 +v -6.21984 -1.10254 -2.04152 +v -6.35378 -1.00108 -2.13883 +v -6.19287 -1.00108 -2.29974 +v -6.21984 -1.10254 -2.04152 +v -6.29963 -1.10254 -1.88491 +v -6.45709 -1.00108 -1.93607 +v -6.35378 -1.00108 -2.13883 +v -6.29963 -1.10254 -1.88491 +v -6.32713 -1.10254 -1.71132 +v -6.49269 -1.00108 -1.71132 +v -6.45709 -1.00108 -1.93607 +v -6.32713 -1.10254 -1.71132 +v -6.29963 -1.10254 -1.53772 +v -6.45709 -1.00108 -1.48656 +v -6.49269 -1.00108 -1.71132 +v -6.29963 -1.10254 -1.53772 +v -6.21984 -1.10254 -1.38111 +v -6.35378 -1.00108 -1.2838 +v -6.45709 -1.00108 -1.48656 +v -6.21984 -1.10254 -1.38111 +v -6.09556 -1.10254 -1.25683 +v -6.19287 -1.00108 -1.12289 +v -6.35378 -1.00108 -1.2838 +v -6.09556 -1.10254 -1.25683 +v -5.93895 -1.10254 -1.17704 +v -5.99012 -1.00108 -1.01958 +v -6.19287 -1.00108 -1.12289 +v -5.93895 -1.10254 -1.17704 +v -5.76536 -1.10254 -1.14954 +v -5.76536 -1.00108 -0.983986 +v -5.99012 -1.00108 -1.01958 +v -5.76536 -1.10254 -1.14954 +v -5.59176 -1.10254 -1.17704 +v -5.5406 -1.00108 -1.01958 +v -5.76536 -1.00108 -0.983986 +v -5.59176 -1.10254 -1.17704 +v -5.43516 -1.10254 -1.25683 +v -5.33784 -1.00108 -1.12289 +v -5.5406 -1.00108 -1.01958 +v -5.43516 -1.10254 -1.25683 +v -5.31088 -1.10254 -1.38111 +v -5.17694 -1.00108 -1.2838 +v -5.33784 -1.00108 -1.12289 +v -5.31088 -1.10254 -1.38111 +v -5.23108 -1.10254 -1.53772 +v -5.07363 -1.00108 -1.48656 +v -5.17694 -1.00108 -1.2838 +v -5.23108 -1.10254 -1.53772 +v -5.20359 -1.10254 -1.71132 +v -5.03803 -1.00108 -1.71132 +v -5.07363 -1.00108 -1.48656 +v -5.20359 -1.10254 -1.71132 +v -5.23108 -1.10254 -1.88491 +v -5.07363 -1.00108 -1.93607 +v -5.03803 -1.00108 -1.71132 +v -5.07363 -1.00108 -1.93607 +v -5.17694 -1.00108 -2.13883 +v -5.05749 -0.87498 -2.22562 +v -4.9332 -0.87498 -1.9817 +v -5.17694 -1.00108 -2.13883 +v -5.33784 -1.00108 -2.29974 +v -5.25106 -0.87498 -2.41919 +v -5.05749 -0.87498 -2.22562 +v -5.33784 -1.00108 -2.29974 +v -5.5406 -1.00108 -2.40305 +v -5.49498 -0.87498 -2.54347 +v -5.25106 -0.87498 -2.41919 +v -5.5406 -1.00108 -2.40305 +v -5.76536 -1.00108 -2.43865 +v -5.76536 -0.87498 -2.5863 +v -5.49498 -0.87498 -2.54347 +v -5.76536 -1.00108 -2.43865 +v -5.99012 -1.00108 -2.40305 +v -6.03574 -0.87498 -2.54347 +v -5.76536 -0.87498 -2.5863 +v -5.99012 -1.00108 -2.40305 +v -6.19287 -1.00108 -2.29974 +v -6.27966 -0.87498 -2.41919 +v -6.03574 -0.87498 -2.54347 +v -6.19287 -1.00108 -2.29974 +v -6.35378 -1.00108 -2.13883 +v -6.47323 -0.87498 -2.22562 +v -6.27966 -0.87498 -2.41919 +v -6.35378 -1.00108 -2.13883 +v -6.45709 -1.00108 -1.93607 +v -6.59751 -0.87498 -1.9817 +v -6.47323 -0.87498 -2.22562 +v -6.45709 -1.00108 -1.93607 +v -6.49269 -1.00108 -1.71132 +v -6.64034 -0.87498 -1.71132 +v -6.59751 -0.87498 -1.9817 +v -6.49269 -1.00108 -1.71132 +v -6.45709 -1.00108 -1.48656 +v -6.59751 -0.87498 -1.44093 +v -6.64034 -0.87498 -1.71132 +v -6.45709 -1.00108 -1.48656 +v -6.35378 -1.00108 -1.2838 +v -6.47323 -0.87498 -1.19702 +v -6.59751 -0.87498 -1.44093 +v -6.35378 -1.00108 -1.2838 +v -6.19287 -1.00108 -1.12289 +v -6.27966 -0.87498 -1.00344 +v -6.47323 -0.87498 -1.19702 +v -6.19287 -1.00108 -1.12289 +v -5.99012 -1.00108 -1.01958 +v -6.03574 -0.87498 -0.879161 +v -6.27966 -0.87498 -1.00344 +v -5.99012 -1.00108 -1.01958 +v -5.76536 -1.00108 -0.983986 +v -5.76536 -0.87498 -0.836336 +v -6.03574 -0.87498 -0.879161 +v -5.76536 -1.00108 -0.983986 +v -5.5406 -1.00108 -1.01958 +v -5.49498 -0.87498 -0.879161 +v -5.76536 -0.87498 -0.836336 +v -5.5406 -1.00108 -1.01958 +v -5.33784 -1.00108 -1.12289 +v -5.25106 -0.87498 -1.00344 +v -5.49498 -0.87498 -0.879161 +v -5.33784 -1.00108 -1.12289 +v -5.17694 -1.00108 -1.2838 +v -5.05749 -0.87498 -1.19702 +v -5.25106 -0.87498 -1.00344 +v -5.17694 -1.00108 -1.2838 +v -5.07363 -1.00108 -1.48656 +v -4.9332 -0.87498 -1.44093 +v -5.05749 -0.87498 -1.19702 +v -5.07363 -1.00108 -1.48656 +v -5.03803 -1.00108 -1.71132 +v -4.89038 -0.87498 -1.71132 +v -4.9332 -0.87498 -1.44093 +v -5.03803 -1.00108 -1.71132 +v -5.07363 -1.00108 -1.93607 +v -4.9332 -0.87498 -1.9817 +v -4.89038 -0.87498 -1.71132 +v -4.9332 -0.87498 -1.9817 +v -5.05749 -0.87498 -2.22562 +v -4.95546 -0.72733 -2.29974 +v -4.81327 -0.72733 -2.02067 +v -5.05749 -0.87498 -2.22562 +v -5.25106 -0.87498 -2.41919 +v -5.17694 -0.72733 -2.52121 +v -4.95546 -0.72733 -2.29974 +v -5.25106 -0.87498 -2.41919 +v -5.49498 -0.87498 -2.54347 +v -5.45601 -0.72733 -2.6634 +v -5.17694 -0.72733 -2.52121 +v -5.49498 -0.87498 -2.54347 +v -5.76536 -0.87498 -2.5863 +v -5.76536 -0.72733 -2.7124 +v -5.45601 -0.72733 -2.6634 +v -5.76536 -0.87498 -2.5863 +v -6.03574 -0.87498 -2.54347 +v -6.07471 -0.72733 -2.6634 +v -5.76536 -0.72733 -2.7124 +v -6.03574 -0.87498 -2.54347 +v -6.27966 -0.87498 -2.41919 +v -6.35378 -0.72733 -2.52121 +v -6.07471 -0.72733 -2.6634 +v -6.27966 -0.87498 -2.41919 +v -6.47323 -0.87498 -2.22562 +v -6.57525 -0.72733 -2.29974 +v -6.35378 -0.72733 -2.52121 +v -6.47323 -0.87498 -2.22562 +v -6.59751 -0.87498 -1.9817 +v -6.71745 -0.72733 -2.02067 +v -6.57525 -0.72733 -2.29974 +v -6.59751 -0.87498 -1.9817 +v -6.64034 -0.87498 -1.71132 +v -6.76644 -0.72733 -1.71132 +v -6.71745 -0.72733 -2.02067 +v -6.64034 -0.87498 -1.71132 +v -6.59751 -0.87498 -1.44093 +v -6.71745 -0.72733 -1.40196 +v -6.76644 -0.72733 -1.71132 +v -6.59751 -0.87498 -1.44093 +v -6.47323 -0.87498 -1.19702 +v -6.57525 -0.72733 -1.12289 +v -6.71745 -0.72733 -1.40196 +v -6.47323 -0.87498 -1.19702 +v -6.27966 -0.87498 -1.00344 +v -6.35378 -0.72733 -0.901422 +v -6.57525 -0.72733 -1.12289 +v -6.27966 -0.87498 -1.00344 +v -6.03574 -0.87498 -0.879161 +v -6.07471 -0.72733 -0.759228 +v -6.35378 -0.72733 -0.901422 +v -6.03574 -0.87498 -0.879161 +v -5.76536 -0.87498 -0.836336 +v -5.76536 -0.72733 -0.710232 +v -6.07471 -0.72733 -0.759228 +v -5.76536 -0.87498 -0.836336 +v -5.49498 -0.87498 -0.879161 +v -5.45601 -0.72733 -0.759228 +v -5.76536 -0.72733 -0.710232 +v -5.49498 -0.87498 -0.879161 +v -5.25106 -0.87498 -1.00344 +v -5.17694 -0.72733 -0.901422 +v -5.45601 -0.72733 -0.759228 +v -5.25106 -0.87498 -1.00344 +v -5.05749 -0.87498 -1.19702 +v -4.95546 -0.72733 -1.12289 +v -5.17694 -0.72733 -0.901422 +v -5.05749 -0.87498 -1.19702 +v -4.9332 -0.87498 -1.44093 +v -4.81327 -0.72733 -1.40196 +v -4.95546 -0.72733 -1.12289 +v -4.9332 -0.87498 -1.44093 +v -4.89038 -0.87498 -1.71132 +v -4.76427 -0.72733 -1.71132 +v -4.81327 -0.72733 -1.40196 +v -4.89038 -0.87498 -1.71132 +v -4.9332 -0.87498 -1.9817 +v -4.81327 -0.72733 -2.02067 +v -4.76427 -0.72733 -1.71132 +v -4.81327 -0.72733 -2.02067 +v -4.95546 -0.72733 -2.29974 +v -4.87338 -0.561772 -2.35937 +v -4.71678 -0.561772 -2.05202 +v -4.95546 -0.72733 -2.29974 +v -5.17694 -0.72733 -2.52121 +v -5.1173 -0.561772 -2.60329 +v -4.87338 -0.561772 -2.35937 +v -5.17694 -0.72733 -2.52121 +v -5.45601 -0.72733 -2.6634 +v -5.42465 -0.561772 -2.75989 +v -5.1173 -0.561772 -2.60329 +v -5.45601 -0.72733 -2.6634 +v -5.76536 -0.72733 -2.7124 +v -5.76536 -0.561772 -2.81385 +v -5.42465 -0.561772 -2.75989 +v -5.76536 -0.72733 -2.7124 +v -6.07471 -0.72733 -2.6634 +v -6.10606 -0.561772 -2.75989 +v -5.76536 -0.561772 -2.81385 +v -6.07471 -0.72733 -2.6634 +v -6.35378 -0.72733 -2.52121 +v -6.41341 -0.561772 -2.60329 +v -6.10606 -0.561772 -2.75989 +v -6.35378 -0.72733 -2.52121 +v -6.57525 -0.72733 -2.29974 +v -6.65733 -0.561772 -2.35937 +v -6.41341 -0.561772 -2.60329 +v -6.57525 -0.72733 -2.29974 +v -6.71745 -0.72733 -2.02067 +v -6.81393 -0.561772 -2.05202 +v -6.65733 -0.561772 -2.35937 +v -6.71745 -0.72733 -2.02067 +v -6.76644 -0.72733 -1.71132 +v -6.8679 -0.561772 -1.71132 +v -6.81393 -0.561772 -2.05202 +v -6.76644 -0.72733 -1.71132 +v -6.71745 -0.72733 -1.40196 +v -6.81393 -0.561772 -1.37061 +v -6.8679 -0.561772 -1.71132 +v -6.71745 -0.72733 -1.40196 +v -6.57525 -0.72733 -1.12289 +v -6.65733 -0.561772 -1.06326 +v -6.81393 -0.561772 -1.37061 +v -6.57525 -0.72733 -1.12289 +v -6.35378 -0.72733 -0.901422 +v -6.41341 -0.561772 -0.819344 +v -6.65733 -0.561772 -1.06326 +v -6.35378 -0.72733 -0.901422 +v -6.07471 -0.72733 -0.759228 +v -6.10606 -0.561772 -0.662739 +v -6.41341 -0.561772 -0.819344 +v -6.07471 -0.72733 -0.759228 +v -5.76536 -0.72733 -0.710232 +v -5.76536 -0.561772 -0.608777 +v -6.10606 -0.561772 -0.662739 +v -5.76536 -0.72733 -0.710232 +v -5.45601 -0.72733 -0.759228 +v -5.42465 -0.561772 -0.66274 +v -5.76536 -0.561772 -0.608777 +v -5.45601 -0.72733 -0.759228 +v -5.17694 -0.72733 -0.901422 +v -5.1173 -0.561772 -0.819344 +v -5.42465 -0.561772 -0.66274 +v -5.17694 -0.72733 -0.901422 +v -4.95546 -0.72733 -1.12289 +v -4.87339 -0.561772 -1.06326 +v -5.1173 -0.561772 -0.819344 +v -4.95546 -0.72733 -1.12289 +v -4.81327 -0.72733 -1.40196 +v -4.71678 -0.561772 -1.37061 +v -4.87339 -0.561772 -1.06326 +v -4.81327 -0.72733 -1.40196 +v -4.76427 -0.72733 -1.71132 +v -4.66282 -0.561772 -1.71132 +v -4.71678 -0.561772 -1.37061 +v -4.76427 -0.72733 -1.71132 +v -4.81327 -0.72733 -2.02067 +v -4.71678 -0.561772 -2.05202 +v -4.66282 -0.561772 -1.71132 +v -4.71678 -0.561772 -2.05202 +v -4.87338 -0.561772 -2.35937 +v -4.81327 -0.38238 -2.40305 +v -4.64611 -0.38238 -2.07498 +v -4.87338 -0.561772 -2.35937 +v -5.1173 -0.561772 -2.60329 +v -5.07363 -0.38238 -2.6634 +v -4.81327 -0.38238 -2.40305 +v -5.1173 -0.561772 -2.60329 +v -5.42465 -0.561772 -2.75989 +v -5.40169 -0.38238 -2.83056 +v -5.07363 -0.38238 -2.6634 +v -5.42465 -0.561772 -2.75989 +v -5.76536 -0.561772 -2.81385 +v -5.76536 -0.38238 -2.88816 +v -5.40169 -0.38238 -2.83056 +v -5.76536 -0.561772 -2.81385 +v -6.10606 -0.561772 -2.75989 +v -6.12902 -0.38238 -2.83056 +v -5.76536 -0.38238 -2.88816 +v -6.10606 -0.561772 -2.75989 +v -6.41341 -0.561772 -2.60329 +v -6.45709 -0.38238 -2.6634 +v -6.12902 -0.38238 -2.83056 +v -6.41341 -0.561772 -2.60329 +v -6.65733 -0.561772 -2.35937 +v -6.71745 -0.38238 -2.40305 +v -6.45709 -0.38238 -2.6634 +v -6.65733 -0.561772 -2.35937 +v -6.81393 -0.561772 -2.05202 +v -6.8846 -0.38238 -2.07498 +v -6.71745 -0.38238 -2.40305 +v -6.81393 -0.561772 -2.05202 +v -6.8679 -0.561772 -1.71132 +v -6.9422 -0.38238 -1.71132 +v -6.8846 -0.38238 -2.07498 +v -6.8679 -0.561772 -1.71132 +v -6.81393 -0.561772 -1.37061 +v -6.8846 -0.38238 -1.34765 +v -6.9422 -0.38238 -1.71132 +v -6.81393 -0.561772 -1.37061 +v -6.65733 -0.561772 -1.06326 +v -6.71745 -0.38238 -1.01958 +v -6.8846 -0.38238 -1.34765 +v -6.65733 -0.561772 -1.06326 +v -6.41341 -0.561772 -0.819344 +v -6.45709 -0.38238 -0.759228 +v -6.71745 -0.38238 -1.01958 +v -6.41341 -0.561772 -0.819344 +v -6.10606 -0.561772 -0.662739 +v -6.12902 -0.38238 -0.59207 +v -6.45709 -0.38238 -0.759228 +v -6.10606 -0.561772 -0.662739 +v -5.76536 -0.561772 -0.608777 +v -5.76536 -0.38238 -0.534471 +v -6.12902 -0.38238 -0.59207 +v -5.76536 -0.561772 -0.608777 +v -5.42465 -0.561772 -0.66274 +v -5.40169 -0.38238 -0.59207 +v -5.76536 -0.38238 -0.534471 +v -5.42465 -0.561772 -0.66274 +v -5.1173 -0.561772 -0.819344 +v -5.07363 -0.38238 -0.759228 +v -5.40169 -0.38238 -0.59207 +v -5.1173 -0.561772 -0.819344 +v -4.87339 -0.561772 -1.06326 +v -4.81327 -0.38238 -1.01958 +v -5.07363 -0.38238 -0.759228 +v -4.87339 -0.561772 -1.06326 +v -4.71678 -0.561772 -1.37061 +v -4.64611 -0.38238 -1.34765 +v -4.81327 -0.38238 -1.01958 +v -4.71678 -0.561772 -1.37061 +v -4.66282 -0.561772 -1.71132 +v -4.58851 -0.38238 -1.71132 +v -4.64611 -0.38238 -1.34765 +v -4.66282 -0.561772 -1.71132 +v -4.71678 -0.561772 -2.05202 +v -4.64611 -0.38238 -2.07498 +v -4.58851 -0.38238 -1.71132 +v -4.64611 -0.38238 -2.07498 +v -4.81327 -0.38238 -2.40305 +v -4.7766 -0.193573 -2.42969 +v -4.603 -0.193573 -2.08899 +v -4.81327 -0.38238 -2.40305 +v -5.07363 -0.38238 -2.6634 +v -5.04698 -0.193573 -2.70008 +v -4.7766 -0.193573 -2.42969 +v -5.07363 -0.38238 -2.6634 +v -5.40169 -0.38238 -2.83056 +v -5.38769 -0.193573 -2.87367 +v -5.04698 -0.193573 -2.70008 +v -5.40169 -0.38238 -2.83056 +v -5.76536 -0.38238 -2.88816 +v -5.76536 -0.193573 -2.93349 +v -5.38769 -0.193573 -2.87367 +v -5.76536 -0.38238 -2.88816 +v -6.12902 -0.38238 -2.83056 +v -6.14303 -0.193573 -2.87367 +v -5.76536 -0.193573 -2.93349 +v -6.12902 -0.38238 -2.83056 +v -6.45709 -0.38238 -2.6634 +v -6.48373 -0.193573 -2.70008 +v -6.14303 -0.193573 -2.87367 +v -6.45709 -0.38238 -2.6634 +v -6.71745 -0.38238 -2.40305 +v -6.75412 -0.193573 -2.42969 +v -6.48373 -0.193573 -2.70008 +v -6.71745 -0.38238 -2.40305 +v -6.8846 -0.38238 -2.07498 +v -6.92771 -0.193573 -2.08899 +v -6.75412 -0.193573 -2.42969 +v -6.8846 -0.38238 -2.07498 +v -6.9422 -0.38238 -1.71132 +v -6.98753 -0.193573 -1.71132 +v -6.92771 -0.193573 -2.08899 +v -6.9422 -0.38238 -1.71132 +v -6.8846 -0.38238 -1.34765 +v -6.92771 -0.193573 -1.33364 +v -6.98753 -0.193573 -1.71132 +v -6.8846 -0.38238 -1.34765 +v -6.71745 -0.38238 -1.01958 +v -6.75412 -0.193573 -0.99294 +v -6.92771 -0.193573 -1.33364 +v -6.71745 -0.38238 -1.01958 +v -6.45709 -0.38238 -0.759228 +v -6.48373 -0.193573 -0.722557 +v -6.75412 -0.193573 -0.99294 +v -6.45709 -0.38238 -0.759228 +v -6.12902 -0.38238 -0.59207 +v -6.14303 -0.193573 -0.54896 +v -6.48373 -0.193573 -0.722557 +v -6.12902 -0.38238 -0.59207 +v -5.76536 -0.38238 -0.534471 +v -5.76536 -0.193573 -0.489142 +v -6.14303 -0.193573 -0.54896 +v -5.76536 -0.38238 -0.534471 +v -5.40169 -0.38238 -0.59207 +v -5.38769 -0.193573 -0.54896 +v -5.76536 -0.193573 -0.489142 +v -5.40169 -0.38238 -0.59207 +v -5.07363 -0.38238 -0.759228 +v -5.04698 -0.193573 -0.722557 +v -5.38769 -0.193573 -0.54896 +v -5.07363 -0.38238 -0.759228 +v -4.81327 -0.38238 -1.01958 +v -4.7766 -0.193573 -0.992941 +v -5.04698 -0.193573 -0.722557 +v -4.81327 -0.38238 -1.01958 +v -4.64611 -0.38238 -1.34765 +v -4.603 -0.193573 -1.33364 +v -4.7766 -0.193573 -0.992941 +v -4.64611 -0.38238 -1.34765 +v -4.58851 -0.38238 -1.71132 +v -4.54319 -0.193573 -1.71132 +v -4.603 -0.193573 -1.33364 +v -4.58851 -0.38238 -1.71132 +v -4.64611 -0.38238 -2.07498 +v -4.603 -0.193573 -2.08899 +v -4.54319 -0.193573 -1.71132 +v -4.603 -0.193573 -2.08899 +v -4.7766 -0.193573 -2.42969 +v -4.76427 0 -2.43865 +v -4.58851 0 -2.0937 +v -4.7766 -0.193573 -2.42969 +v -5.04698 -0.193573 -2.70008 +v -5.03803 0 -2.7124 +v -4.76427 0 -2.43865 +v -5.04698 -0.193573 -2.70008 +v -5.38769 -0.193573 -2.87367 +v -5.38298 0 -2.88816 +v -5.03803 0 -2.7124 +v -5.38769 -0.193573 -2.87367 +v -5.76536 -0.193573 -2.93349 +v -5.76536 0 -2.94872 +v -5.38298 0 -2.88816 +v -5.76536 -0.193573 -2.93349 +v -6.14303 -0.193573 -2.87367 +v -6.14774 0 -2.88816 +v -5.76536 0 -2.94872 +v -6.14303 -0.193573 -2.87367 +v -6.48373 -0.193573 -2.70008 +v -6.49269 0 -2.7124 +v -6.14774 0 -2.88816 +v -6.48373 -0.193573 -2.70008 +v -6.75412 -0.193573 -2.42969 +v -6.76644 0 -2.43865 +v -6.49269 0 -2.7124 +v -6.75412 -0.193573 -2.42969 +v -6.92771 -0.193573 -2.08899 +v -6.9422 0 -2.0937 +v -6.76644 0 -2.43865 +v -6.92771 -0.193573 -2.08899 +v -6.98753 -0.193573 -1.71132 +v -7.00277 0 -1.71132 +v -6.9422 0 -2.0937 +v -6.98753 -0.193573 -1.71132 +v -6.92771 -0.193573 -1.33364 +v -6.9422 0 -1.32894 +v -7.00277 0 -1.71132 +v -6.92771 -0.193573 -1.33364 +v -6.75412 -0.193573 -0.99294 +v -6.76644 0 -0.983986 +v -6.9422 0 -1.32894 +v -6.75412 -0.193573 -0.99294 +v -6.48373 -0.193573 -0.722557 +v -6.49269 0 -0.710232 +v -6.76644 0 -0.983986 +v -6.48373 -0.193573 -0.722557 +v -6.14303 -0.193573 -0.54896 +v -6.14774 0 -0.534471 +v -6.49269 0 -0.710232 +v -6.14303 -0.193573 -0.54896 +v -5.76536 -0.193573 -0.489142 +v -5.76536 0 -0.473908 +v -6.14774 0 -0.534471 +v -5.76536 -0.193573 -0.489142 +v -5.38769 -0.193573 -0.54896 +v -5.38298 0 -0.534471 +v -5.76536 0 -0.473908 +v -5.38769 -0.193573 -0.54896 +v -5.04698 -0.193573 -0.722557 +v -5.03803 0 -0.710232 +v -5.38298 0 -0.534471 +v -5.04698 -0.193573 -0.722557 +v -4.7766 -0.193573 -0.992941 +v -4.76427 0 -0.983986 +v -5.03803 0 -0.710232 +v -4.7766 -0.193573 -0.992941 +v -4.603 -0.193573 -1.33364 +v -4.58851 0 -1.32894 +v -4.76427 0 -0.983986 +v -4.603 -0.193573 -1.33364 +v -4.54319 -0.193573 -1.71132 +v -4.52795 0 -1.71132 +v -4.58851 0 -1.32894 +v -4.54319 -0.193573 -1.71132 +v -4.603 -0.193573 -2.08899 +v -4.58851 0 -2.0937 +v -4.52795 0 -1.71132 +v -4.58851 0 -2.0937 +v -4.76427 0 -2.43865 +v -4.7766 0.193573 -2.42969 +v -4.603 0.193573 -2.08899 +v -4.76427 0 -2.43865 +v -5.03803 0 -2.7124 +v -5.04698 0.193573 -2.70008 +v -4.7766 0.193573 -2.42969 +v -5.03803 0 -2.7124 +v -5.38298 0 -2.88816 +v -5.38769 0.193573 -2.87367 +v -5.04698 0.193573 -2.70008 +v -5.38298 0 -2.88816 +v -5.76536 0 -2.94872 +v -5.76536 0.193573 -2.93349 +v -5.38769 0.193573 -2.87367 +v -5.76536 0 -2.94872 +v -6.14774 0 -2.88816 +v -6.14303 0.193573 -2.87367 +v -5.76536 0.193573 -2.93349 +v -6.14774 0 -2.88816 +v -6.49269 0 -2.7124 +v -6.48373 0.193573 -2.70008 +v -6.14303 0.193573 -2.87367 +v -6.49269 0 -2.7124 +v -6.76644 0 -2.43865 +v -6.75412 0.193573 -2.42969 +v -6.48373 0.193573 -2.70008 +v -6.76644 0 -2.43865 +v -6.9422 0 -2.0937 +v -6.92771 0.193573 -2.08899 +v -6.75412 0.193573 -2.42969 +v -6.9422 0 -2.0937 +v -7.00277 0 -1.71132 +v -6.98753 0.193573 -1.71132 +v -6.92771 0.193573 -2.08899 +v -7.00277 0 -1.71132 +v -6.9422 0 -1.32894 +v -6.92771 0.193573 -1.33364 +v -6.98753 0.193573 -1.71132 +v -6.9422 0 -1.32894 +v -6.76644 0 -0.983986 +v -6.75412 0.193573 -0.99294 +v -6.92771 0.193573 -1.33364 +v -6.76644 0 -0.983986 +v -6.49269 0 -0.710232 +v -6.48373 0.193573 -0.722557 +v -6.75412 0.193573 -0.99294 +v -6.49269 0 -0.710232 +v -6.14774 0 -0.534471 +v -6.14303 0.193573 -0.54896 +v -6.48373 0.193573 -0.722557 +v -6.14774 0 -0.534471 +v -5.76536 0 -0.473908 +v -5.76536 0.193573 -0.489142 +v -6.14303 0.193573 -0.54896 +v -5.76536 0 -0.473908 +v -5.38298 0 -0.534471 +v -5.38769 0.193573 -0.54896 +v -5.76536 0.193573 -0.489142 +v -5.38298 0 -0.534471 +v -5.03803 0 -0.710232 +v -5.04698 0.193573 -0.722557 +v -5.38769 0.193573 -0.54896 +v -5.03803 0 -0.710232 +v -4.76427 0 -0.983986 +v -4.7766 0.193573 -0.992941 +v -5.04698 0.193573 -0.722557 +v -4.76427 0 -0.983986 +v -4.58851 0 -1.32894 +v -4.603 0.193573 -1.33364 +v -4.7766 0.193573 -0.992941 +v -4.58851 0 -1.32894 +v -4.52795 0 -1.71132 +v -4.54319 0.193573 -1.71132 +v -4.603 0.193573 -1.33364 +v -4.52795 0 -1.71132 +v -4.58851 0 -2.0937 +v -4.603 0.193573 -2.08899 +v -4.54319 0.193573 -1.71132 +v -4.603 0.193573 -2.08899 +v -4.7766 0.193573 -2.42969 +v -4.81327 0.38238 -2.40305 +v -4.64611 0.38238 -2.07498 +v -4.7766 0.193573 -2.42969 +v -5.04698 0.193573 -2.70008 +v -5.07363 0.38238 -2.6634 +v -4.81327 0.38238 -2.40305 +v -5.04698 0.193573 -2.70008 +v -5.38769 0.193573 -2.87367 +v -5.40169 0.38238 -2.83056 +v -5.07363 0.38238 -2.6634 +v -5.38769 0.193573 -2.87367 +v -5.76536 0.193573 -2.93349 +v -5.76536 0.38238 -2.88816 +v -5.40169 0.38238 -2.83056 +v -5.76536 0.193573 -2.93349 +v -6.14303 0.193573 -2.87367 +v -6.12902 0.38238 -2.83056 +v -5.76536 0.38238 -2.88816 +v -6.14303 0.193573 -2.87367 +v -6.48373 0.193573 -2.70008 +v -6.45709 0.38238 -2.6634 +v -6.12902 0.38238 -2.83056 +v -6.48373 0.193573 -2.70008 +v -6.75412 0.193573 -2.42969 +v -6.71745 0.38238 -2.40305 +v -6.45709 0.38238 -2.6634 +v -6.75412 0.193573 -2.42969 +v -6.92771 0.193573 -2.08899 +v -6.8846 0.38238 -2.07498 +v -6.71745 0.38238 -2.40305 +v -6.92771 0.193573 -2.08899 +v -6.98753 0.193573 -1.71132 +v -6.9422 0.38238 -1.71132 +v -6.8846 0.38238 -2.07498 +v -6.98753 0.193573 -1.71132 +v -6.92771 0.193573 -1.33364 +v -6.8846 0.38238 -1.34765 +v -6.9422 0.38238 -1.71132 +v -6.92771 0.193573 -1.33364 +v -6.75412 0.193573 -0.99294 +v -6.71745 0.38238 -1.01958 +v -6.8846 0.38238 -1.34765 +v -6.75412 0.193573 -0.99294 +v -6.48373 0.193573 -0.722557 +v -6.45709 0.38238 -0.759228 +v -6.71745 0.38238 -1.01958 +v -6.48373 0.193573 -0.722557 +v -6.14303 0.193573 -0.54896 +v -6.12902 0.38238 -0.59207 +v -6.45709 0.38238 -0.759228 +v -6.14303 0.193573 -0.54896 +v -5.76536 0.193573 -0.489142 +v -5.76536 0.38238 -0.534471 +v -6.12902 0.38238 -0.59207 +v -5.76536 0.193573 -0.489142 +v -5.38769 0.193573 -0.54896 +v -5.40169 0.38238 -0.59207 +v -5.76536 0.38238 -0.534471 +v -5.38769 0.193573 -0.54896 +v -5.04698 0.193573 -0.722557 +v -5.07363 0.38238 -0.759228 +v -5.40169 0.38238 -0.59207 +v -5.04698 0.193573 -0.722557 +v -4.7766 0.193573 -0.992941 +v -4.81327 0.38238 -1.01958 +v -5.07363 0.38238 -0.759228 +v -4.7766 0.193573 -0.992941 +v -4.603 0.193573 -1.33364 +v -4.64611 0.38238 -1.34765 +v -4.81327 0.38238 -1.01958 +v -4.603 0.193573 -1.33364 +v -4.54319 0.193573 -1.71132 +v -4.58851 0.38238 -1.71132 +v -4.64611 0.38238 -1.34765 +v -4.54319 0.193573 -1.71132 +v -4.603 0.193573 -2.08899 +v -4.64611 0.38238 -2.07498 +v -4.58851 0.38238 -1.71132 +v -4.64611 0.38238 -2.07498 +v -4.81327 0.38238 -2.40305 +v -4.87338 0.561772 -2.35937 +v -4.71678 0.561772 -2.05202 +v -4.81327 0.38238 -2.40305 +v -5.07363 0.38238 -2.6634 +v -5.1173 0.561772 -2.60329 +v -4.87338 0.561772 -2.35937 +v -5.07363 0.38238 -2.6634 +v -5.40169 0.38238 -2.83056 +v -5.42465 0.561772 -2.75989 +v -5.1173 0.561772 -2.60329 +v -5.40169 0.38238 -2.83056 +v -5.76536 0.38238 -2.88816 +v -5.76536 0.561772 -2.81385 +v -5.42465 0.561772 -2.75989 +v -5.76536 0.38238 -2.88816 +v -6.12902 0.38238 -2.83056 +v -6.10606 0.561772 -2.75989 +v -5.76536 0.561772 -2.81385 +v -6.12902 0.38238 -2.83056 +v -6.45709 0.38238 -2.6634 +v -6.41341 0.561772 -2.60329 +v -6.10606 0.561772 -2.75989 +v -6.45709 0.38238 -2.6634 +v -6.71745 0.38238 -2.40305 +v -6.65733 0.561772 -2.35937 +v -6.41341 0.561772 -2.60329 +v -6.71745 0.38238 -2.40305 +v -6.8846 0.38238 -2.07498 +v -6.81393 0.561772 -2.05202 +v -6.65733 0.561772 -2.35937 +v -6.8846 0.38238 -2.07498 +v -6.9422 0.38238 -1.71132 +v -6.8679 0.561772 -1.71132 +v -6.81393 0.561772 -2.05202 +v -6.9422 0.38238 -1.71132 +v -6.8846 0.38238 -1.34765 +v -6.81393 0.561772 -1.37061 +v -6.8679 0.561772 -1.71132 +v -6.8846 0.38238 -1.34765 +v -6.71745 0.38238 -1.01958 +v -6.65733 0.561772 -1.06326 +v -6.81393 0.561772 -1.37061 +v -6.71745 0.38238 -1.01958 +v -6.45709 0.38238 -0.759228 +v -6.41341 0.561772 -0.819344 +v -6.65733 0.561772 -1.06326 +v -6.45709 0.38238 -0.759228 +v -6.12902 0.38238 -0.59207 +v -6.10606 0.561772 -0.662739 +v -6.41341 0.561772 -0.819344 +v -6.12902 0.38238 -0.59207 +v -5.76536 0.38238 -0.534471 +v -5.76536 0.561772 -0.608777 +v -6.10606 0.561772 -0.662739 +v -5.76536 0.38238 -0.534471 +v -5.40169 0.38238 -0.59207 +v -5.42465 0.561772 -0.66274 +v -5.76536 0.561772 -0.608777 +v -5.40169 0.38238 -0.59207 +v -5.07363 0.38238 -0.759228 +v -5.1173 0.561772 -0.819344 +v -5.42465 0.561772 -0.66274 +v -5.07363 0.38238 -0.759228 +v -4.81327 0.38238 -1.01958 +v -4.87339 0.561772 -1.06326 +v -5.1173 0.561772 -0.819344 +v -4.81327 0.38238 -1.01958 +v -4.64611 0.38238 -1.34765 +v -4.71678 0.561772 -1.37061 +v -4.87339 0.561772 -1.06326 +v -4.64611 0.38238 -1.34765 +v -4.58851 0.38238 -1.71132 +v -4.66282 0.561772 -1.71132 +v -4.71678 0.561772 -1.37061 +v -4.58851 0.38238 -1.71132 +v -4.64611 0.38238 -2.07498 +v -4.71678 0.561772 -2.05202 +v -4.66282 0.561772 -1.71132 +v -4.71678 0.561772 -2.05202 +v -4.87338 0.561772 -2.35937 +v -4.95546 0.72733 -2.29974 +v -4.81327 0.72733 -2.02067 +v -4.87338 0.561772 -2.35937 +v -5.1173 0.561772 -2.60329 +v -5.17694 0.72733 -2.52121 +v -4.95546 0.72733 -2.29974 +v -5.1173 0.561772 -2.60329 +v -5.42465 0.561772 -2.75989 +v -5.45601 0.72733 -2.6634 +v -5.17694 0.72733 -2.52121 +v -5.42465 0.561772 -2.75989 +v -5.76536 0.561772 -2.81385 +v -5.76536 0.72733 -2.7124 +v -5.45601 0.72733 -2.6634 +v -5.76536 0.561772 -2.81385 +v -6.10606 0.561772 -2.75989 +v -6.07471 0.72733 -2.6634 +v -5.76536 0.72733 -2.7124 +v -6.10606 0.561772 -2.75989 +v -6.41341 0.561772 -2.60329 +v -6.35378 0.72733 -2.52121 +v -6.07471 0.72733 -2.6634 +v -6.41341 0.561772 -2.60329 +v -6.65733 0.561772 -2.35937 +v -6.57525 0.72733 -2.29974 +v -6.35378 0.72733 -2.52121 +v -6.65733 0.561772 -2.35937 +v -6.81393 0.561772 -2.05202 +v -6.71745 0.72733 -2.02067 +v -6.57525 0.72733 -2.29974 +v -6.81393 0.561772 -2.05202 +v -6.8679 0.561772 -1.71132 +v -6.76644 0.72733 -1.71132 +v -6.71745 0.72733 -2.02067 +v -6.8679 0.561772 -1.71132 +v -6.81393 0.561772 -1.37061 +v -6.71745 0.72733 -1.40196 +v -6.76644 0.72733 -1.71132 +v -6.81393 0.561772 -1.37061 +v -6.65733 0.561772 -1.06326 +v -6.57525 0.72733 -1.12289 +v -6.71745 0.72733 -1.40196 +v -6.65733 0.561772 -1.06326 +v -6.41341 0.561772 -0.819344 +v -6.35378 0.72733 -0.901422 +v -6.57525 0.72733 -1.12289 +v -6.41341 0.561772 -0.819344 +v -6.10606 0.561772 -0.662739 +v -6.07471 0.72733 -0.759228 +v -6.35378 0.72733 -0.901422 +v -6.10606 0.561772 -0.662739 +v -5.76536 0.561772 -0.608777 +v -5.76536 0.72733 -0.710232 +v -6.07471 0.72733 -0.759228 +v -5.76536 0.561772 -0.608777 +v -5.42465 0.561772 -0.66274 +v -5.45601 0.72733 -0.759228 +v -5.76536 0.72733 -0.710232 +v -5.42465 0.561772 -0.66274 +v -5.1173 0.561772 -0.819344 +v -5.17694 0.72733 -0.901422 +v -5.45601 0.72733 -0.759228 +v -5.1173 0.561772 -0.819344 +v -4.87339 0.561772 -1.06326 +v -4.95546 0.72733 -1.12289 +v -5.17694 0.72733 -0.901422 +v -4.87339 0.561772 -1.06326 +v -4.71678 0.561772 -1.37061 +v -4.81327 0.72733 -1.40196 +v -4.95546 0.72733 -1.12289 +v -4.71678 0.561772 -1.37061 +v -4.66282 0.561772 -1.71132 +v -4.76427 0.72733 -1.71132 +v -4.81327 0.72733 -1.40196 +v -4.66282 0.561772 -1.71132 +v -4.71678 0.561772 -2.05202 +v -4.81327 0.72733 -2.02067 +v -4.76427 0.72733 -1.71132 +v -4.81327 0.72733 -2.02067 +v -4.95546 0.72733 -2.29974 +v -5.05749 0.87498 -2.22562 +v -4.9332 0.87498 -1.9817 +v -4.95546 0.72733 -2.29974 +v -5.17694 0.72733 -2.52121 +v -5.25106 0.87498 -2.41919 +v -5.05749 0.87498 -2.22562 +v -5.17694 0.72733 -2.52121 +v -5.45601 0.72733 -2.6634 +v -5.49498 0.87498 -2.54347 +v -5.25106 0.87498 -2.41919 +v -5.45601 0.72733 -2.6634 +v -5.76536 0.72733 -2.7124 +v -5.76536 0.87498 -2.5863 +v -5.49498 0.87498 -2.54347 +v -5.76536 0.72733 -2.7124 +v -6.07471 0.72733 -2.6634 +v -6.03574 0.87498 -2.54347 +v -5.76536 0.87498 -2.5863 +v -6.07471 0.72733 -2.6634 +v -6.35378 0.72733 -2.52121 +v -6.27966 0.87498 -2.41919 +v -6.03574 0.87498 -2.54347 +v -6.35378 0.72733 -2.52121 +v -6.57525 0.72733 -2.29974 +v -6.47323 0.87498 -2.22562 +v -6.27966 0.87498 -2.41919 +v -6.57525 0.72733 -2.29974 +v -6.71745 0.72733 -2.02067 +v -6.59751 0.87498 -1.9817 +v -6.47323 0.87498 -2.22562 +v -6.71745 0.72733 -2.02067 +v -6.76644 0.72733 -1.71132 +v -6.64034 0.87498 -1.71132 +v -6.59751 0.87498 -1.9817 +v -6.76644 0.72733 -1.71132 +v -6.71745 0.72733 -1.40196 +v -6.59751 0.87498 -1.44093 +v -6.64034 0.87498 -1.71132 +v -6.71745 0.72733 -1.40196 +v -6.57525 0.72733 -1.12289 +v -6.47323 0.87498 -1.19702 +v -6.59751 0.87498 -1.44093 +v -6.57525 0.72733 -1.12289 +v -6.35378 0.72733 -0.901422 +v -6.27966 0.87498 -1.00344 +v -6.47323 0.87498 -1.19702 +v -6.35378 0.72733 -0.901422 +v -6.07471 0.72733 -0.759228 +v -6.03574 0.87498 -0.879161 +v -6.27966 0.87498 -1.00344 +v -6.07471 0.72733 -0.759228 +v -5.76536 0.72733 -0.710232 +v -5.76536 0.87498 -0.836336 +v -6.03574 0.87498 -0.879161 +v -5.76536 0.72733 -0.710232 +v -5.45601 0.72733 -0.759228 +v -5.49498 0.87498 -0.879161 +v -5.76536 0.87498 -0.836336 +v -5.45601 0.72733 -0.759228 +v -5.17694 0.72733 -0.901422 +v -5.25106 0.87498 -1.00344 +v -5.49498 0.87498 -0.879161 +v -5.17694 0.72733 -0.901422 +v -4.95546 0.72733 -1.12289 +v -5.05749 0.87498 -1.19702 +v -5.25106 0.87498 -1.00344 +v -4.95546 0.72733 -1.12289 +v -4.81327 0.72733 -1.40196 +v -4.9332 0.87498 -1.44093 +v -5.05749 0.87498 -1.19702 +v -4.81327 0.72733 -1.40196 +v -4.76427 0.72733 -1.71132 +v -4.89038 0.87498 -1.71132 +v -4.9332 0.87498 -1.44093 +v -4.76427 0.72733 -1.71132 +v -4.81327 0.72733 -2.02067 +v -4.9332 0.87498 -1.9817 +v -4.89038 0.87498 -1.71132 +v -4.9332 0.87498 -1.9817 +v -5.05749 0.87498 -2.22562 +v -5.17694 1.00108 -2.13883 +v -5.07363 1.00108 -1.93607 +v -5.05749 0.87498 -2.22562 +v -5.25106 0.87498 -2.41919 +v -5.33784 1.00108 -2.29974 +v -5.17694 1.00108 -2.13883 +v -5.25106 0.87498 -2.41919 +v -5.49498 0.87498 -2.54347 +v -5.5406 1.00108 -2.40305 +v -5.33784 1.00108 -2.29974 +v -5.49498 0.87498 -2.54347 +v -5.76536 0.87498 -2.5863 +v -5.76536 1.00108 -2.43865 +v -5.5406 1.00108 -2.40305 +v -5.76536 0.87498 -2.5863 +v -6.03574 0.87498 -2.54347 +v -5.99012 1.00108 -2.40305 +v -5.76536 1.00108 -2.43865 +v -6.03574 0.87498 -2.54347 +v -6.27966 0.87498 -2.41919 +v -6.19287 1.00108 -2.29974 +v -5.99012 1.00108 -2.40305 +v -6.27966 0.87498 -2.41919 +v -6.47323 0.87498 -2.22562 +v -6.35378 1.00108 -2.13883 +v -6.19287 1.00108 -2.29974 +v -6.47323 0.87498 -2.22562 +v -6.59751 0.87498 -1.9817 +v -6.45709 1.00108 -1.93607 +v -6.35378 1.00108 -2.13883 +v -6.59751 0.87498 -1.9817 +v -6.64034 0.87498 -1.71132 +v -6.49269 1.00108 -1.71132 +v -6.45709 1.00108 -1.93607 +v -6.64034 0.87498 -1.71132 +v -6.59751 0.87498 -1.44093 +v -6.45709 1.00108 -1.48656 +v -6.49269 1.00108 -1.71132 +v -6.59751 0.87498 -1.44093 +v -6.47323 0.87498 -1.19702 +v -6.35378 1.00108 -1.2838 +v -6.45709 1.00108 -1.48656 +v -6.47323 0.87498 -1.19702 +v -6.27966 0.87498 -1.00344 +v -6.19287 1.00108 -1.12289 +v -6.35378 1.00108 -1.2838 +v -6.27966 0.87498 -1.00344 +v -6.03574 0.87498 -0.879161 +v -5.99012 1.00108 -1.01958 +v -6.19287 1.00108 -1.12289 +v -6.03574 0.87498 -0.879161 +v -5.76536 0.87498 -0.836336 +v -5.76536 1.00108 -0.983986 +v -5.99012 1.00108 -1.01958 +v -5.76536 0.87498 -0.836336 +v -5.49498 0.87498 -0.879161 +v -5.5406 1.00108 -1.01958 +v -5.76536 1.00108 -0.983986 +v -5.49498 0.87498 -0.879161 +v -5.25106 0.87498 -1.00344 +v -5.33784 1.00108 -1.12289 +v -5.5406 1.00108 -1.01958 +v -5.25106 0.87498 -1.00344 +v -5.05749 0.87498 -1.19702 +v -5.17694 1.00108 -1.2838 +v -5.33784 1.00108 -1.12289 +v -5.05749 0.87498 -1.19702 +v -4.9332 0.87498 -1.44093 +v -5.07363 1.00108 -1.48656 +v -5.17694 1.00108 -1.2838 +v -4.9332 0.87498 -1.44093 +v -4.89038 0.87498 -1.71132 +v -5.03803 1.00108 -1.71132 +v -5.07363 1.00108 -1.48656 +v -4.89038 0.87498 -1.71132 +v -4.9332 0.87498 -1.9817 +v -5.07363 1.00108 -1.93607 +v -5.03803 1.00108 -1.71132 +v -5.07363 1.00108 -1.93607 +v -5.17694 1.00108 -2.13883 +v -5.31087 1.10254 -2.04152 +v -5.23108 1.10254 -1.88491 +v -5.17694 1.00108 -2.13883 +v -5.33784 1.00108 -2.29974 +v -5.43516 1.10254 -2.1658 +v -5.31087 1.10254 -2.04152 +v -5.33784 1.00108 -2.29974 +v -5.5406 1.00108 -2.40305 +v -5.59176 1.10254 -2.24559 +v -5.43516 1.10254 -2.1658 +v -5.5406 1.00108 -2.40305 +v -5.76536 1.00108 -2.43865 +v -5.76536 1.10254 -2.27309 +v -5.59176 1.10254 -2.24559 +v -5.76536 1.00108 -2.43865 +v -5.99012 1.00108 -2.40305 +v -5.93895 1.10254 -2.24559 +v -5.76536 1.10254 -2.27309 +v -5.99012 1.00108 -2.40305 +v -6.19287 1.00108 -2.29974 +v -6.09556 1.10254 -2.1658 +v -5.93895 1.10254 -2.24559 +v -6.19287 1.00108 -2.29974 +v -6.35378 1.00108 -2.13883 +v -6.21984 1.10254 -2.04152 +v -6.09556 1.10254 -2.1658 +v -6.35378 1.00108 -2.13883 +v -6.45709 1.00108 -1.93607 +v -6.29963 1.10254 -1.88491 +v -6.21984 1.10254 -2.04152 +v -6.45709 1.00108 -1.93607 +v -6.49269 1.00108 -1.71132 +v -6.32713 1.10254 -1.71132 +v -6.29963 1.10254 -1.88491 +v -6.49269 1.00108 -1.71132 +v -6.45709 1.00108 -1.48656 +v -6.29963 1.10254 -1.53772 +v -6.32713 1.10254 -1.71132 +v -6.45709 1.00108 -1.48656 +v -6.35378 1.00108 -1.2838 +v -6.21984 1.10254 -1.38111 +v -6.29963 1.10254 -1.53772 +v -6.35378 1.00108 -1.2838 +v -6.19287 1.00108 -1.12289 +v -6.09556 1.10254 -1.25683 +v -6.21984 1.10254 -1.38111 +v -6.19287 1.00108 -1.12289 +v -5.99012 1.00108 -1.01958 +v -5.93895 1.10254 -1.17704 +v -6.09556 1.10254 -1.25683 +v -5.99012 1.00108 -1.01958 +v -5.76536 1.00108 -0.983986 +v -5.76536 1.10254 -1.14954 +v -5.93895 1.10254 -1.17704 +v -5.76536 1.00108 -0.983986 +v -5.5406 1.00108 -1.01958 +v -5.59176 1.10254 -1.17704 +v -5.76536 1.10254 -1.14954 +v -5.5406 1.00108 -1.01958 +v -5.33784 1.00108 -1.12289 +v -5.43516 1.10254 -1.25683 +v -5.59176 1.10254 -1.17704 +v -5.33784 1.00108 -1.12289 +v -5.17694 1.00108 -1.2838 +v -5.31088 1.10254 -1.38111 +v -5.43516 1.10254 -1.25683 +v -5.17694 1.00108 -1.2838 +v -5.07363 1.00108 -1.48656 +v -5.23108 1.10254 -1.53772 +v -5.31088 1.10254 -1.38111 +v -5.07363 1.00108 -1.48656 +v -5.03803 1.00108 -1.71132 +v -5.20359 1.10254 -1.71132 +v -5.23108 1.10254 -1.53772 +v -5.03803 1.00108 -1.71132 +v -5.07363 1.00108 -1.93607 +v -5.23108 1.10254 -1.88491 +v -5.20359 1.10254 -1.71132 +v -5.23108 1.10254 -1.88491 +v -5.31087 1.10254 -2.04152 +v -5.45601 1.17684 -1.93607 +v -5.40169 1.17684 -1.82948 +v -5.31087 1.10254 -2.04152 +v -5.43516 1.10254 -2.1658 +v -5.5406 1.17684 -2.02067 +v -5.45601 1.17684 -1.93607 +v -5.43516 1.10254 -2.1658 +v -5.59176 1.10254 -2.24559 +v -5.6472 1.17684 -2.07498 +v -5.5406 1.17684 -2.02067 +v -5.59176 1.10254 -2.24559 +v -5.76536 1.10254 -2.27309 +v -5.76536 1.17684 -2.0937 +v -5.6472 1.17684 -2.07498 +v -5.76536 1.10254 -2.27309 +v -5.93895 1.10254 -2.24559 +v -5.88352 1.17684 -2.07498 +v -5.76536 1.17684 -2.0937 +v -5.93895 1.10254 -2.24559 +v -6.09556 1.10254 -2.1658 +v -5.99012 1.17684 -2.02067 +v -5.88352 1.17684 -2.07498 +v -6.09556 1.10254 -2.1658 +v -6.21984 1.10254 -2.04152 +v -6.07471 1.17684 -1.93607 +v -5.99012 1.17684 -2.02067 +v -6.21984 1.10254 -2.04152 +v -6.29963 1.10254 -1.88491 +v -6.12902 1.17684 -1.82948 +v -6.07471 1.17684 -1.93607 +v -6.29963 1.10254 -1.88491 +v -6.32713 1.10254 -1.71132 +v -6.14774 1.17684 -1.71132 +v -6.12902 1.17684 -1.82948 +v -6.32713 1.10254 -1.71132 +v -6.29963 1.10254 -1.53772 +v -6.12902 1.17684 -1.59315 +v -6.14774 1.17684 -1.71132 +v -6.29963 1.10254 -1.53772 +v -6.21984 1.10254 -1.38111 +v -6.07471 1.17684 -1.48656 +v -6.12902 1.17684 -1.59315 +v -6.21984 1.10254 -1.38111 +v -6.09556 1.10254 -1.25683 +v -5.99012 1.17684 -1.40196 +v -6.07471 1.17684 -1.48656 +v -6.09556 1.10254 -1.25683 +v -5.93895 1.10254 -1.17704 +v -5.88352 1.17684 -1.34765 +v -5.99012 1.17684 -1.40196 +v -5.93895 1.10254 -1.17704 +v -5.76536 1.10254 -1.14954 +v -5.76536 1.17684 -1.32894 +v -5.88352 1.17684 -1.34765 +v -5.76536 1.10254 -1.14954 +v -5.59176 1.10254 -1.17704 +v -5.6472 1.17684 -1.34765 +v -5.76536 1.17684 -1.32894 +v -5.59176 1.10254 -1.17704 +v -5.43516 1.10254 -1.25683 +v -5.5406 1.17684 -1.40196 +v -5.6472 1.17684 -1.34765 +v -5.43516 1.10254 -1.25683 +v -5.31088 1.10254 -1.38111 +v -5.45601 1.17684 -1.48656 +v -5.5406 1.17684 -1.40196 +v -5.31088 1.10254 -1.38111 +v -5.23108 1.10254 -1.53772 +v -5.40169 1.17684 -1.59315 +v -5.45601 1.17684 -1.48656 +v -5.23108 1.10254 -1.53772 +v -5.20359 1.10254 -1.71132 +v -5.38298 1.17684 -1.71132 +v -5.40169 1.17684 -1.59315 +v -5.20359 1.10254 -1.71132 +v -5.23108 1.10254 -1.88491 +v -5.40169 1.17684 -1.82948 +v -5.38298 1.17684 -1.71132 +v -5.40169 1.17684 -1.82948 +v -5.45601 1.17684 -1.93607 +v -5.60875 1.22217 -1.8251 +v -5.58126 1.22217 -1.77113 +v -5.45601 1.17684 -1.93607 +v -5.5406 1.17684 -2.02067 +v -5.65158 1.22217 -1.86792 +v -5.60875 1.22217 -1.8251 +v -5.5406 1.17684 -2.02067 +v -5.6472 1.17684 -2.07498 +v -5.70554 1.22217 -1.89541 +v -5.65158 1.22217 -1.86792 +v -5.6472 1.17684 -2.07498 +v -5.76536 1.17684 -2.0937 +v -5.76536 1.22217 -1.90489 +v -5.70554 1.22217 -1.89541 +v -5.76536 1.17684 -2.0937 +v -5.88352 1.17684 -2.07498 +v -5.82518 1.22217 -1.89541 +v -5.76536 1.22217 -1.90489 +v -5.88352 1.17684 -2.07498 +v -5.99012 1.17684 -2.02067 +v -5.87914 1.22217 -1.86792 +v -5.82518 1.22217 -1.89541 +v -5.99012 1.17684 -2.02067 +v -6.07471 1.17684 -1.93607 +v -5.92196 1.22217 -1.8251 +v -5.87914 1.22217 -1.86792 +v -6.07471 1.17684 -1.93607 +v -6.12902 1.17684 -1.82948 +v -5.94946 1.22217 -1.77113 +v -5.92196 1.22217 -1.8251 +v -6.12902 1.17684 -1.82948 +v -6.14774 1.17684 -1.71132 +v -5.95893 1.22217 -1.71132 +v -5.94946 1.22217 -1.77113 +v -6.14774 1.17684 -1.71132 +v -6.12902 1.17684 -1.59315 +v -5.94946 1.22217 -1.6515 +v -5.95893 1.22217 -1.71132 +v -6.12902 1.17684 -1.59315 +v -6.07471 1.17684 -1.48656 +v -5.92196 1.22217 -1.59754 +v -5.94946 1.22217 -1.6515 +v -6.07471 1.17684 -1.48656 +v -5.99012 1.17684 -1.40196 +v -5.87914 1.22217 -1.55471 +v -5.92196 1.22217 -1.59754 +v -5.99012 1.17684 -1.40196 +v -5.88352 1.17684 -1.34765 +v -5.82518 1.22217 -1.52722 +v -5.87914 1.22217 -1.55471 +v -5.88352 1.17684 -1.34765 +v -5.76536 1.17684 -1.32894 +v -5.76536 1.22217 -1.51774 +v -5.82518 1.22217 -1.52722 +v -5.76536 1.17684 -1.32894 +v -5.6472 1.17684 -1.34765 +v -5.70554 1.22217 -1.52722 +v -5.76536 1.22217 -1.51774 +v -5.6472 1.17684 -1.34765 +v -5.5406 1.17684 -1.40196 +v -5.65158 1.22217 -1.55471 +v -5.70554 1.22217 -1.52722 +v -5.5406 1.17684 -1.40196 +v -5.45601 1.17684 -1.48656 +v -5.60875 1.22217 -1.59754 +v -5.65158 1.22217 -1.55471 +v -5.45601 1.17684 -1.48656 +v -5.40169 1.17684 -1.59315 +v -5.58126 1.22217 -1.6515 +v -5.60875 1.22217 -1.59754 +v -5.40169 1.17684 -1.59315 +v -5.38298 1.17684 -1.71132 +v -5.57178 1.22217 -1.71132 +v -5.58126 1.22217 -1.6515 +v -5.38298 1.17684 -1.71132 +v -5.40169 1.17684 -1.82948 +v -5.58126 1.22217 -1.77113 +v -5.57178 1.22217 -1.71132 +v -5.60875 -1.22217 -1.8251 +v -5.58126 -1.22217 -1.77113 +v -5.76536 -1.23741 -1.71132 +v -5.65158 -1.22217 -1.86792 +v -5.60875 -1.22217 -1.8251 +v -5.76536 -1.23741 -1.71132 +v -5.70554 -1.22217 -1.89541 +v -5.65158 -1.22217 -1.86792 +v -5.76536 -1.23741 -1.71132 +v -5.76536 -1.22217 -1.90489 +v -5.70554 -1.22217 -1.89541 +v -5.76536 -1.23741 -1.71132 +v -5.82518 -1.22217 -1.89541 +v -5.76536 -1.22217 -1.90489 +v -5.76536 -1.23741 -1.71132 +v -5.87914 -1.22217 -1.86792 +v -5.82518 -1.22217 -1.89541 +v -5.76536 -1.23741 -1.71132 +v -5.92196 -1.22217 -1.8251 +v -5.87914 -1.22217 -1.86792 +v -5.76536 -1.23741 -1.71132 +v -5.94946 -1.22217 -1.77113 +v -5.92196 -1.22217 -1.8251 +v -5.76536 -1.23741 -1.71132 +v -5.95893 -1.22217 -1.71132 +v -5.94946 -1.22217 -1.77113 +v -5.76536 -1.23741 -1.71132 +v -5.94946 -1.22217 -1.6515 +v -5.95893 -1.22217 -1.71132 +v -5.76536 -1.23741 -1.71132 +v -5.92196 -1.22217 -1.59754 +v -5.94946 -1.22217 -1.6515 +v -5.76536 -1.23741 -1.71132 +v -5.87914 -1.22217 -1.55471 +v -5.92196 -1.22217 -1.59754 +v -5.76536 -1.23741 -1.71132 +v -5.82518 -1.22217 -1.52722 +v -5.87914 -1.22217 -1.55471 +v -5.76536 -1.23741 -1.71132 +v -5.76536 -1.22217 -1.51774 +v -5.82518 -1.22217 -1.52722 +v -5.76536 -1.23741 -1.71132 +v -5.70554 -1.22217 -1.52722 +v -5.76536 -1.22217 -1.51774 +v -5.76536 -1.23741 -1.71132 +v -5.65158 -1.22217 -1.55471 +v -5.70554 -1.22217 -1.52722 +v -5.76536 -1.23741 -1.71132 +v -5.60875 -1.22217 -1.59754 +v -5.65158 -1.22217 -1.55471 +v -5.76536 -1.23741 -1.71132 +v -5.58126 -1.22217 -1.6515 +v -5.60875 -1.22217 -1.59754 +v -5.76536 -1.23741 -1.71132 +v -5.57178 -1.22217 -1.71132 +v -5.58126 -1.22217 -1.6515 +v -5.76536 -1.23741 -1.71132 +v -5.58126 -1.22217 -1.77113 +v -5.57178 -1.22217 -1.71132 +v -5.76536 -1.23741 -1.71132 +v -5.58126 1.22217 -1.77113 +v -5.60875 1.22217 -1.8251 +v -5.76536 1.23741 -1.71132 +v -5.60875 1.22217 -1.8251 +v -5.65158 1.22217 -1.86792 +v -5.76536 1.23741 -1.71132 +v -5.65158 1.22217 -1.86792 +v -5.70554 1.22217 -1.89541 +v -5.76536 1.23741 -1.71132 +v -5.70554 1.22217 -1.89541 +v -5.76536 1.22217 -1.90489 +v -5.76536 1.23741 -1.71132 +v -5.76536 1.22217 -1.90489 +v -5.82518 1.22217 -1.89541 +v -5.76536 1.23741 -1.71132 +v -5.82518 1.22217 -1.89541 +v -5.87914 1.22217 -1.86792 +v -5.76536 1.23741 -1.71132 +v -5.87914 1.22217 -1.86792 +v -5.92196 1.22217 -1.8251 +v -5.76536 1.23741 -1.71132 +v -5.92196 1.22217 -1.8251 +v -5.94946 1.22217 -1.77113 +v -5.76536 1.23741 -1.71132 +v -5.94946 1.22217 -1.77113 +v -5.95893 1.22217 -1.71132 +v -5.76536 1.23741 -1.71132 +v -5.95893 1.22217 -1.71132 +v -5.94946 1.22217 -1.6515 +v -5.76536 1.23741 -1.71132 +v -5.94946 1.22217 -1.6515 +v -5.92196 1.22217 -1.59754 +v -5.76536 1.23741 -1.71132 +v -5.92196 1.22217 -1.59754 +v -5.87914 1.22217 -1.55471 +v -5.76536 1.23741 -1.71132 +v -5.87914 1.22217 -1.55471 +v -5.82518 1.22217 -1.52722 +v -5.76536 1.23741 -1.71132 +v -5.82518 1.22217 -1.52722 +v -5.76536 1.22217 -1.51774 +v -5.76536 1.23741 -1.71132 +v -5.76536 1.22217 -1.51774 +v -5.70554 1.22217 -1.52722 +v -5.76536 1.23741 -1.71132 +v -5.70554 1.22217 -1.52722 +v -5.65158 1.22217 -1.55471 +v -5.76536 1.23741 -1.71132 +v -5.65158 1.22217 -1.55471 +v -5.60875 1.22217 -1.59754 +v -5.76536 1.23741 -1.71132 +v -5.60875 1.22217 -1.59754 +v -5.58126 1.22217 -1.6515 +v -5.76536 1.23741 -1.71132 +v -5.58126 1.22217 -1.6515 +v -5.57178 1.22217 -1.71132 +v -5.76536 1.23741 -1.71132 +v -5.57178 1.22217 -1.71132 +v -5.58126 1.22217 -1.77113 +v -5.76536 1.23741 -1.71132 +f 4 1 3 +f 3 1 2 +f 8 5 7 +f 6 7 5 +f 11 12 10 +f 9 10 12 +f 15 16 14 +f 13 14 16 +f 20 17 19 +f 18 19 17 +f 24 21 23 +f 22 23 21 +f 28 25 27 +f 27 25 26 +f 31 32 30 +f 30 32 29 +f 36 33 35 +f 33 34 35 +f 39 40 38 +f 37 38 40 +f 44 41 43 +f 41 42 43 +f 47 48 46 +f 46 48 45 +f 52 49 51 +f 50 51 49 +f 56 53 55 +f 54 55 53 +f 59 60 58 +f 58 60 57 +f 63 64 62 +f 61 62 64 +f 68 65 67 +f 67 65 66 +f 71 72 70 +f 72 69 70 +f 76 73 75 +f 74 75 73 +f 79 80 78 +f 78 80 77 +f 83 84 82 +f 81 82 84 +f 88 85 87 +f 86 87 85 +f 91 92 90 +f 89 90 92 +f 96 93 95 +f 94 95 93 +f 99 100 98 +f 97 98 100 +f 104 101 103 +f 102 103 101 +f 107 108 106 +f 105 106 108 +f 111 112 110 +f 110 112 109 +f 116 113 115 +f 114 115 113 +f 119 120 118 +f 117 118 120 +f 124 121 123 +f 122 123 121 +f 127 128 126 +f 125 126 128 +f 132 129 131 +f 130 131 129 +f 135 136 134 +f 133 134 136 +f 140 137 139 +f 138 139 137 +f 143 144 142 +f 141 142 144 +f 148 145 147 +f 147 145 146 +f 152 149 151 +f 150 151 149 +f 156 153 155 +f 154 155 153 +f 159 160 158 +f 157 158 160 +f 164 161 163 +f 162 163 161 +f 167 168 166 +f 165 166 168 +f 171 172 170 +f 169 170 172 +f 175 176 174 +f 173 174 176 +f 179 180 178 +f 178 180 177 +f 184 181 183 +f 182 183 181 +f 187 188 186 +f 185 186 188 +f 191 192 190 +f 189 190 192 +f 196 193 195 +f 193 194 195 +f 200 197 199 +f 198 199 197 +f 204 201 203 +f 202 203 201 +f 208 205 207 +f 206 207 205 +f 211 212 210 +f 209 210 212 +f 216 213 215 +f 214 215 213 +f 220 217 219 +f 218 219 217 +f 224 221 223 +f 222 223 221 +f 227 228 226 +f 225 226 228 +f 231 232 230 +f 229 230 232 +f 235 236 234 +f 233 234 236 +f 239 240 238 +f 238 240 237 +f 243 244 242 +f 241 242 244 +f 247 248 246 +f 248 245 246 +f 251 252 250 +f 249 250 252 +f 256 253 255 +f 254 255 253 +f 259 260 258 +f 258 260 257 +f 263 264 262 +f 262 264 261 +f 268 265 267 +f 266 267 265 +f 272 269 271 +f 270 271 269 +f 276 273 275 +f 274 275 273 +f 279 280 278 +f 280 277 278 +f 284 281 283 +f 282 283 281 +f 287 288 286 +f 285 286 288 +f 292 289 291 +f 289 290 291 +f 295 296 294 +f 293 294 296 +f 300 297 299 +f 297 298 299 +f 304 301 303 +f 302 303 301 +f 308 305 307 +f 305 306 307 +f 311 312 310 +f 309 310 312 +f 316 313 315 +f 315 313 314 +f 319 320 318 +f 317 318 320 +f 324 321 323 +f 322 323 321 +f 328 325 327 +f 327 325 326 +f 332 329 331 +f 330 331 329 +f 335 336 334 +f 333 334 336 +f 340 337 339 +f 338 339 337 +f 343 344 342 +f 341 342 344 +f 347 348 346 +f 348 345 346 +f 352 349 351 +f 350 351 349 +f 355 356 354 +f 353 354 356 +f 360 357 359 +f 358 359 357 +f 363 364 362 +f 361 362 364 +f 368 365 367 +f 367 365 366 +f 371 372 370 +f 369 370 372 +f 376 373 375 +f 374 375 373 +f 379 380 378 +f 377 378 380 +f 384 381 383 +f 382 383 381 +f 387 388 386 +f 388 385 386 +f 392 389 391 +f 391 389 390 +f 395 396 394 +f 393 394 396 +f 399 400 398 +f 397 398 400 +f 403 404 402 +f 402 404 401 +f 408 405 407 +f 407 405 406 +f 412 409 411 +f 410 411 409 +f 416 413 415 +f 414 415 413 +f 419 420 418 +f 417 418 420 +f 424 421 423 +f 422 423 421 +f 428 425 427 +f 426 427 425 +f 431 432 430 +f 429 430 432 +f 436 433 435 +f 434 435 433 +f 440 437 439 +f 438 439 437 +f 443 444 442 +f 441 442 444 +f 447 448 446 +f 445 446 448 +f 451 452 450 +f 449 450 452 +f 456 453 455 +f 455 453 454 +f 460 457 459 +f 458 459 457 +f 463 464 462 +f 461 462 464 +f 468 465 467 +f 466 467 465 +f 472 469 471 +f 470 471 469 +f 475 476 474 +f 473 474 476 +f 479 480 478 +f 477 478 480 +f 483 484 482 +f 484 481 482 +f 488 485 487 +f 486 487 485 +f 491 492 490 +f 492 489 490 +f 496 493 495 +f 493 494 495 +f 499 500 498 +f 497 498 500 +f 503 504 502 +f 501 502 504 +f 508 505 507 +f 506 507 505 +f 512 509 511 +f 509 510 511 +f 515 516 514 +f 514 516 513 +f 520 517 519 +f 519 517 518 +f 524 521 523 +f 522 523 521 +f 527 528 526 +f 526 528 525 +f 532 529 531 +f 530 531 529 +f 536 533 535 +f 534 535 533 +f 539 540 538 +f 538 540 537 +f 544 541 543 +f 542 543 541 +f 548 545 547 +f 546 547 545 +f 551 552 550 +f 549 550 552 +f 555 556 554 +f 556 553 554 +f 560 557 559 +f 558 559 557 +f 564 561 563 +f 563 561 562 +f 567 568 566 +f 566 568 565 +f 572 569 571 +f 570 571 569 +f 576 573 575 +f 574 575 573 +f 579 580 578 +f 577 578 580 +f 584 581 583 +f 582 583 581 +f 587 588 586 +f 585 586 588 +f 591 592 590 +f 590 592 589 +f 596 593 595 +f 594 595 593 +f 600 597 599 +f 598 599 597 +f 603 604 602 +f 601 602 604 +f 608 605 607 +f 606 607 605 +f 611 612 610 +f 609 610 612 +f 615 616 614 +f 616 613 614 +f 620 617 619 +f 618 619 617 +f 624 621 623 +f 622 623 621 +f 627 628 626 +f 625 626 628 +f 631 632 630 +f 629 630 632 +f 636 633 635 +f 634 635 633 +f 639 640 638 +f 637 638 640 +f 643 644 642 +f 641 642 644 +f 647 648 646 +f 645 646 648 +f 651 652 650 +f 649 650 652 +f 655 656 654 +f 653 654 656 +f 660 657 659 +f 658 659 657 +f 663 664 662 +f 661 662 664 +f 668 665 667 +f 666 667 665 +f 672 669 671 +f 670 671 669 +f 676 673 675 +f 674 675 673 +f 679 680 678 +f 677 678 680 +f 684 681 683 +f 682 683 681 +f 688 685 687 +f 686 687 685 +f 692 689 691 +f 690 691 689 +f 696 693 695 +f 694 695 693 +f 699 700 698 +f 697 698 700 +f 703 704 702 +f 701 702 704 +f 708 705 707 +f 706 707 705 +f 712 709 711 +f 710 711 709 +f 716 713 715 +f 714 715 713 +f 719 720 718 +f 717 718 720 +f 722 723 721 +f 724 721 723 +f 726 727 725 +f 728 725 727 +f 730 731 729 +f 732 729 731 +f 734 735 733 +f 736 733 735 +f 737 738 740 +f 739 740 738 +f 742 743 741 +f 744 741 743 +f 745 746 748 +f 747 748 746 +f 749 750 752 +f 751 752 750 +f 753 754 756 +f 755 756 754 +f 758 759 757 +f 760 757 759 +f 761 762 764 +f 763 764 762 +f 765 766 768 +f 767 768 766 +f 769 770 772 +f 771 772 770 +f 773 774 776 +f 775 776 774 +f 778 779 777 +f 780 777 779 +f 782 783 781 +f 784 781 783 +f 785 786 788 +f 787 788 786 +f 789 790 792 +f 791 792 790 +f 793 794 796 +f 795 796 794 +f 798 799 797 +f 800 797 799 +f 801 802 804 +f 804 802 803 +f 806 807 805 +f 805 807 808 +f 809 810 812 +f 811 812 810 +f 813 814 816 +f 815 816 814 +f 818 819 817 +f 820 817 819 +f 821 822 824 +f 823 824 822 +f 826 827 825 +f 828 825 827 +f 830 831 829 +f 831 832 829 +f 833 834 836 +f 835 836 834 +f 837 838 840 +f 839 840 838 +f 842 843 841 +f 844 841 843 +f 845 846 848 +f 847 848 846 +f 850 851 849 +f 852 849 851 +f 854 855 853 +f 853 855 856 +f 857 858 860 +f 859 860 858 +f 861 862 864 +f 863 864 862 +f 866 867 865 +f 868 865 867 +f 870 871 869 +f 872 869 871 +f 873 874 876 +f 875 876 874 +f 878 879 877 +f 880 877 879 +f 882 883 881 +f 881 883 884 +f 885 886 888 +f 887 888 886 +f 890 891 889 +f 889 891 892 +f 893 894 896 +f 896 894 895 +f 898 899 897 +f 900 897 899 +f 902 903 901 +f 904 901 903 +f 905 906 908 +f 907 908 906 +f 909 910 912 +f 912 910 911 +f 914 915 913 +f 915 916 913 +f 917 918 920 +f 918 919 920 +f 921 922 924 +f 923 924 922 +f 926 927 925 +f 927 928 925 +f 929 930 932 +f 931 932 930 +f 933 934 936 +f 935 936 934 +f 938 939 937 +f 939 940 937 +f 941 942 944 +f 943 944 942 +f 945 946 948 +f 947 948 946 +f 950 951 949 +f 952 949 951 +f 954 955 953 +f 953 955 956 +f 957 958 960 +f 959 960 958 +f 962 963 961 +f 963 964 961 +f 965 966 968 +f 968 966 967 +f 969 970 972 +f 971 972 970 +f 973 974 976 +f 975 976 974 +f 978 979 977 +f 980 977 979 +f 981 982 984 +f 983 984 982 +f 985 986 988 +f 987 988 986 +f 990 991 989 +f 992 989 991 +f 993 994 996 +f 995 996 994 +f 997 998 1000 +f 999 1000 998 +f 1002 1003 1001 +f 1004 1001 1003 +f 1006 1007 1005 +f 1008 1005 1007 +f 1010 1011 1009 +f 1012 1009 1011 +f 1013 1014 1016 +f 1014 1015 1016 +f 1017 1018 1020 +f 1019 1020 1018 +f 1022 1023 1021 +f 1024 1021 1023 +f 1025 1026 1028 +f 1027 1028 1026 +f 1029 1030 1032 +f 1031 1032 1030 +f 1034 1035 1033 +f 1036 1033 1035 +f 1038 1039 1037 +f 1040 1037 1039 +f 1041 1042 1044 +f 1043 1044 1042 +f 1045 1046 1048 +f 1046 1047 1048 +f 1049 1050 1052 +f 1051 1052 1050 +f 1054 1055 1053 +f 1056 1053 1055 +f 1057 1058 1060 +f 1059 1060 1058 +f 1062 1063 1061 +f 1064 1061 1063 +f 1066 1067 1065 +f 1065 1067 1068 +f 1069 1070 1072 +f 1071 1072 1070 +f 1074 1075 1073 +f 1076 1073 1075 +f 1077 1078 1080 +f 1079 1080 1078 +f 1082 1083 1081 +f 1084 1081 1083 +f 1085 1086 1088 +f 1086 1087 1088 +f 1090 1091 1089 +f 1092 1089 1091 +f 1093 1094 1096 +f 1095 1096 1094 +f 1098 1099 1097 +f 1100 1097 1099 +f 1101 1102 1104 +f 1103 1104 1102 +f 1106 1107 1105 +f 1105 1107 1108 +f 1109 1110 1112 +f 1110 1111 1112 +f 1114 1115 1113 +f 1116 1113 1115 +f 1118 1119 1117 +f 1120 1117 1119 +f 1122 1123 1121 +f 1124 1121 1123 +f 1126 1127 1125 +f 1125 1127 1128 +f 1130 1131 1129 +f 1132 1129 1131 +f 1133 1134 1136 +f 1135 1136 1134 +f 1138 1139 1137 +f 1139 1140 1137 +f 1142 1143 1141 +f 1141 1143 1144 +f 1145 1146 1148 +f 1147 1148 1146 +f 1149 1150 1152 +f 1151 1152 1150 +f 1153 1154 1156 +f 1155 1156 1154 +f 1158 1159 1157 +f 1157 1159 1160 +f 1161 1162 1164 +f 1163 1164 1162 +f 1166 1167 1165 +f 1168 1165 1167 +f 1169 1170 1172 +f 1172 1170 1171 +f 1174 1175 1173 +f 1176 1173 1175 +f 1177 1178 1180 +f 1180 1178 1179 +f 1181 1182 1184 +f 1183 1184 1182 +f 1185 1186 1188 +f 1188 1186 1187 +f 1190 1191 1189 +f 1192 1189 1191 +f 1193 1194 1196 +f 1194 1195 1196 +f 1198 1199 1197 +f 1200 1197 1199 +f 1201 1202 1204 +f 1203 1204 1202 +f 1206 1207 1205 +f 1208 1205 1207 +f 1210 1211 1209 +f 1212 1209 1211 +f 1214 1215 1213 +f 1216 1213 1215 +f 1218 1219 1217 +f 1219 1220 1217 +f 1221 1222 1224 +f 1223 1224 1222 +f 1226 1227 1225 +f 1228 1225 1227 +f 1230 1231 1229 +f 1232 1229 1231 +f 1233 1234 1236 +f 1236 1234 1235 +f 1237 1238 1240 +f 1239 1240 1238 +f 1241 1242 1244 +f 1243 1244 1242 +f 1245 1246 1248 +f 1247 1248 1246 +f 1250 1251 1249 +f 1252 1249 1251 +f 1253 1254 1256 +f 1255 1256 1254 +f 1257 1258 1260 +f 1259 1260 1258 +f 1261 1262 1264 +f 1263 1264 1262 +f 1266 1267 1265 +f 1268 1265 1267 +f 1270 1271 1269 +f 1272 1269 1271 +f 1274 1275 1273 +f 1276 1273 1275 +f 1278 1279 1277 +f 1279 1280 1277 +f 1282 1283 1281 +f 1284 1281 1283 +f 1285 1286 1288 +f 1287 1288 1286 +f 1290 1291 1289 +f 1292 1289 1291 +f 1293 1294 1296 +f 1295 1296 1294 +f 1298 1299 1297 +f 1300 1297 1299 +f 1301 1302 1304 +f 1303 1304 1302 +f 1306 1307 1305 +f 1308 1305 1307 +f 1310 1311 1309 +f 1311 1312 1309 +f 1313 1314 1316 +f 1315 1316 1314 +f 1318 1319 1317 +f 1320 1317 1319 +f 1321 1322 1324 +f 1323 1324 1322 +f 1326 1327 1325 +f 1328 1325 1327 +f 1329 1330 1332 +f 1331 1332 1330 +f 1334 1335 1333 +f 1336 1333 1335 +f 1337 1338 1340 +f 1339 1340 1338 +f 1342 1343 1341 +f 1344 1341 1343 +f 1345 1346 1348 +f 1346 1347 1348 +f 1349 1350 1352 +f 1351 1352 1350 +f 1353 1354 1356 +f 1355 1356 1354 +f 1358 1359 1357 +f 1360 1357 1359 +f 1361 1362 1364 +f 1362 1363 1364 +f 1365 1366 1368 +f 1367 1368 1366 +f 1370 1371 1369 +f 1372 1369 1371 +f 1374 1375 1373 +f 1376 1373 1375 +f 1377 1378 1380 +f 1379 1380 1378 +f 1381 1382 1384 +f 1383 1384 1382 +f 1385 1386 1388 +f 1386 1387 1388 +f 1390 1391 1389 +f 1391 1392 1389 +f 1393 1394 1396 +f 1396 1394 1395 +f 1398 1399 1397 +f 1400 1397 1399 +f 1401 1402 1404 +f 1404 1402 1403 +f 1406 1407 1405 +f 1407 1408 1405 +f 1409 1410 1412 +f 1411 1412 1410 +f 1413 1414 1416 +f 1415 1416 1414 +f 1418 1419 1417 +f 1419 1420 1417 +f 1422 1423 1421 +f 1424 1421 1423 +f 1425 1426 1428 +f 1426 1427 1428 +f 1430 1431 1429 +f 1429 1431 1432 +f 1433 1434 1436 +f 1435 1436 1434 +f 1438 1439 1437 +f 1439 1440 1437 +f 1441 1442 1443 +f 1444 1445 1446 +f 1447 1448 1449 +f 1450 1451 1452 +f 1453 1454 1455 +f 1456 1457 1458 +f 1459 1460 1461 +f 1462 1463 1464 +f 1465 1466 1467 +f 1468 1469 1470 +f 1471 1472 1473 +f 1474 1475 1476 +f 1477 1478 1479 +f 1480 1481 1482 +f 1483 1484 1485 +f 1486 1487 1488 +f 1489 1490 1491 +f 1492 1493 1494 +f 1495 1496 1497 +f 1498 1499 1500 +f 1501 1502 1503 +f 1504 1505 1506 +f 1507 1508 1509 +f 1510 1511 1512 +f 1513 1514 1515 +f 1516 1517 1518 +f 1519 1520 1521 +f 1522 1523 1524 +f 1525 1526 1527 +f 1528 1529 1530 +f 1531 1532 1533 +f 1534 1535 1536 +f 1537 1538 1539 +f 1540 1541 1542 +f 1543 1544 1545 +f 1546 1547 1548 +f 1549 1550 1551 +f 1552 1553 1554 +f 1555 1556 1557 +f 1558 1559 1560 diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/values-night/themes.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/values-night/themes.xml new file mode 100644 index 0000000000000000000000000000000000000000..5e4574c5cb119b82412bc650359dffea7d4fe402 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/values-night/themes.xml @@ -0,0 +1,16 @@ +<resources xmlns:tools="http://schemas.android.com/tools"> + <!-- Base application theme. --> + <style name="Theme.Database" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> + <!-- Primary brand color. --> + <item name="colorPrimary">@color/purple_200</item> + <item name="colorPrimaryVariant">@color/purple_700</item> + <item name="colorOnPrimary">@color/black</item> + <!-- Secondary brand color. --> + <item name="colorSecondary">@color/teal_200</item> + <item name="colorSecondaryVariant">@color/teal_200</item> + <item name="colorOnSecondary">@color/black</item> + <!-- Status bar color. --> + <item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item> + <!-- Customize your theme here. --> + </style> +</resources> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/values/colors.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/values/colors.xml new file mode 100644 index 0000000000000000000000000000000000000000..f8c6127d327620c93d2b2d00342a68e97b98a48d --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/values/colors.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <color name="purple_200">#FFBB86FC</color> + <color name="purple_500">#FF6200EE</color> + <color name="purple_700">#FF3700B3</color> + <color name="teal_200">#FF03DAC5</color> + <color name="teal_700">#FF018786</color> + <color name="black">#FF000000</color> + <color name="white">#FFFFFFFF</color> +</resources> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/values/strings.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/values/strings.xml new file mode 100644 index 0000000000000000000000000000000000000000..a47de1dcdb6b7bbeac0d9f5a178187f628b9c26b --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ +<resources> + <string name="app_name">database</string> +</resources> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/values/themes.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/values/themes.xml new file mode 100644 index 0000000000000000000000000000000000000000..3363600677107dfc556fd206f1c1c81e9cd34d08 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/main/res/values/themes.xml @@ -0,0 +1,16 @@ +<resources xmlns:tools="http://schemas.android.com/tools"> + <!-- Base application theme. --> + <style name="Theme.Database" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> + <!-- Primary brand color. --> + <item name="colorPrimary">@color/purple_500</item> + <item name="colorPrimaryVariant">@color/purple_700</item> + <item name="colorOnPrimary">@color/white</item> + <!-- Secondary brand color. --> + <item name="colorSecondary">@color/teal_200</item> + <item name="colorSecondaryVariant">@color/teal_700</item> + <item name="colorOnSecondary">@color/black</item> + <!-- Status bar color. --> + <item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item> + <!-- Customize your theme here. --> + </style> +</resources> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/test/java/com/example/database/ExampleUnitTest.java b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/test/java/com/example/database/ExampleUnitTest.java new file mode 100644 index 0000000000000000000000000000000000000000..f4e9b7582732f110a2183aaa2185102d8ef385d6 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/app/src/test/java/com/example/database/ExampleUnitTest.java @@ -0,0 +1,17 @@ +package com.example.database; + +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/build.gradle b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..dfbc7c14144f78c77042100b30a5b8695b4c8ea4 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/build.gradle @@ -0,0 +1,24 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. +buildscript { + repositories { + google() + jcenter() + } + dependencies { + classpath "com.android.tools.build:gradle:4.1.2" + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + google() + jcenter() + } +} + +task clean(type: Delete) { + delete rootProject.buildDir +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/gradle.properties b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/gradle.properties new file mode 100644 index 0000000000000000000000000000000000000000..52f5917cb0d0c47fd00ba8ee85c14eb27e1c41cc --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/gradle.properties @@ -0,0 +1,19 @@ +# Project-wide Gradle settings. +# IDE (e.g. Android 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. +org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app"s APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true +# Automatically convert third-party libraries to use AndroidX +android.enableJetifier=true \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/gradle/wrapper/gradle-wrapper.jar b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..f6b961fd5a86aa5fbfe90f707c3138408be7c718 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/gradle/wrapper/gradle-wrapper.jar differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/gradle/wrapper/gradle-wrapper.properties b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000000000000000000000000000000000..b9bd1b1e3c9536b85b147e681903b2ce626a0014 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Thu May 20 17:07:27 KST 2021 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/gradlew b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/gradlew new file mode 100755 index 0000000000000000000000000000000000000000..cccdd3d517fc5249beaefa600691cf150f2fa3e6 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/gradlew @@ -0,0 +1,172 @@ +#!/usr/bin/env sh + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/gradlew.bat b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/gradlew.bat new file mode 100644 index 0000000000000000000000000000000000000000..e95643d6a2ca62258464e83c72f5156dc941c609 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/gradlew.bat @@ -0,0 +1,84 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/settings.gradle b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/settings.gradle new file mode 100644 index 0000000000000000000000000000000000000000..bef31f0cf02c01d7f89cf5eb3fdc42bceae93283 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn6/settings.gradle @@ -0,0 +1,2 @@ +include ':app' +rootProject.name = "database" \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/.gitignore b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..aa724b77071afcbd9bb398053e05adaf7ac9405a --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/.gitignore @@ -0,0 +1,15 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild +.cxx +local.properties diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/.idea/.gitignore b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/.idea/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..26d33521af10bcc7fd8cea344038eaaeb78d0ef5 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/.idea/compiler.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/.idea/compiler.xml new file mode 100644 index 0000000000000000000000000000000000000000..61a9130cd9669c3843e6445dfe1fee2d493869bc --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/.idea/compiler.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="CompilerConfiguration"> + <bytecodeTargetLevel target="1.8" /> + </component> +</project> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/.idea/gradle.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/.idea/gradle.xml new file mode 100644 index 0000000000000000000000000000000000000000..23a89bbb6ca829a47211d20c8b11960088ea4950 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/.idea/gradle.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="GradleMigrationSettings" migrationVersion="1" /> + <component name="GradleSettings"> + <option name="linkedExternalProjectsSettings"> + <GradleProjectSettings> + <option name="testRunner" value="PLATFORM" /> + <option name="distributionType" value="DEFAULT_WRAPPED" /> + <option name="externalProjectPath" value="$PROJECT_DIR$" /> + <option name="gradleJvm" value="1.8" /> + <option name="modules"> + <set> + <option value="$PROJECT_DIR$" /> + <option value="$PROJECT_DIR$/app" /> + </set> + </option> + <option name="resolveModulePerSourceSet" value="false" /> + <option name="useQualifiedModuleNames" value="true" /> + </GradleProjectSettings> + </option> + </component> +</project> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/.idea/jarRepositories.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/.idea/jarRepositories.xml new file mode 100644 index 0000000000000000000000000000000000000000..a5f05cd8c87d4a72b0242026524cb32639fca7f0 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/.idea/jarRepositories.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="RemoteRepositoriesConfiguration"> + <remote-repository> + <option name="id" value="central" /> + <option name="name" value="Maven Central repository" /> + <option name="url" value="https://repo1.maven.org/maven2" /> + </remote-repository> + <remote-repository> + <option name="id" value="jboss.community" /> + <option name="name" value="JBoss Community repository" /> + <option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" /> + </remote-repository> + <remote-repository> + <option name="id" value="BintrayJCenter" /> + <option name="name" value="BintrayJCenter" /> + <option name="url" value="https://jcenter.bintray.com/" /> + </remote-repository> + <remote-repository> + <option name="id" value="Google" /> + <option name="name" value="Google" /> + <option name="url" value="https://dl.google.com/dl/android/maven2/" /> + </remote-repository> + </component> +</project> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/.idea/misc.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/.idea/misc.xml new file mode 100644 index 0000000000000000000000000000000000000000..d5d35ec44f10991b508f6454a85204a276726364 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/.idea/misc.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK"> + <output url="file://$PROJECT_DIR$/build/classes" /> + </component> + <component name="ProjectType"> + <option name="id" value="Android" /> + </component> +</project> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/.gitignore b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..42afabfd2abebf31384ca7797186a27a4b7dbee8 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/build.gradle b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..537b7c5be4fc00f163be1d470cf4f44e1140adbd --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/build.gradle @@ -0,0 +1,39 @@ +plugins { + id 'com.android.application' +} + +android { + compileSdkVersion 30 + buildToolsVersion "30.0.3" + + defaultConfig { + applicationId "com.example.lunarlander" + minSdkVersion 26 + targetSdkVersion 30 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} + +dependencies { + + implementation 'androidx.appcompat:appcompat:1.1.0' + implementation 'com.google.android.material:material:1.1.0' + implementation 'androidx.constraintlayout:constraintlayout:1.1.3' + testImplementation 'junit:junit:4.+' + androidTestImplementation 'androidx.test.ext:junit:1.1.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/proguard-rules.pro b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/proguard-rules.pro new file mode 100644 index 0000000000000000000000000000000000000000..481bb434814107eb79d7a30b676d344b0df2f8ce --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/androidTest/java/com/example/lunarlander/ExampleInstrumentedTest.java b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/androidTest/java/com/example/lunarlander/ExampleInstrumentedTest.java new file mode 100644 index 0000000000000000000000000000000000000000..11a6605cd5c6d8057333d42999f0f674ae104057 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/androidTest/java/com/example/lunarlander/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package com.example.lunarlander; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("com.example.lunarlander", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/AndroidManifest.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000000000000000000000000000000000000..0d748a2fdb5df271b16103cd252f7080204888f3 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/AndroidManifest.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="com.example.lunarlander"> + + <application + android:allowBackup="true" + android:icon="@mipmap/ic_launcher" + android:label="@string/app_name" + android:roundIcon="@mipmap/ic_launcher_round" + android:supportsRtl="true" + android:theme="@style/Theme.Lunarlander"> + <activity android:name=".LunarLander"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + </application> + +</manifest> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/java/com/example/lunarlander/LanderAnimator.java b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/java/com/example/lunarlander/LanderAnimator.java new file mode 100644 index 0000000000000000000000000000000000000000..baf698ffb605cb41a1d334fc7edc45da235b6224 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/java/com/example/lunarlander/LanderAnimator.java @@ -0,0 +1,87 @@ +package com.example.lunarlander; + +import android.animation.AnimatorListenerAdapter; +import android.animation.ValueAnimator; +import android.os.AsyncTask; +import android.view.View; +import android.view.animation.AccelerateDecelerateInterpolator; + +public class LanderAnimator extends AsyncTask<Integer,Integer,Integer> { + + private LunarView mLanderView; + private ValueAnimator rocketfire; + private int mX, mY; + + + public LanderAnimator(LunarView lander){ + mLanderView = lander; + } + + protected Integer doInBackground(Integer... integers){ + mX = integers[0]; + mY = integers[1]; + while(true){ + if(!mPaused&&!mFire){ + mX += 5; + mY += 5; + if (mX>=mLanderView.getWidth()) + mX = 0; + publishProgress(mX,mY); + } +// else if(mFire&&!mPaused){ +// mX += 5; +// mY -= (int)(mLanderView.getWidth()/10); +// if (mX>=mLanderView.getWidth()) +// mX = 0; +// publishProgress(mX,mY); +// mFire = !mFire; +// } + try{ + Thread.sleep(100); + } + catch(Exception e){ + + } + } + } + @Override + protected void onProgressUpdate(Integer... values){ + super.onProgressUpdate(values); + + mLanderView.setLanderPos(values[0],values[1]); + mLanderView.invalidate(); + } + + private boolean mPaused = false; + private boolean mFire = false; + public void pauseAnimator(){ + mPaused = (!mPaused); + } + public void LanderFire() { + mFire = (!mFire); + rocketfire = ValueAnimator.ofInt(0, (int)(mLanderView.getHeight() / 10)); + rocketfire.setDuration(10); + rocketfire.setInterpolator(new AccelerateDecelerateInterpolator()); + rocketfire.setRepeatCount(0); + //rocketfire.setRepeatMode(ValueAnimator.RESTART); + rocketfire.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { + @Override + public void onAnimationUpdate(ValueAnimator animation) { + mY -= (int)animation.getAnimatedValue(); + publishProgress(mX, mY); + } + }); + rocketfire.start(); + mX += 5; + //mY -= (int)(mLanderView.getWidth()/10); + if (mX >= mLanderView.getWidth()) + mX = 0; + publishProgress(mX, mY); + mFire = !mFire; +// rocketfire.addListener(new AnimatorListenerAdapter() { +// public void onAnimationEnd(ValueAnimator animation) { +// mFire = !mFire; +// } +// }); + } +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/java/com/example/lunarlander/LunarLander.java b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/java/com/example/lunarlander/LunarLander.java new file mode 100644 index 0000000000000000000000000000000000000000..c365a24f4eb6053d0c5ba44596a49565cb22e99d --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/java/com/example/lunarlander/LunarLander.java @@ -0,0 +1,52 @@ +package com.example.lunarlander; + +import android.app.Activity; +import android.os.Bundle; +import android.util.Log; +import android.view.MotionEvent; +import android.view.View; +import android.widget.Button; + +import androidx.appcompat.app.AppCompatActivity; + + +public class LunarLander extends AppCompatActivity { + private LunarView mLunarView; + private LanderAnimator animator; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.lunar_layout); + mLunarView = (LunarView) findViewById(R.id.lunar); + + // Write here code to start LanderAnimator. + animator = new LanderAnimator(mLunarView); + animator.execute(mLunarView.getLanderX(),mLunarView.getLanderY()); + + + } + @Override + protected void onPause() { + super.onPause(); + } + + + public void onTouch(View view) { + // Implement this callback method. + // If the lander is moving, it should stop. + // If the lander is not moving, it starts to go. + + animator.pauseAnimator(); + } + + public void onfire(View view){ + animator.LanderFire(); + } + + @Override + protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); + } + +} diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/java/com/example/lunarlander/LunarView.java b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/java/com/example/lunarlander/LunarView.java new file mode 100644 index 0000000000000000000000000000000000000000..c9409e67ae9c147f70c0dccc140a4fea0b047dfd --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/java/com/example/lunarlander/LunarView.java @@ -0,0 +1,66 @@ + +package com.example.lunarlander; + +import android.content.Context; +import android.content.res.Resources; +import android.graphics.Bitmap; +import android.graphics.BitmapFactory; +import android.graphics.Canvas; +import android.graphics.drawable.Drawable; +import android.os.Bundle; +import android.os.Handler; +import android.os.Message; +import android.util.AttributeSet; +import android.util.Log; +import android.view.SurfaceHolder; +import android.view.SurfaceView; +import android.view.View; +import android.widget.Button; + +class LunarView extends View { + private int x=0; + private int y=0; + private int mCanvasHeight = 1; + private int mCanvasWidth = 1; + private Bitmap mBackgroundImage; + private Drawable mLanderImage; + + public LunarView(Context context) { + super(context); + init(context); + } + + public LunarView(Context context, AttributeSet attrs) { + super(context, attrs); + init(context); + } + + private void init(Context context) { + Resources res = context.getResources(); + mLanderImage = context.getResources().getDrawable( + R.drawable.lander_plain); + + mBackgroundImage = BitmapFactory.decodeResource(res, + R.drawable.earthrise); + } + + protected void onDraw(Canvas canvas) { + mCanvasWidth = getWidth(); + mCanvasHeight = getHeight(); + if (mBackgroundImage.getWidth() != mCanvasWidth || mBackgroundImage.getHeight() != mCanvasHeight) + mBackgroundImage = mBackgroundImage.createScaledBitmap( + mBackgroundImage, mCanvasWidth, mCanvasHeight, true); + Log.d("TAG", "width " + x + " height "+y); + canvas.drawBitmap(mBackgroundImage, 0, 0, null); + mLanderImage.setBounds(x, y, x + 100, y + 100); + if( x > mCanvasWidth ) x = 0; + if( y > mCanvasHeight ) y = 0; + mLanderImage.draw(canvas); + + } + + public int getLanderX() { return x; } + public int getLanderY() { return y; } + public void setLanderPos(int lx, int ly) { x = lx; y = ly;} + +} diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000000000000000000000000000000000000..2b068d11462a4b96669193de13a711a3a36220a0 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:aapt="http://schemas.android.com/aapt" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z"> + <aapt:attr name="android:fillColor"> + <gradient + android:endX="85.84757" + android:endY="92.4963" + android:startX="42.9492" + android:startY="49.59793" + android:type="linear"> + <item + android:color="#44000000" + android:offset="0.0" /> + <item + android:color="#00000000" + android:offset="1.0" /> + </gradient> + </aapt:attr> + </path> + <path + android:fillColor="#FFFFFF" + android:fillType="nonZero" + android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z" + android:strokeWidth="1" + android:strokeColor="#00000000" /> +</vector> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/drawable/earthrise.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/drawable/earthrise.png new file mode 100644 index 0000000000000000000000000000000000000000..a13836c5563796c8fe81f9c6504ac6d532c2a704 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/drawable/earthrise.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/drawable/ic_launcher_background.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000000000000000000000000000000000000..07d5da9cbf141911847041df5d7b87f0dd5ef9d4 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <path + android:fillColor="#3DDC84" + android:pathData="M0,0h108v108h-108z" /> + <path + android:fillColor="#00000000" + android:pathData="M9,0L9,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,0L19,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M29,0L29,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M39,0L39,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M49,0L49,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M59,0L59,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M69,0L69,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M79,0L79,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M89,0L89,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M99,0L99,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,9L108,9" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,19L108,19" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,29L108,29" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,39L108,39" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,49L108,49" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,59L108,59" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,69L108,69" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,79L108,79" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,89L108,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,99L108,99" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,29L89,29" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,39L89,39" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,49L89,49" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,59L89,59" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,69L89,69" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,79L89,79" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M29,19L29,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M39,19L39,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M49,19L49,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M59,19L59,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M69,19L69,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M79,19L79,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> +</vector> diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/drawable/lander_firing.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/drawable/lander_firing.png new file mode 100644 index 0000000000000000000000000000000000000000..91378dedd5ecc69803b29c233014e7665ee88584 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/drawable/lander_firing.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/drawable/lander_plain.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/drawable/lander_plain.png new file mode 100644 index 0000000000000000000000000000000000000000..da448e4bcd1a805fb0bbdcf47b6ec0ac7ccc44c9 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/drawable/lander_plain.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/layout/lunar_layout.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/layout/lunar_layout.xml new file mode 100644 index 0000000000000000000000000000000000000000..28f435658bb128535cdce2754be8c3568a753f53 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/layout/lunar_layout.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:onClick="onfire" + tools:context=".LunarLander"> + + <com.example.lunarlander.LunarView + android:id="@+id/lunar" + android:layout_width="406dp" + android:layout_height="557dp" + android:onClick="onTouch" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.4" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.0" + tools:ignore="missingConstraints" /> + + <Button + android:id="@+id/button" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:onClick="onfire" + android:text="RocketFire" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/lunar" /> + +</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000000000000000000000000000000000000..eca70cfe52eac1ba66ba280a68ca7be8fcf88a16 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@drawable/ic_launcher_background" /> + <foreground android:drawable="@drawable/ic_launcher_foreground" /> +</adaptive-icon> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000000000000000000000000000000000000..eca70cfe52eac1ba66ba280a68ca7be8fcf88a16 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@drawable/ic_launcher_background" /> + <foreground android:drawable="@drawable/ic_launcher_foreground" /> +</adaptive-icon> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-hdpi/ic_launcher.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..a571e60098c92c2baca8a5df62f2929cbff01b52 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..61da551c5594a1f9d26193983d2cd69189014603 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-mdpi/ic_launcher.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..c41dd28531901b2c23927768c84bb6765ebcc1db Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..db5080a752731b34d38d7c634732b2cd999125d0 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..6dba46dab19242bf475ddf2e0a10042de6a0be16 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..da31a871c8dc461a1ea114510bfac640307b0a90 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..15ac681720f3df43c647bf0c081f0314ee34eae1 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..b216f2d313cc673d8b8c4da591c174ebed52795c Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..f25a419744727fb48b4b4137b6c6a3a8f2620d51 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..e96783ccce844001359f968f5cd9d85b341bd3fb Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/values-night/themes.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/values-night/themes.xml new file mode 100644 index 0000000000000000000000000000000000000000..97309853406fa1cd359523b56aadf3a11a747190 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/values-night/themes.xml @@ -0,0 +1,16 @@ +<resources xmlns:tools="http://schemas.android.com/tools"> + <!-- Base application theme. --> + <style name="Theme.Lunarlander" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> + <!-- Primary brand color. --> + <item name="colorPrimary">@color/purple_200</item> + <item name="colorPrimaryVariant">@color/purple_700</item> + <item name="colorOnPrimary">@color/black</item> + <!-- Secondary brand color. --> + <item name="colorSecondary">@color/teal_200</item> + <item name="colorSecondaryVariant">@color/teal_200</item> + <item name="colorOnSecondary">@color/black</item> + <!-- Status bar color. --> + <item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item> + <!-- Customize your theme here. --> + </style> +</resources> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/values/colors.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/values/colors.xml new file mode 100644 index 0000000000000000000000000000000000000000..f8c6127d327620c93d2b2d00342a68e97b98a48d --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/values/colors.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <color name="purple_200">#FFBB86FC</color> + <color name="purple_500">#FF6200EE</color> + <color name="purple_700">#FF3700B3</color> + <color name="teal_200">#FF03DAC5</color> + <color name="teal_700">#FF018786</color> + <color name="black">#FF000000</color> + <color name="white">#FFFFFFFF</color> +</resources> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/values/strings.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/values/strings.xml new file mode 100644 index 0000000000000000000000000000000000000000..3ddb45ef9ac43d58bb51dd17828b1bab2db413aa --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ +<resources> + <string name="app_name">lunarlander</string> +</resources> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/values/themes.xml b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/values/themes.xml new file mode 100644 index 0000000000000000000000000000000000000000..a5360984069ca4b47891777e02621c8a89534cd1 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/main/res/values/themes.xml @@ -0,0 +1,16 @@ +<resources xmlns:tools="http://schemas.android.com/tools"> + <!-- Base application theme. --> + <style name="Theme.Lunarlander" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> + <!-- Primary brand color. --> + <item name="colorPrimary">@color/purple_500</item> + <item name="colorPrimaryVariant">@color/purple_700</item> + <item name="colorOnPrimary">@color/white</item> + <!-- Secondary brand color. --> + <item name="colorSecondary">@color/teal_200</item> + <item name="colorSecondaryVariant">@color/teal_700</item> + <item name="colorOnSecondary">@color/black</item> + <!-- Status bar color. --> + <item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item> + <!-- Customize your theme here. --> + </style> +</resources> \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/test/java/com/example/lunarlander/ExampleUnitTest.java b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/test/java/com/example/lunarlander/ExampleUnitTest.java new file mode 100644 index 0000000000000000000000000000000000000000..5ab7b071077772f42f23781635aac511d294913d --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/app/src/test/java/com/example/lunarlander/ExampleUnitTest.java @@ -0,0 +1,17 @@ +package com.example.lunarlander; + +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/build.gradle b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..dfbc7c14144f78c77042100b30a5b8695b4c8ea4 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/build.gradle @@ -0,0 +1,24 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. +buildscript { + repositories { + google() + jcenter() + } + dependencies { + classpath "com.android.tools.build:gradle:4.1.2" + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + google() + jcenter() + } +} + +task clean(type: Delete) { + delete rootProject.buildDir +} \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/gradle.properties b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/gradle.properties new file mode 100644 index 0000000000000000000000000000000000000000..52f5917cb0d0c47fd00ba8ee85c14eb27e1c41cc --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/gradle.properties @@ -0,0 +1,19 @@ +# Project-wide Gradle settings. +# IDE (e.g. Android 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. +org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app"s APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true +# Automatically convert third-party libraries to use AndroidX +android.enableJetifier=true \ No newline at end of file diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/gradle/wrapper/gradle-wrapper.jar b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..f6b961fd5a86aa5fbfe90f707c3138408be7c718 Binary files /dev/null and b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/gradle/wrapper/gradle-wrapper.jar differ diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/gradle/wrapper/gradle-wrapper.properties b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000000000000000000000000000000000..2d21386f894d470fe857fa26d31cc19842e14d86 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Thu May 13 17:10:30 KST 2021 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/gradlew b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/gradlew new file mode 100755 index 0000000000000000000000000000000000000000..cccdd3d517fc5249beaefa600691cf150f2fa3e6 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/gradlew @@ -0,0 +1,172 @@ +#!/usr/bin/env sh + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/gradlew.bat b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/gradlew.bat new file mode 100644 index 0000000000000000000000000000000000000000..e95643d6a2ca62258464e83c72f5156dc941c609 --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/gradlew.bat @@ -0,0 +1,84 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/settings.gradle b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/settings.gradle new file mode 100644 index 0000000000000000000000000000000000000000..d47f2356592663d760e14e0a18c343200d3a654c --- /dev/null +++ b/3-1/Mobile_Programming/MP_201721083_KTS_Assignmetn7/settings.gradle @@ -0,0 +1,2 @@ +include ':app' +rootProject.name = "lunarlander" \ No newline at end of file