From 6354e2bb76dc9d4bba627cab9f15496d6c0bb2d4 Mon Sep 17 00:00:00 2001 From: Snigdha Sinha <54586881+Snigdha0888@users.noreply.github.com> Date: Sat, 31 Oct 2020 15:18:38 +0530 Subject: [PATCH 1/5] Create Snigdha-Kajal --- Snigdha-Kajal | 1 + 1 file changed, 1 insertion(+) create mode 100644 Snigdha-Kajal diff --git a/Snigdha-Kajal b/Snigdha-Kajal new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Snigdha-Kajal @@ -0,0 +1 @@ + From 11014607572e6c16ea02c81b5d9493c04063e5f0 Mon Sep 17 00:00:00 2001 From: Snigdha Sinha <54586881+Snigdha0888@users.noreply.github.com> Date: Sat, 31 Oct 2020 19:26:28 +0530 Subject: [PATCH 2/5] Delete Snigdha-Kajal --- Snigdha-Kajal | 1 - 1 file changed, 1 deletion(-) delete mode 100644 Snigdha-Kajal diff --git a/Snigdha-Kajal b/Snigdha-Kajal deleted file mode 100644 index 8b13789..0000000 --- a/Snigdha-Kajal +++ /dev/null @@ -1 +0,0 @@ - From 850de68fa7146c6f2df362844f1109896a338be8 Mon Sep 17 00:00:00 2001 From: Snigdha Sinha <54586881+Snigdha0888@users.noreply.github.com> Date: Sat, 31 Oct 2020 19:34:41 +0530 Subject: [PATCH 3/5] Create Snigdha-Kajal --- Snigdha-Kajal | 1 + 1 file changed, 1 insertion(+) create mode 100644 Snigdha-Kajal diff --git a/Snigdha-Kajal b/Snigdha-Kajal new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Snigdha-Kajal @@ -0,0 +1 @@ + From 248a976557287d9315e9e53e1b3b2074d6359cbc Mon Sep 17 00:00:00 2001 From: kajal-mongia Date: Sun, 1 Nov 2020 12:07:31 +0530 Subject: [PATCH 4/5] Android project --- Snigdha-Kajal | 1 - Snigdha-Kajal/OrderCoffee/.gitignore | 15 ++ Snigdha-Kajal/OrderCoffee/.idea/.gitignore | 3 + Snigdha-Kajal/OrderCoffee/.idea/compiler.xml | 6 + Snigdha-Kajal/OrderCoffee/.idea/gradle.xml | 21 +++ .../OrderCoffee/.idea/jarRepositories.xml | 25 +++ Snigdha-Kajal/OrderCoffee/.idea/misc.xml | 9 + Snigdha-Kajal/OrderCoffee/app/.gitignore | 1 + Snigdha-Kajal/OrderCoffee/app/build.gradle | 39 ++++ .../OrderCoffee/app/proguard-rules.pro | 21 +++ .../ordercoffee/ExampleInstrumentedTest.java | 26 +++ .../app/src/main/AndroidManifest.xml | 21 +++ .../android/ordercoffee/MainActivity.java | 68 +++++++ .../drawable-v24/ic_launcher_foreground.xml | 30 +++ .../res/drawable/ic_launcher_background.xml | 170 +++++++++++++++++ .../app/src/main/res/layout/activity_main.xml | 76 ++++++++ .../res/mipmap-anydpi-v26/ic_launcher.xml | 5 + .../mipmap-anydpi-v26/ic_launcher_round.xml | 5 + .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 3593 bytes .../res/mipmap-hdpi/ic_launcher_round.png | Bin 0 -> 5339 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 2636 bytes .../res/mipmap-mdpi/ic_launcher_round.png | Bin 0 -> 3388 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 4926 bytes .../res/mipmap-xhdpi/ic_launcher_round.png | Bin 0 -> 7472 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 7909 bytes .../res/mipmap-xxhdpi/ic_launcher_round.png | Bin 0 -> 11873 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 10652 bytes .../res/mipmap-xxxhdpi/ic_launcher_round.png | Bin 0 -> 16570 bytes .../app/src/main/res/values-night/themes.xml | 16 ++ .../app/src/main/res/values/colors.xml | 10 + .../app/src/main/res/values/strings.xml | 3 + .../app/src/main/res/values/themes.xml | 16 ++ .../android/ordercoffee/ExampleUnitTest.java | 17 ++ Snigdha-Kajal/OrderCoffee/build.gradle | 24 +++ Snigdha-Kajal/OrderCoffee/gradle.properties | 19 ++ .../gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 54329 bytes .../gradle/wrapper/gradle-wrapper.properties | 6 + Snigdha-Kajal/OrderCoffee/gradlew | 172 ++++++++++++++++++ Snigdha-Kajal/OrderCoffee/gradlew.bat | 84 +++++++++ Snigdha-Kajal/OrderCoffee/settings.gradle | 2 + 40 files changed, 910 insertions(+), 1 deletion(-) delete mode 100644 Snigdha-Kajal create mode 100644 Snigdha-Kajal/OrderCoffee/.gitignore create mode 100644 Snigdha-Kajal/OrderCoffee/.idea/.gitignore create mode 100644 Snigdha-Kajal/OrderCoffee/.idea/compiler.xml create mode 100644 Snigdha-Kajal/OrderCoffee/.idea/gradle.xml create mode 100644 Snigdha-Kajal/OrderCoffee/.idea/jarRepositories.xml create mode 100644 Snigdha-Kajal/OrderCoffee/.idea/misc.xml create mode 100644 Snigdha-Kajal/OrderCoffee/app/.gitignore create mode 100644 Snigdha-Kajal/OrderCoffee/app/build.gradle create mode 100644 Snigdha-Kajal/OrderCoffee/app/proguard-rules.pro create mode 100644 Snigdha-Kajal/OrderCoffee/app/src/androidTest/java/com/example/android/ordercoffee/ExampleInstrumentedTest.java create mode 100644 Snigdha-Kajal/OrderCoffee/app/src/main/AndroidManifest.xml create mode 100644 Snigdha-Kajal/OrderCoffee/app/src/main/java/com/example/android/ordercoffee/MainActivity.java create mode 100644 Snigdha-Kajal/OrderCoffee/app/src/main/res/drawable-v24/ic_launcher_foreground.xml create mode 100644 Snigdha-Kajal/OrderCoffee/app/src/main/res/drawable/ic_launcher_background.xml create mode 100644 Snigdha-Kajal/OrderCoffee/app/src/main/res/layout/activity_main.xml create mode 100644 Snigdha-Kajal/OrderCoffee/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml create mode 100644 Snigdha-Kajal/OrderCoffee/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml create mode 100644 Snigdha-Kajal/OrderCoffee/app/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 Snigdha-Kajal/OrderCoffee/app/src/main/res/mipmap-hdpi/ic_launcher_round.png create mode 100644 Snigdha-Kajal/OrderCoffee/app/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 Snigdha-Kajal/OrderCoffee/app/src/main/res/mipmap-mdpi/ic_launcher_round.png create mode 100644 Snigdha-Kajal/OrderCoffee/app/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 Snigdha-Kajal/OrderCoffee/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png create mode 100644 Snigdha-Kajal/OrderCoffee/app/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 Snigdha-Kajal/OrderCoffee/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png create mode 100644 Snigdha-Kajal/OrderCoffee/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 Snigdha-Kajal/OrderCoffee/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png create mode 100644 Snigdha-Kajal/OrderCoffee/app/src/main/res/values-night/themes.xml create mode 100644 Snigdha-Kajal/OrderCoffee/app/src/main/res/values/colors.xml create mode 100644 Snigdha-Kajal/OrderCoffee/app/src/main/res/values/strings.xml create mode 100644 Snigdha-Kajal/OrderCoffee/app/src/main/res/values/themes.xml create mode 100644 Snigdha-Kajal/OrderCoffee/app/src/test/java/com/example/android/ordercoffee/ExampleUnitTest.java create mode 100644 Snigdha-Kajal/OrderCoffee/build.gradle create mode 100644 Snigdha-Kajal/OrderCoffee/gradle.properties create mode 100644 Snigdha-Kajal/OrderCoffee/gradle/wrapper/gradle-wrapper.jar create mode 100644 Snigdha-Kajal/OrderCoffee/gradle/wrapper/gradle-wrapper.properties create mode 100644 Snigdha-Kajal/OrderCoffee/gradlew create mode 100644 Snigdha-Kajal/OrderCoffee/gradlew.bat create mode 100644 Snigdha-Kajal/OrderCoffee/settings.gradle diff --git a/Snigdha-Kajal b/Snigdha-Kajal deleted file mode 100644 index 8b13789..0000000 --- a/Snigdha-Kajal +++ /dev/null @@ -1 +0,0 @@ - diff --git a/Snigdha-Kajal/OrderCoffee/.gitignore b/Snigdha-Kajal/OrderCoffee/.gitignore new file mode 100644 index 0000000..aa724b7 --- /dev/null +++ b/Snigdha-Kajal/OrderCoffee/.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/Snigdha-Kajal/OrderCoffee/.idea/.gitignore b/Snigdha-Kajal/OrderCoffee/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/Snigdha-Kajal/OrderCoffee/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/Snigdha-Kajal/OrderCoffee/.idea/compiler.xml b/Snigdha-Kajal/OrderCoffee/.idea/compiler.xml new file mode 100644 index 0000000..61a9130 --- /dev/null +++ b/Snigdha-Kajal/OrderCoffee/.idea/compiler.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Snigdha-Kajal/OrderCoffee/.idea/gradle.xml b/Snigdha-Kajal/OrderCoffee/.idea/gradle.xml new file mode 100644 index 0000000..fa31fe2 --- /dev/null +++ b/Snigdha-Kajal/OrderCoffee/.idea/gradle.xml @@ -0,0 +1,21 @@ + + + + + + \ No newline at end of file diff --git a/Snigdha-Kajal/OrderCoffee/.idea/jarRepositories.xml b/Snigdha-Kajal/OrderCoffee/.idea/jarRepositories.xml new file mode 100644 index 0000000..a5f05cd --- /dev/null +++ b/Snigdha-Kajal/OrderCoffee/.idea/jarRepositories.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/Snigdha-Kajal/OrderCoffee/.idea/misc.xml b/Snigdha-Kajal/OrderCoffee/.idea/misc.xml new file mode 100644 index 0000000..d5d35ec --- /dev/null +++ b/Snigdha-Kajal/OrderCoffee/.idea/misc.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/Snigdha-Kajal/OrderCoffee/app/.gitignore b/Snigdha-Kajal/OrderCoffee/app/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/Snigdha-Kajal/OrderCoffee/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/Snigdha-Kajal/OrderCoffee/app/build.gradle b/Snigdha-Kajal/OrderCoffee/app/build.gradle new file mode 100644 index 0000000..9db3ed8 --- /dev/null +++ b/Snigdha-Kajal/OrderCoffee/app/build.gradle @@ -0,0 +1,39 @@ +plugins { + id 'com.android.application' +} + +android { + compileSdkVersion 30 + buildToolsVersion "30.0.2" + + defaultConfig { + applicationId "com.example.android.ordercoffee" + minSdkVersion 28 + 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.2.1' + implementation 'androidx.constraintlayout:constraintlayout:2.0.2' + 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/Snigdha-Kajal/OrderCoffee/app/proguard-rules.pro b/Snigdha-Kajal/OrderCoffee/app/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/Snigdha-Kajal/OrderCoffee/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/Snigdha-Kajal/OrderCoffee/app/src/androidTest/java/com/example/android/ordercoffee/ExampleInstrumentedTest.java b/Snigdha-Kajal/OrderCoffee/app/src/androidTest/java/com/example/android/ordercoffee/ExampleInstrumentedTest.java new file mode 100644 index 0000000..6070594 --- /dev/null +++ b/Snigdha-Kajal/OrderCoffee/app/src/androidTest/java/com/example/android/ordercoffee/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package com.example.android.ordercoffee; + +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 Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("com.example.android.ordercoffee", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/Snigdha-Kajal/OrderCoffee/app/src/main/AndroidManifest.xml b/Snigdha-Kajal/OrderCoffee/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..da2e5b7 --- /dev/null +++ b/Snigdha-Kajal/OrderCoffee/app/src/main/AndroidManifest.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Snigdha-Kajal/OrderCoffee/app/src/main/java/com/example/android/ordercoffee/MainActivity.java b/Snigdha-Kajal/OrderCoffee/app/src/main/java/com/example/android/ordercoffee/MainActivity.java new file mode 100644 index 0000000..dfe2ac9 --- /dev/null +++ b/Snigdha-Kajal/OrderCoffee/app/src/main/java/com/example/android/ordercoffee/MainActivity.java @@ -0,0 +1,68 @@ +package com.example.android.ordercoffee; + +import android.os.Bundle; +import androidx.appcompat.app.AppCompatActivity; +import android.view.View; +import android.widget.TextView; +import java.text.NumberFormat; + +public class MainActivity extends AppCompatActivity { + int quantity=0; + + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + } + + /** + * This method is called when the order button is clicked. + */ + public void submitOrder(View view) { + String pricemessage= "Total: $" + quantity*5 + "\n Thank You!" ; + displayMessage(pricemessage); + + + + } + public void increment(View view) { + quantity=quantity+1; + display(quantity); + + } + public void decrement(View view) { + if(quantity>0) { + quantity = quantity - 1; + display(quantity); + } + + + } + + /** + * This method displays the given quantity value on the screen. + */ + private void display(int number) { + TextView quantityTextView = (TextView) findViewById( + R.id.quantity_text_view); + quantityTextView.setText("" + number); + + } + /** + * This method displays the given price on the screen. + */ + private void displayPrice(int number) { + TextView priceTextView = (TextView) findViewById(R.id.price_text_view); + priceTextView.setText(NumberFormat.getCurrencyInstance().format(number)); + } + /** + * This method displays the given text on the screen. + */ + private void displayMessage(String message) { + TextView priceTextView = (TextView) findViewById(R.id.price_text_view); + priceTextView.setText(message); + } + + +} \ No newline at end of file diff --git a/Snigdha-Kajal/OrderCoffee/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/Snigdha-Kajal/OrderCoffee/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000..2b068d1 --- /dev/null +++ b/Snigdha-Kajal/OrderCoffee/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Snigdha-Kajal/OrderCoffee/app/src/main/res/drawable/ic_launcher_background.xml b/Snigdha-Kajal/OrderCoffee/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..07d5da9 --- /dev/null +++ b/Snigdha-Kajal/OrderCoffee/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Snigdha-Kajal/OrderCoffee/app/src/main/res/layout/activity_main.xml b/Snigdha-Kajal/OrderCoffee/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..ec21c4e --- /dev/null +++ b/Snigdha-Kajal/OrderCoffee/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,76 @@ + + + + + + + +