diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..603b140 --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +*.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 diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..681f41a --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,116 @@ + + + + + + + +
+ + + + xmlns:android + + ^$ + + + +
+
+ + + + xmlns:.* + + ^$ + + + BY_NAME + +
+
+ + + + .*:id + + http://schemas.android.com/apk/res/android + + + +
+
+ + + + .*:name + + http://schemas.android.com/apk/res/android + + + +
+
+ + + + name + + ^$ + + + +
+
+ + + + style + + ^$ + + + +
+
+ + + + .* + + ^$ + + + BY_NAME + +
+
+ + + + .* + + http://schemas.android.com/apk/res/android + + + ANDROID_ATTRIBUTE_ORDER + +
+
+ + + + .* + + .* + + + BY_NAME + +
+
+
+
+
+
\ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..fb7f4a8 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml new file mode 100644 index 0000000..35ffc65 --- /dev/null +++ b/.idea/gradle.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 0000000..35ffc9d --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..4730a08 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle new file mode 100644 index 0000000..c396031 --- /dev/null +++ b/app/build.gradle @@ -0,0 +1,44 @@ +apply plugin: 'com.android.application' + +android { + compileSdkVersion 30 + buildToolsVersion "30.0.2" + + defaultConfig { + applicationId "com.rhinemann.project" + minSdkVersion 19 + targetSdkVersion 30 + versionCode 1 + versionName "1.0" + + multiDexEnabled true + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + buildFeatures { + viewBinding true + } +} + +dependencies { + implementation fileTree(dir: "libs", include: ["*.jar"]) + implementation 'androidx.appcompat:appcompat:1.2.0' + implementation 'androidx.constraintlayout:constraintlayout:1.1.3' + implementation 'com.jjoe64:graphview:4.2.2' + implementation 'com.google.android.material:material:1.2.1' + testImplementation 'junit:junit:4.12' + androidTestImplementation 'androidx.test.ext:junit:1.1.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' + def multidex_version = "2.0.1" + implementation "androidx.multidex:multidex:$multidex_version" + + implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0' + +} \ No newline at end of file diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/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/app/release/app-release.aab b/app/release/app-release.aab new file mode 100644 index 0000000..fc135f3 Binary files /dev/null and b/app/release/app-release.aab differ diff --git a/app/release/app-release.apk b/app/release/app-release.apk new file mode 100644 index 0000000..ef1cffc Binary files /dev/null and b/app/release/app-release.apk differ diff --git a/app/release/output-metadata.json b/app/release/output-metadata.json new file mode 100644 index 0000000..862eb69 --- /dev/null +++ b/app/release/output-metadata.json @@ -0,0 +1,20 @@ +{ + "version": 1, + "artifactType": { + "type": "APK", + "kind": "Directory" + }, + "applicationId": "com.rhinemann.project", + "variantName": "release", + "elements": [ + { + "type": "SINGLE", + "filters": [], + "properties": [], + "versionCode": 1, + "versionName": "1.0", + "enabled": true, + "outputFile": "app-release.apk" + } + ] +} \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..c21aa3c --- /dev/null +++ b/app/src/main/AndroidManifest.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/ic_launcher-playstore.png b/app/src/main/ic_launcher-playstore.png new file mode 100644 index 0000000..30e22b0 Binary files /dev/null and b/app/src/main/ic_launcher-playstore.png differ diff --git a/app/src/main/java/com/rhinemann/project/About.java b/app/src/main/java/com/rhinemann/project/About.java new file mode 100644 index 0000000..1f44bae --- /dev/null +++ b/app/src/main/java/com/rhinemann/project/About.java @@ -0,0 +1,14 @@ +package com.rhinemann.project; + +import androidx.appcompat.app.AppCompatActivity; + +import android.os.Bundle; + +public class About extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_about); + } +} \ No newline at end of file diff --git a/app/src/main/java/com/rhinemann/project/Calculator.java b/app/src/main/java/com/rhinemann/project/Calculator.java new file mode 100644 index 0000000..57ac47b --- /dev/null +++ b/app/src/main/java/com/rhinemann/project/Calculator.java @@ -0,0 +1,522 @@ +package com.rhinemann.project; + +import android.content.Intent; +import android.graphics.Color; +import android.os.Bundle; +import android.view.View; +import android.widget.Button; +import android.widget.CheckBox; +import android.widget.CompoundButton; +import android.widget.RadioGroup; +import android.widget.TextView; + +import androidx.appcompat.app.AppCompatActivity; + +public class Calculator extends AppCompatActivity { + + RadioGroup UALan; + RadioGroup UALit; + RadioGroup FLit; + RadioGroup FLan; + RadioGroup UAHist; + RadioGroup FHist; + RadioGroup AnFLan; + RadioGroup Math; + RadioGroup Alg; + RadioGroup Geom; + RadioGroup PhysAstr; + RadioGroup BioEco; + RadioGroup Chem; + RadioGroup Geo; + RadioGroup PE; + RadioGroup Milit; + RadioGroup SocEd; + RadioGroup Law; + RadioGroup Econ; + RadioGroup IT; + RadioGroup Tech; + RadioGroup Art; + + CheckBox checkBox_IT; + CheckBox checkBox_Tech; + CheckBox checkBox_Art; + + TextView HoursTaken; + + Float Hours_Count; + + Float UALan_Hours = 2f; + Float UALit_Hours = 2f; + Float FLit_Hours = 1f; + Float FLan_Hours = 2f; + Float UAHist_Hours = 1.5f; + Float FHist_Hours = 1f; + Float AnFLan_Hours = 0f; + Float Math_Hours = 3f; + Float Alg_Hours = 0f; + Float Geom_Hours = 0f; + Float PhysAstr_Hours = 3f; + Float BioEco_Hours = 2f; + Float Chem_Hours = 1.5f; + Float Geo_Hours = 1.5f; + Float PE_Hours = 2f; + Float Milit_Hours = 1.5f; + Float SocEd_Hours = 2f; + Float Law_Hours = 0f; + Float Econ_Hours = 0f; + Float IT_Hours = 0f; + Float Tech_Hours = 0f; + Float Art_Hours = 0f; + + Button Home; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_calculator); + + UALan= findViewById(R.id.UALan); + UALit= findViewById(R.id.UALit); + FLit= findViewById(R.id.FLit); + FLan= findViewById(R.id.FLan); + UAHist= findViewById(R.id.UAHist); + FHist= findViewById(R.id.FHist); + AnFLan= findViewById(R.id.AnFLan); + Math= findViewById(R.id.Math); + Alg= findViewById(R.id.Alg); + Geom= findViewById(R.id.Geom); + PhysAstr= findViewById(R.id.PhysAstr); + BioEco= findViewById(R.id.BioEco); + Chem= findViewById(R.id.Chem); + Geo= findViewById(R.id.Geo); + PE= findViewById(R.id.PE); + Milit= findViewById(R.id.Milit); + SocEd= findViewById(R.id.SocEd); + Law= findViewById(R.id.Law); + Econ= findViewById(R.id.Econ); + IT= findViewById(R.id.IT); + Tech= findViewById(R.id.Tech); + Art= findViewById(R.id.Art); + + HoursTaken = findViewById(R.id.Hours); + + Home = findViewById(R.id.home); + + Home.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent intent = new Intent(Calculator.this, HomeScreen.class); + startActivity(intent); + } + }); + + checkBox_IT = findViewById(R.id.checkBox_IT); + checkBox_Tech = findViewById(R.id.checkBox_Tech); + checkBox_Art = findViewById(R.id.checkBox_Art); + + Hours_Count = Final(UALan_Hours, UALit_Hours, FLit_Hours, FLan_Hours, UAHist_Hours, FHist_Hours, AnFLan_Hours, Math_Hours, Alg_Hours, Geom_Hours, PhysAstr_Hours, BioEco_Hours, Chem_Hours, Geo_Hours, Milit_Hours, SocEd_Hours, Law_Hours, Econ_Hours, IT_Hours, Tech_Hours, Art_Hours, PE_Hours); + + IT.clearCheck(); + Tech.clearCheck(); + Art.clearCheck(); + + UALan.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(RadioGroup radioGroup, int checkedId) { + switch (checkedId) { + case R.id.UALanSt: + UALan_Hours = 2f; + break; + case R.id.UALanPro: + UALan_Hours = 4f; + break; + } + Hours_Count = Final(UALan_Hours, UALit_Hours, FLit_Hours, FLan_Hours, UAHist_Hours, FHist_Hours, AnFLan_Hours, Math_Hours, Alg_Hours, Geom_Hours, PhysAstr_Hours, BioEco_Hours, Chem_Hours, Geo_Hours, Milit_Hours, SocEd_Hours, Law_Hours, Econ_Hours, IT_Hours, Tech_Hours, Art_Hours, PE_Hours); + } + }); + + UALit.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(RadioGroup radioGroup, int checkedId) { + switch (checkedId){ + case R.id.UALitSt: + UALit_Hours=2f; + break; + case R.id.UALitPro: + UALit_Hours=4f; + break; + } + Hours_Count = Final(UALan_Hours, UALit_Hours, FLit_Hours, FLan_Hours, UAHist_Hours, FHist_Hours, AnFLan_Hours, Math_Hours, Alg_Hours, Geom_Hours, PhysAstr_Hours, BioEco_Hours, Chem_Hours, Geo_Hours, Milit_Hours, SocEd_Hours, Law_Hours, Econ_Hours, IT_Hours, Tech_Hours, Art_Hours, PE_Hours); + } + }); + + FLit.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(RadioGroup radioGroup, int checkedId) { + switch (checkedId){ + case R.id.FLitSt: + FLit_Hours=1f; + break; + case R.id.FLitPro: + FLit_Hours=3f; + break; + } + Hours_Count = Final(UALan_Hours, UALit_Hours, FLit_Hours, FLan_Hours, UAHist_Hours, FHist_Hours, AnFLan_Hours, Math_Hours, Alg_Hours, Geom_Hours, PhysAstr_Hours, BioEco_Hours, Chem_Hours, Geo_Hours, Milit_Hours, SocEd_Hours, Law_Hours, Econ_Hours, IT_Hours, Tech_Hours, Art_Hours, PE_Hours); + } + }); + + FLan.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(RadioGroup radioGroup, int checkedId) { + switch (checkedId){ + case R.id.FLanSt: + FLan_Hours=2f; + break; + case R.id.FLanPro: + FLan_Hours= 5f; + break; + } + Hours_Count = Final(UALan_Hours, UALit_Hours, FLit_Hours, FLan_Hours, UAHist_Hours, FHist_Hours, AnFLan_Hours, Math_Hours, Alg_Hours, Geom_Hours, PhysAstr_Hours, BioEco_Hours, Chem_Hours, Geo_Hours, Milit_Hours, SocEd_Hours, Law_Hours, Econ_Hours, IT_Hours, Tech_Hours, Art_Hours, PE_Hours); + } + }); + + UAHist.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(RadioGroup radioGroup, int checkedId) { + switch (checkedId){ + case R.id.UAHistSt: + UAHist_Hours=1.5f; + break; + case R.id.UAHistPro: + UAHist_Hours= 3f; + break; + } + Hours_Count = Final(UALan_Hours, UALit_Hours, FLit_Hours, FLan_Hours, UAHist_Hours, FHist_Hours, AnFLan_Hours, Math_Hours, Alg_Hours, Geom_Hours, PhysAstr_Hours, BioEco_Hours, Chem_Hours, Geo_Hours, Milit_Hours, SocEd_Hours, Law_Hours, Econ_Hours, IT_Hours, Tech_Hours, Art_Hours, PE_Hours); + } + }); + + FHist.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(RadioGroup radioGroup, int checkedId) { + switch (checkedId){ + case R.id.FHistSt: + FHist_Hours=1f; + break; + case R.id.FHistPro: + FHist_Hours=3f; + break; + } + Hours_Count = Final(UALan_Hours, UALit_Hours, FLit_Hours, FLan_Hours, UAHist_Hours, FHist_Hours, AnFLan_Hours, Math_Hours, Alg_Hours, Geom_Hours, PhysAstr_Hours, BioEco_Hours, Chem_Hours, Geo_Hours, Milit_Hours, SocEd_Hours, Law_Hours, Econ_Hours, IT_Hours, Tech_Hours, Art_Hours, PE_Hours); + } + }); + + AnFLan.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(RadioGroup radioGroup, int checkedId) { + switch (checkedId){ + case R.id.AnFLanSt: + AnFLan_Hours=0f; + break; + case R.id.AnFLanPro: + AnFLan_Hours=3f; + break; + } + Hours_Count = Final(UALan_Hours, UALit_Hours, FLit_Hours, FLan_Hours, UAHist_Hours, FHist_Hours, AnFLan_Hours, Math_Hours, Alg_Hours, Geom_Hours, PhysAstr_Hours, BioEco_Hours, Chem_Hours, Geo_Hours, Milit_Hours, SocEd_Hours, Law_Hours, Econ_Hours, IT_Hours, Tech_Hours, Art_Hours, PE_Hours); + } + }); + + Math.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(RadioGroup radioGroup, int checkedId) { + switch (checkedId){ + case R.id.MathSt: + Math_Hours=3f; + break; + case R.id.MathPro: + Math_Hours=0f; + break; + } + Hours_Count = Final(UALan_Hours, UALit_Hours, FLit_Hours, FLan_Hours, UAHist_Hours, FHist_Hours, AnFLan_Hours, Math_Hours, Alg_Hours, Geom_Hours, PhysAstr_Hours, BioEco_Hours, Chem_Hours, Geo_Hours, Milit_Hours, SocEd_Hours, Law_Hours, Econ_Hours, IT_Hours, Tech_Hours, Art_Hours, PE_Hours); + } + }); + + Alg.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(RadioGroup radioGroup, int checkedId) { + switch (checkedId){ + case R.id.AlgSt: + Alg_Hours=0f; + break; + case R.id.AlgPro: + Alg_Hours=6f; + break; + } + Hours_Count = Final(UALan_Hours, UALit_Hours, FLit_Hours, FLan_Hours, UAHist_Hours, FHist_Hours, AnFLan_Hours, Math_Hours, Alg_Hours, Geom_Hours, PhysAstr_Hours, BioEco_Hours, Chem_Hours, Geo_Hours, Milit_Hours, SocEd_Hours, Law_Hours, Econ_Hours, IT_Hours, Tech_Hours, Art_Hours, PE_Hours); + } + }); + + Geom.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(RadioGroup radioGroup, int checkedId) { + switch (checkedId){ + case R.id.GeomSt: + Geom_Hours=0f; + break; + case R.id.GeomPro: + Geom_Hours=3f; + break; + } + Hours_Count = Final(UALan_Hours, UALit_Hours, FLit_Hours, FLan_Hours, UAHist_Hours, FHist_Hours, AnFLan_Hours, Math_Hours, Alg_Hours, Geom_Hours, PhysAstr_Hours, BioEco_Hours, Chem_Hours, Geo_Hours, Milit_Hours, SocEd_Hours, Law_Hours, Econ_Hours, IT_Hours, Tech_Hours, Art_Hours, PE_Hours); + } + }); + + PhysAstr.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(RadioGroup radioGroup, int checkedId) { + switch (checkedId){ + case R.id.PhysAstrSt: + PhysAstr_Hours=3f; + break; + case R.id.PhysAstrPro: + PhysAstr_Hours=6f; + break; + } + Hours_Count = Final(UALan_Hours, UALit_Hours, FLit_Hours, FLan_Hours, UAHist_Hours, FHist_Hours, AnFLan_Hours, Math_Hours, Alg_Hours, Geom_Hours, PhysAstr_Hours, BioEco_Hours, Chem_Hours, Geo_Hours, Milit_Hours, SocEd_Hours, Law_Hours, Econ_Hours, IT_Hours, Tech_Hours, Art_Hours, PE_Hours); + } + }); + + BioEco.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(RadioGroup radioGroup, int checkedId) { + switch (checkedId){ + case R.id.BioEcoSt: + BioEco_Hours=2f; + break; + case R.id.BioEcoPro: + BioEco_Hours=5f; + break; + } + Hours_Count = Final(UALan_Hours, UALit_Hours, FLit_Hours, FLan_Hours, UAHist_Hours, FHist_Hours, AnFLan_Hours, Math_Hours, Alg_Hours, Geom_Hours, PhysAstr_Hours, BioEco_Hours, Chem_Hours, Geo_Hours, Milit_Hours, SocEd_Hours, Law_Hours, Econ_Hours, IT_Hours, Tech_Hours, Art_Hours, PE_Hours); + } + }); + + Chem.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(RadioGroup radioGroup, int checkedId) { + switch (checkedId){ + case R.id.ChemSt: + Chem_Hours=1.5f; + break; + case R.id.ChemPro: + Chem_Hours=4f; + break; + } + Hours_Count = Final(UALan_Hours, UALit_Hours, FLit_Hours, FLan_Hours, UAHist_Hours, FHist_Hours, AnFLan_Hours, Math_Hours, Alg_Hours, Geom_Hours, PhysAstr_Hours, BioEco_Hours, Chem_Hours, Geo_Hours, Milit_Hours, SocEd_Hours, Law_Hours, Econ_Hours, IT_Hours, Tech_Hours, Art_Hours, PE_Hours); + } + }); + + Geo.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(RadioGroup radioGroup, int checkedId) { + switch (checkedId){ + case R.id.GeoSt: + Geo_Hours=1.5f; + break; + case R.id.GeoPro: + Geo_Hours=5f; + break; + } + Hours_Count = Final(UALan_Hours, UALit_Hours, FLit_Hours, FLan_Hours, UAHist_Hours, FHist_Hours, AnFLan_Hours, Math_Hours, Alg_Hours, Geom_Hours, PhysAstr_Hours, BioEco_Hours, Chem_Hours, Geo_Hours, Milit_Hours, SocEd_Hours, Law_Hours, Econ_Hours, IT_Hours, Tech_Hours, Art_Hours, PE_Hours); + } + }); + + PE.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(RadioGroup radioGroup, int checkedId) { + switch (checkedId){ + case R.id.PESt: + PE_Hours=2f; + break; + case R.id.PEPro: + PE_Hours=6f; + break; + } + Hours_Count = Final(UALan_Hours, UALit_Hours, FLit_Hours, FLan_Hours, UAHist_Hours, FHist_Hours, AnFLan_Hours, Math_Hours, Alg_Hours, Geom_Hours, PhysAstr_Hours, BioEco_Hours, Chem_Hours, Geo_Hours, Milit_Hours, SocEd_Hours, Law_Hours, Econ_Hours, IT_Hours, Tech_Hours, Art_Hours, PE_Hours); + } + }); + + Milit.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(RadioGroup radioGroup, int checkedId) { + switch (checkedId){ + case R.id.MilitSt: + Milit_Hours=1.5f; + break; + case R.id.MilitPro: + Milit_Hours=5f; + break; + } + Hours_Count = Final(UALan_Hours, UALit_Hours, FLit_Hours, FLan_Hours, UAHist_Hours, FHist_Hours, AnFLan_Hours, Math_Hours, Alg_Hours, Geom_Hours, PhysAstr_Hours, BioEco_Hours, Chem_Hours, Geo_Hours, Milit_Hours, SocEd_Hours, Law_Hours, Econ_Hours, IT_Hours, Tech_Hours, Art_Hours, PE_Hours); + } + }); + + SocEd.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(RadioGroup radioGroup, int checkedId) { + switch (checkedId){ + case R.id.SocEdSt: + SocEd_Hours=2f; + break; + case R.id.SocEdPro: + SocEd_Hours=0f; + break; + } + Hours_Count = Final(UALan_Hours, UALit_Hours, FLit_Hours, FLan_Hours, UAHist_Hours, FHist_Hours, AnFLan_Hours, Math_Hours, Alg_Hours, Geom_Hours, PhysAstr_Hours, BioEco_Hours, Chem_Hours, Geo_Hours, Milit_Hours, SocEd_Hours, Law_Hours, Econ_Hours, IT_Hours, Tech_Hours, Art_Hours, PE_Hours); + } + }); + + Law.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(RadioGroup radioGroup, int checkedId) { + switch (checkedId){ + case R.id.LawSt: + Law_Hours=0f; + break; + case R.id.LawPro: + Law_Hours=3f; + break; + } + Hours_Count = Final(UALan_Hours, UALit_Hours, FLit_Hours, FLan_Hours, UAHist_Hours, FHist_Hours, AnFLan_Hours, Math_Hours, Alg_Hours, Geom_Hours, PhysAstr_Hours, BioEco_Hours, Chem_Hours, Geo_Hours, Milit_Hours, SocEd_Hours, Law_Hours, Econ_Hours, IT_Hours, Tech_Hours, Art_Hours, PE_Hours); + } + }); + + Econ.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(RadioGroup radioGroup, int checkedId) { + switch (checkedId){ + case R.id.EconSt: + Econ_Hours=0f; + break; + case R.id.EconPro: + Econ_Hours=3f; + break; + } + Hours_Count = Final(UALan_Hours, UALit_Hours, FLit_Hours, FLan_Hours, UAHist_Hours, FHist_Hours, AnFLan_Hours, Math_Hours, Alg_Hours, Geom_Hours, PhysAstr_Hours, BioEco_Hours, Chem_Hours, Geo_Hours, Milit_Hours, SocEd_Hours, Law_Hours, Econ_Hours, IT_Hours, Tech_Hours, Art_Hours, PE_Hours); + } + }); + + checkBox_IT.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { + if (checkBox_IT.isChecked()) { + IT_Hours = 3f; + IT.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(RadioGroup radioGroup, int checkedId) { + if (checkBox_IT.isChecked()) { + switch (checkedId) { + case R.id.ITSt: + IT_Hours = 3f; + break; + case R.id.ITPro: + IT_Hours = 5f; + break; + } + Hours_Count = Final(UALan_Hours, UALit_Hours, FLit_Hours, FLan_Hours, UAHist_Hours, FHist_Hours, AnFLan_Hours, Math_Hours, Alg_Hours, Geom_Hours, PhysAstr_Hours, BioEco_Hours, Chem_Hours, Geo_Hours, Milit_Hours, SocEd_Hours, Law_Hours, Econ_Hours, IT_Hours, Tech_Hours, Art_Hours, PE_Hours); + } else{ + IT_Hours = 0f; + Hours_Count = Final(UALan_Hours, UALit_Hours, FLit_Hours, FLan_Hours, UAHist_Hours, FHist_Hours, AnFLan_Hours, Math_Hours, Alg_Hours, Geom_Hours, PhysAstr_Hours, BioEco_Hours, Chem_Hours, Geo_Hours, Milit_Hours, SocEd_Hours, Law_Hours, Econ_Hours, IT_Hours, Tech_Hours, Art_Hours, PE_Hours); + } + } + }); + } else { + IT.clearCheck(); + IT_Hours = 0f; + Hours_Count = Final(UALan_Hours, UALit_Hours, FLit_Hours, FLan_Hours, UAHist_Hours, FHist_Hours, AnFLan_Hours, Math_Hours, Alg_Hours, Geom_Hours, PhysAstr_Hours, BioEco_Hours, Chem_Hours, Geo_Hours, Milit_Hours, SocEd_Hours, Law_Hours, Econ_Hours, IT_Hours, Tech_Hours, Art_Hours, PE_Hours); + } + } + }); + + checkBox_Tech.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { + if (checkBox_Tech.isChecked()) { + Tech_Hours = 3f; + Tech.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(RadioGroup radioGroup, int checkedId) { + if (checkBox_Tech.isChecked()) { + switch (checkedId) { + case R.id.TechSt: + Tech_Hours = 3f; + break; + case R.id.TechPro: + Tech_Hours = 5f; + break; + } + Hours_Count = Final(UALan_Hours, UALit_Hours, FLit_Hours, FLan_Hours, UAHist_Hours, FHist_Hours, AnFLan_Hours, Math_Hours, Alg_Hours, Geom_Hours, PhysAstr_Hours, BioEco_Hours, Chem_Hours, Geo_Hours, Milit_Hours, SocEd_Hours, Law_Hours, Econ_Hours, IT_Hours, Tech_Hours, Art_Hours, PE_Hours); + } else { + Tech_Hours = 0f; + Hours_Count = Final(UALan_Hours, UALit_Hours, FLit_Hours, FLan_Hours, UAHist_Hours, FHist_Hours, AnFLan_Hours, Math_Hours, Alg_Hours, Geom_Hours, PhysAstr_Hours, BioEco_Hours, Chem_Hours, Geo_Hours, Milit_Hours, SocEd_Hours, Law_Hours, Econ_Hours, IT_Hours, Tech_Hours, Art_Hours, PE_Hours); + } + } + }); + }else { + Tech.clearCheck(); + Tech_Hours = 0f; + Hours_Count = Final(UALan_Hours, UALit_Hours, FLit_Hours, FLan_Hours, UAHist_Hours, FHist_Hours, AnFLan_Hours, Math_Hours, Alg_Hours, Geom_Hours, PhysAstr_Hours, BioEco_Hours, Chem_Hours, Geo_Hours, Milit_Hours, SocEd_Hours, Law_Hours, Econ_Hours, IT_Hours, Tech_Hours, Art_Hours, PE_Hours); + } + } + }); + + checkBox_Art.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { + if (checkBox_Art.isChecked()) { + Art_Hours = 3f; + Art.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(RadioGroup radioGroup, int checkedId) { + if (checkBox_Art.isChecked()){ + switch (checkedId) { + case R.id.ArtSt: + Art_Hours = 3f; + break; + case R.id.ArtPro: + Art_Hours = 5f; + } + Hours_Count = Final(UALan_Hours, UALit_Hours, FLit_Hours, FLan_Hours, UAHist_Hours, FHist_Hours, AnFLan_Hours, Math_Hours, Alg_Hours, Geom_Hours, PhysAstr_Hours, BioEco_Hours, Chem_Hours, Geo_Hours, Milit_Hours, SocEd_Hours, Law_Hours, Econ_Hours, IT_Hours, Tech_Hours, Art_Hours, PE_Hours); + } else { + Art_Hours= 0f; + Hours_Count = Final(UALan_Hours, UALit_Hours, FLit_Hours, FLan_Hours, UAHist_Hours, FHist_Hours, AnFLan_Hours, Math_Hours, Alg_Hours, Geom_Hours, PhysAstr_Hours, BioEco_Hours, Chem_Hours, Geo_Hours, Milit_Hours, SocEd_Hours, Law_Hours, Econ_Hours, IT_Hours, Tech_Hours, Art_Hours, PE_Hours); + } + } + }); + }else { + Art.clearCheck(); + Art_Hours = 0f; + Hours_Count = Final(UALan_Hours, UALit_Hours, FLit_Hours, FLan_Hours, UAHist_Hours, FHist_Hours, AnFLan_Hours, Math_Hours, Alg_Hours, Geom_Hours, PhysAstr_Hours, BioEco_Hours, Chem_Hours, Geo_Hours, Milit_Hours, SocEd_Hours, Law_Hours, Econ_Hours, IT_Hours, Tech_Hours, Art_Hours, PE_Hours); + } + } + }); + + } + + public float Final(float Lesson_1, float Lesson_2, float Lesson_3, float Lesson_4, float Lesson_5, float Lesson_6, float Lesson_7, float Lesson_8, float Lesson_9, float Lesson_10, float Lesson_11, float Lesson_12, float Lesson_13, float Lesson_14, float Lesson_15, float Lesson_16, float Lesson_17, float Lesson_18, float Lesson_19, float Lesson_20, float Lesson_21, float PE){ + float Hours = Lesson_1 + Lesson_2 + Lesson_3 + Lesson_4 + Lesson_5 + Lesson_6 + Lesson_7 + Lesson_8 + Lesson_9 + Lesson_10 + Lesson_11 + Lesson_12 + Lesson_13 + Lesson_14 + Lesson_15 + Lesson_16 + Lesson_17 + Lesson_18 + Lesson_19 + Lesson_20 + Lesson_21; + + if (Hours >= 33f){ + HoursTaken.setTextColor(Color.rgb(255,0,0)); + } + else { + HoursTaken.setTextColor(Color.rgb(0, 0, 0)); + } + + Hours += PE; + + HoursTaken.setText("Годин вибрано: " + Float.toString(Hours)); + + return Hours; + } + +} \ No newline at end of file diff --git a/app/src/main/java/com/rhinemann/project/Graph.java b/app/src/main/java/com/rhinemann/project/Graph.java new file mode 100644 index 0000000..4fb1c30 --- /dev/null +++ b/app/src/main/java/com/rhinemann/project/Graph.java @@ -0,0 +1,91 @@ +package com.rhinemann.project; + +import android.content.Intent; +import android.os.Bundle; +import android.view.View; +import android.widget.Button; + +import androidx.appcompat.app.AppCompatActivity; + +import com.jjoe64.graphview.series.BarGraphSeries; +import com.jjoe64.graphview.GraphView; +import com.jjoe64.graphview.series.DataPoint; +import com.jjoe64.graphview.DefaultLabelFormatter; + +public class Graph extends AppCompatActivity { + + Button Home; +// BarChart Chart; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_graph); + + GraphView Graph = (GraphView) findViewById(R.id.Graph); + + final String[] XAxis = {"Фізика", "Математика", "Електро- та \nрадіотехніка", "Техніка", "Хімія", "Біологія", "Медицина", "Географія", "Історія", "Філологія", "Мистецтво", "Педагогіка", "Психологія, \nфілософія", "Бізнес", "Сфера \nобслуговувуння", "Військова \nсправа", "Спорт"}; + + int[] Data = getIntent().getIntArrayExtra("profileAnswers"); + + BarGraphSeries series = new BarGraphSeries(); + + for (int i=0; i<17; i++){ + series.appendData(new DataPoint(i*2, Data[i]),true,18); + } + + series.appendData(new DataPoint(17*2, 0),true,18); + + series.setColor(R.color.colorPrimary); + series.setSpacing(20);//Spacing + series.setDrawValuesOnTop(true);// draw values on top + + Graph.addSeries(series); + + Graph.setTitle("Орієнтовний графік"); + Graph.setTitleTextSize(50); + Graph.setTitleColor(R.color.colorAccent); + + Graph.getLegendRenderer().setVisible(false); + + + // set manual Y bounds + Graph.getViewport().setYAxisBoundsManual(true); + Graph.getViewport().setMinY(0); + Graph.getViewport().setMaxY(15); + + // set manual X bounds + Graph.getViewport().setXAxisBoundsManual(true); + Graph.getViewport().setMinX(0); + Graph.getViewport().setMaxX(7); + + //set horizontal scrolling + Graph.getViewport().setScrollable(true); + + Graph.getGridLabelRenderer().setTextSize(30); + Graph.getGridLabelRenderer().reloadStyles(); + Graph.getGridLabelRenderer().setPadding(10); + + Graph.getGridLabelRenderer().setLabelFormatter(new DefaultLabelFormatter(){ + + @Override + public String formatLabel(double value, boolean isValueX) { + if (isValueX){ + return (XAxis[(int) (value/2)]); + } else { + return super.formatLabel(value, isValueX); + } + } + }); + + Home = findViewById(R.id.home); + + Home.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent intent = new Intent(Graph.this, HomeScreen.class); + startActivity(intent); + } + }); + } +} \ No newline at end of file diff --git a/app/src/main/java/com/rhinemann/project/HomeScreen.java b/app/src/main/java/com/rhinemann/project/HomeScreen.java new file mode 100644 index 0000000..393e055 --- /dev/null +++ b/app/src/main/java/com/rhinemann/project/HomeScreen.java @@ -0,0 +1,47 @@ +package com.rhinemann.project; + +import androidx.appcompat.app.AppCompatActivity; +import android.content.Intent; +import android.os.Bundle; +import android.view.View; +import android.widget.Button; + +public class HomeScreen extends AppCompatActivity { + + Button button_Tests, button_About, button_Calculator; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_home_screen); + + button_Tests = findViewById(R.id.Button_Tests); + button_About = findViewById(R.id.Button_About); + button_Calculator = findViewById(R.id.Button_Calculator); + + button_Tests.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent intent = new Intent(HomeScreen.this, Tests.class); + startActivity(intent); + } + }); + + button_About.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent intent = new Intent(HomeScreen.this, About.class); + startActivity(intent); + } + }); + + button_Calculator.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent intent = new Intent(HomeScreen.this, Calculator.class); + startActivity(intent); + } + }); + + } +} \ No newline at end of file diff --git a/app/src/main/java/com/rhinemann/project/Instruction.java b/app/src/main/java/com/rhinemann/project/Instruction.java new file mode 100644 index 0000000..a531315 --- /dev/null +++ b/app/src/main/java/com/rhinemann/project/Instruction.java @@ -0,0 +1,39 @@ +package com.rhinemann.project; + +import androidx.appcompat.app.AppCompatActivity; + +import android.content.Intent; +import android.os.Bundle; +import android.view.View; +import android.widget.Button; + +public class Instruction extends AppCompatActivity { + + Button Home; + Button Prof; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_instruction); + + Home = findViewById(R.id.home_inst); + Prof = findViewById(R.id.button_prof); + + Home.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent intent = new Intent(Instruction.this, HomeScreen.class); + startActivity(intent); + } + }); + + Prof.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent intent = new Intent(Instruction.this, Profile.class); + startActivity(intent); + } + }); + } +} \ No newline at end of file diff --git a/app/src/main/java/com/rhinemann/project/Profile.java b/app/src/main/java/com/rhinemann/project/Profile.java new file mode 100644 index 0000000..ac6ab70 --- /dev/null +++ b/app/src/main/java/com/rhinemann/project/Profile.java @@ -0,0 +1,118 @@ +package com.rhinemann.project; + +import androidx.appcompat.app.AppCompatActivity; + +import android.content.Intent; +import android.os.Bundle; +import android.view.View; +import android.widget.Button; +import android.widget.TextView; + +public class Profile extends AppCompatActivity { + + Integer questionId, discipline; + int[] profileAnswers; + TextView profileQuestion; + String[] profileQuestions; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_profile); + + profileQuestions = getResources().getStringArray(R.array.Profile_Questions); + profileQuestion = findViewById(R.id.Profile_Question); + questionId = 0; + discipline = 0; + profileAnswers = new int[]{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + profileQuestion.setText(profileQuestions[questionId]); + + + + //Кнопка плюс + Button plusButton = findViewById(R.id.Button_Plus); + + plusButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Test(1); + } + }); + + //Кнопка мінус + Button minusButton = findViewById(R.id.Button_Minus); + + minusButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Test(-1); + } + }); + + //Кнопка нуль + Button zeroButton = findViewById(R.id.Button_Zero); + + zeroButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Test(0); + } + }); + + //Кнопка два плюси + Button doublePlusButton = findViewById(R.id.Button_Double_Plus); + + doublePlusButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Test(2); + } + }); + + //Кнопка два мінуси + Button doubleMinusButton = findViewById(R.id.Button_Double_Minus); + + doubleMinusButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Test(-2); + } + }); + + //Кнорка Меню + Button Home = findViewById(R.id.home); + + Home.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent intent = new Intent(Profile.this, HomeScreen.class); + startActivity(intent); + } + }); + } + + public void Test(int amount) { + if (questionId < 102){ + questionId ++; + profileQuestion.setText(profileQuestions[questionId]); + } else { + graphResult(); + } + + profileAnswers[discipline] += amount; + + if (discipline == 16){ + discipline = 0; + } else { + discipline ++; + } + } + + public void graphResult() { + Intent intent = new Intent(Profile.this, Graph.class); + intent.putExtra("profileAnswers", profileAnswers); + startActivity(intent); + } + +} \ No newline at end of file diff --git a/app/src/main/java/com/rhinemann/project/Temper.java b/app/src/main/java/com/rhinemann/project/Temper.java new file mode 100644 index 0000000..20675a5 --- /dev/null +++ b/app/src/main/java/com/rhinemann/project/Temper.java @@ -0,0 +1,78 @@ +package com.rhinemann.project; + +import androidx.appcompat.app.AppCompatActivity; + +import android.content.Intent; +import android.os.Bundle; +import android.view.View; +import android.widget.Button; +import android.widget.TextView; + +public class Temper extends AppCompatActivity { + + Integer questionId, temper; + int[] temperAnswers; + TextView temperQuestion; + String[] temperQuestions; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_temper); + + temperQuestions = getResources().getStringArray(R.array.Temper_Questions); + temperQuestion = findViewById(R.id.Temper_Question); + questionId = 0; + temper = 0; + temperAnswers = new int[]{0, 0, 0, 0}; + + temperQuestion.setText(temperQuestions[questionId]); + + Button yesButton = findViewById(R.id.Button_Yes); + + yesButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Test(1); + } + }); + + Button noButton = findViewById(R.id.Button_No); + + noButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Test(0); + } + }); + + } + + public void Test(int amount) { + if (questionId <= 19) { + temper = 0; + } else if (questionId > 19 & questionId <= 39) { + temper = 1; + } else if (questionId > 39 & questionId <= 59){ + temper = 2; + } else { + temper = 3; + } + + temperAnswers[temper] += amount; + + if (questionId < 79) { + questionId ++; + temperQuestion.setText(temperQuestions[questionId]); + } else { + graphResult(); + } + } + + public void graphResult(){ + Intent intent = new Intent(Temper.this, TemperResult.class); + intent.putExtra("Temper", temperAnswers); + startActivity(intent); + } + +} \ No newline at end of file diff --git a/app/src/main/java/com/rhinemann/project/TemperResult.java b/app/src/main/java/com/rhinemann/project/TemperResult.java new file mode 100644 index 0000000..3aca8ef --- /dev/null +++ b/app/src/main/java/com/rhinemann/project/TemperResult.java @@ -0,0 +1,80 @@ +package com.rhinemann.project; + +import androidx.appcompat.app.AppCompatActivity; + +import android.content.Intent; +import android.os.Bundle; +import android.view.View; +import android.widget.Button; + +import com.github.mikephil.charting.charts.RadarChart; +import com.github.mikephil.charting.components.XAxis; +import com.github.mikephil.charting.data.RadarData; +import com.github.mikephil.charting.data.RadarDataSet; +import com.github.mikephil.charting.data.RadarEntry; +import com.github.mikephil.charting.formatter.IndexAxisValueFormatter; + +import java.util.ArrayList; + +public class TemperResult extends AppCompatActivity { + + RadarChart radarChart; + Button homeButton; + + int[] Data; + String[] labels = {"Choleric", "Sanguine", "Phlegmatic", "Melancholic"}; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_temper_result); + + Data = getIntent().getIntArrayExtra("Temper"); + + radarChart = findViewById(R.id.Graph); + + RadarDataSet dataSet = new RadarDataSet(dataValues(), "Tempers"); + + dataSet.setColor(R.color.colorPrimary); + dataSet.setFillColor(R.color.colorAccent); + dataSet.setLineWidth(2f); + dataSet.setDrawFilled(true); + + RadarData data = new RadarData(); + data.addDataSet(dataSet); + + data.setDrawValues(false); + + XAxis xAxis = radarChart.getXAxis(); + xAxis.setValueFormatter(new IndexAxisValueFormatter(labels)); + + radarChart.setData(data); + radarChart.getDescription().setEnabled(false); + radarChart.getLegend().setEnabled(false); + radarChart.setRotationEnabled(false); + radarChart.getXAxis().setTextSize(15f); + radarChart.getXAxis().setAxisMaximum(20f); + radarChart.getXAxis().setAxisMinimum(-20f); + radarChart.getYAxis().setAxisMaximum(20f); + radarChart.getYAxis().setAxisMinimum(-20f); + + homeButton = findViewById(R.id.home); + homeButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent intent = new Intent(TemperResult.this, HomeScreen.class); + startActivity(intent); + } + }); + } + + private ArrayListdataValues(){ + ArrayList Tempers = new ArrayList(); + Tempers.add(new RadarEntry(Data[0])); + Tempers.add(new RadarEntry(Data[1])); + Tempers.add(new RadarEntry(Data[2])); + Tempers.add(new RadarEntry(Data[3])); + return Tempers; + } + +} \ No newline at end of file diff --git a/app/src/main/java/com/rhinemann/project/Tests.java b/app/src/main/java/com/rhinemann/project/Tests.java new file mode 100644 index 0000000..32df1b9 --- /dev/null +++ b/app/src/main/java/com/rhinemann/project/Tests.java @@ -0,0 +1,38 @@ +package com.rhinemann.project; + +import androidx.appcompat.app.AppCompatActivity; + +import android.content.Intent; +import android.os.Bundle; +import android.view.View; +import android.widget.Button; + +public class Tests extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_tests); + + Button temperButton = findViewById(R.id.Button_Temper); + Button profileButton = findViewById(R.id.Button_Profile); + Button mayerButton = findViewById(R.id.Button_Mayer); + + profileButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent intent = new Intent(Tests.this, Profile.class); + startActivity(intent); + } + }); + + temperButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent intent = new Intent(Tests.this, Temper.class); + startActivity(intent); + } + }); + + } +} \ No newline at end of file diff --git a/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000..2b068d1 --- /dev/null +++ b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable-v24/radiobutton_selector.xml b/app/src/main/res/drawable-v24/radiobutton_selector.xml new file mode 100644 index 0000000..211c32c --- /dev/null +++ b/app/src/main/res/drawable-v24/radiobutton_selector.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..07d5da9 --- /dev/null +++ b/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/activity_about.xml b/app/src/main/res/layout/activity_about.xml new file mode 100644 index 0000000..9939715 --- /dev/null +++ b/app/src/main/res/layout/activity_about.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_calculator.xml b/app/src/main/res/layout/activity_calculator.xml new file mode 100644 index 0000000..1e52e3a --- /dev/null +++ b/app/src/main/res/layout/activity_calculator.xml @@ -0,0 +1,711 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +