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/.name b/.idea/.name new file mode 100644 index 0000000..0351081 --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +Foodhamster \ No newline at end of file diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..88ea3aa --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,122 @@ + + + + + + + + + +
+ + + + 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/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..79ee123 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml new file mode 100644 index 0000000..5cd135a --- /dev/null +++ b/.idea/gradle.xml @@ -0,0 +1,20 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..37a7509 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml new file mode 100644 index 0000000..7f68460 --- /dev/null +++ b/.idea/runConfigurations.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/Foodhamster.zip b/Foodhamster.zip new file mode 100644 index 0000000..53c76fc Binary files /dev/null and b/Foodhamster.zip differ diff --git a/Foodhamster2/.gitignore b/Foodhamster2/.gitignore new file mode 100644 index 0000000..603b140 --- /dev/null +++ b/Foodhamster2/.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/Foodhamster2/app/.gitignore b/Foodhamster2/app/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/Foodhamster2/app/.gitignore @@ -0,0 +1 @@ +/build diff --git a/Foodhamster2/app/build.gradle b/Foodhamster2/app/build.gradle new file mode 100644 index 0000000..2af7690 --- /dev/null +++ b/Foodhamster2/app/build.gradle @@ -0,0 +1,38 @@ +apply plugin: 'com.android.application' +apply plugin: 'kotlin-android' +apply plugin: 'kotlin-android-extensions' + +android { + compileSdkVersion 29 + buildToolsVersion "29.0.3" + + defaultConfig { + applicationId "com.example.foodhamster" + minSdkVersion 16 + targetSdkVersion 29 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + +} + +dependencies { + implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation 'androidx.appcompat:appcompat:1.1.0' + implementation 'androidx.core:core-ktx:1.2.0' + implementation 'androidx.constraintlayout:constraintlayout:1.1.3' + implementation 'com.basgeekball:awesome-validation:4.2' + testImplementation 'junit:junit:4.12' + androidTestImplementation 'androidx.test.ext:junit:1.1.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' +} diff --git a/Foodhamster2/app/proguard-rules.pro b/Foodhamster2/app/proguard-rules.pro new file mode 100644 index 0000000..f1b4245 --- /dev/null +++ b/Foodhamster2/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 diff --git a/Foodhamster2/app/src/androidTest/java/com/example/foodhamster/ExampleInstrumentedTest.kt b/Foodhamster2/app/src/androidTest/java/com/example/foodhamster/ExampleInstrumentedTest.kt new file mode 100644 index 0000000..b2242e5 --- /dev/null +++ b/Foodhamster2/app/src/androidTest/java/com/example/foodhamster/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package com.example.foodhamster + +import androidx.test.platform.app.InstrumentationRegistry +import androidx.test.ext.junit.runners.AndroidJUnit4 + +import org.junit.Test +import org.junit.runner.RunWith + +import org.junit.Assert.* + +/** + * Instrumented test, which will execute on an Android device. + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +@RunWith(AndroidJUnit4::class) +class ExampleInstrumentedTest { + @Test + fun useAppContext() { + // Context of the app under test. + val appContext = InstrumentationRegistry.getInstrumentation().targetContext + assertEquals("com.example.foodhamster", appContext.packageName) + } +} diff --git a/Foodhamster2/app/src/main/AndroidManifest.xml b/Foodhamster2/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..5d99019 --- /dev/null +++ b/Foodhamster2/app/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Foodhamster2/app/src/main/java/com/example/foodhamster/MainActivity.kt b/Foodhamster2/app/src/main/java/com/example/foodhamster/MainActivity.kt new file mode 100644 index 0000000..0683dcc --- /dev/null +++ b/Foodhamster2/app/src/main/java/com/example/foodhamster/MainActivity.kt @@ -0,0 +1,20 @@ +package com.example.foodhamster + +import android.content.Intent +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import kotlinx.android.synthetic.main.activity_main.* + +class MainActivity : AppCompatActivity() { + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + orderbutton.setOnClickListener { startActivity(Intent(this, Orderregister::class.java)) } + riderbutton.setOnClickListener { startActivity(Intent(this, RiderRegister::class.java)) } + + + } + + } + diff --git a/Foodhamster2/app/src/main/java/com/example/foodhamster/Order.kt b/Foodhamster2/app/src/main/java/com/example/foodhamster/Order.kt new file mode 100644 index 0000000..2f9e525 --- /dev/null +++ b/Foodhamster2/app/src/main/java/com/example/foodhamster/Order.kt @@ -0,0 +1,16 @@ +package com.example.foodhamster + +import android.os.Bundle +import androidx.appcompat.app.AppCompatActivity + +class Order :AppCompatActivity() +{ + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_order2) + + + + } + +} \ No newline at end of file diff --git a/Foodhamster2/app/src/main/java/com/example/foodhamster/Orderregister.kt b/Foodhamster2/app/src/main/java/com/example/foodhamster/Orderregister.kt new file mode 100644 index 0000000..a037aaf --- /dev/null +++ b/Foodhamster2/app/src/main/java/com/example/foodhamster/Orderregister.kt @@ -0,0 +1,58 @@ +package com.example.foodhamster + +import android.content.Intent +import android.os.Bundle +import android.view.View +import android.widget.TextView +import android.widget.Toast +import androidx.appcompat.app.AppCompatActivity +import kotlinx.android.synthetic.main.activity_main.* +import kotlinx.android.synthetic.main.activity_order.* +import kotlinx.android.synthetic.main.activity_rider.* + +public class Orderregister : AppCompatActivity(),View.OnClickListener { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_order) + volgendeorder.setOnClickListener (this) + } + + + private fun validate() :Boolean { + if(naamorder.text.toString().isEmpty()) + { + naamorder.error = "Niet openlaten" + return false + } + else if(telefoonorder.text.toString().isEmpty()) + { + telefoonorder.error = "Niet openlaten" + return false + } + else if (orderadres.text.toString().isEmpty()) + { + orderadres.error = "Niet openlaten" + return false + } + startActivity(Intent(this,Order::class.java)); + return true + + } + + override fun onClick(v: View?) { + when(v?.id) + { + R.id.volgendeorder->{ + if(validate()) + { + Toast.makeText(applicationContext,"Done", Toast.LENGTH_LONG).show() + } + + } + } + } + + + + +} \ No newline at end of file diff --git a/Foodhamster2/app/src/main/java/com/example/foodhamster/RiderRegister.kt b/Foodhamster2/app/src/main/java/com/example/foodhamster/RiderRegister.kt new file mode 100644 index 0000000..45a68d8 --- /dev/null +++ b/Foodhamster2/app/src/main/java/com/example/foodhamster/RiderRegister.kt @@ -0,0 +1,48 @@ +package com.example.foodhamster + +import android.os.Bundle +import androidx.appcompat.app.AppCompatActivity +import android.view.View +import android.widget.Toast +import kotlinx.android.synthetic.main.activity_rider.* + +class RiderRegister : AppCompatActivity(),View.OnClickListener { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_rider) + volgenderider.setOnClickListener (this) + } +private fun validate() :Boolean { + if(naamrider.text.toString().isEmpty()) + { + naamrider.error = "Niet openlaten" + return false + } + else if(telefoonrider.text.toString().isEmpty()) + { + telefoonrider.error = "Niet openlaten" + return false + } + else if (rekeningrider.text.toString().isEmpty()) + { + rekeningrider.error = "Niet openlaten" + return false + } + return true + +} + + override fun onClick(v: View?) { + when(v?.id) + { + R.id.volgenderider->{ + if(validate()) + { + Toast.makeText(applicationContext,"Done",Toast.LENGTH_LONG).show() + } + + } + } + } + +} \ No newline at end of file diff --git a/Foodhamster2/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/Foodhamster2/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000..2b068d1 --- /dev/null +++ b/Foodhamster2/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Foodhamster2/app/src/main/res/drawable/ic_launcher_background.xml b/Foodhamster2/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..07d5da9 --- /dev/null +++ b/Foodhamster2/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Foodhamster2/app/src/main/res/drawable/logofoodhamster.png b/Foodhamster2/app/src/main/res/drawable/logofoodhamster.png new file mode 100644 index 0000000..8691749 Binary files /dev/null and b/Foodhamster2/app/src/main/res/drawable/logofoodhamster.png differ diff --git a/Foodhamster2/app/src/main/res/layout/activity_main.xml b/Foodhamster2/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..c121c3d --- /dev/null +++ b/Foodhamster2/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,48 @@ + + + + + +