diff --git a/caddy/week2/Practice_Nike/.gitignore b/caddy/week2/Practice_Nike/.gitignore new file mode 100644 index 0000000..aa724b7 --- /dev/null +++ b/caddy/week2/Practice_Nike/.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/caddy/week2/Practice_Nike/.idea/AndroidProjectSystem.xml b/caddy/week2/Practice_Nike/.idea/AndroidProjectSystem.xml new file mode 100644 index 0000000..4a53bee --- /dev/null +++ b/caddy/week2/Practice_Nike/.idea/AndroidProjectSystem.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/caddy/week2/Practice_Nike/.idea/compiler.xml b/caddy/week2/Practice_Nike/.idea/compiler.xml new file mode 100644 index 0000000..b86273d --- /dev/null +++ b/caddy/week2/Practice_Nike/.idea/compiler.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/caddy/week2/Practice_Nike/.idea/deploymentTargetSelector.xml b/caddy/week2/Practice_Nike/.idea/deploymentTargetSelector.xml new file mode 100644 index 0000000..b268ef3 --- /dev/null +++ b/caddy/week2/Practice_Nike/.idea/deploymentTargetSelector.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/caddy/week2/Practice_Nike/.idea/deviceManager.xml b/caddy/week2/Practice_Nike/.idea/deviceManager.xml new file mode 100644 index 0000000..91f9558 --- /dev/null +++ b/caddy/week2/Practice_Nike/.idea/deviceManager.xml @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/caddy/week2/Practice_Nike/.idea/gradle.xml b/caddy/week2/Practice_Nike/.idea/gradle.xml new file mode 100644 index 0000000..cdbc250 --- /dev/null +++ b/caddy/week2/Practice_Nike/.idea/gradle.xml @@ -0,0 +1,17 @@ + + + + + + \ No newline at end of file diff --git a/caddy/week2/Practice_Nike/.idea/misc.xml b/caddy/week2/Practice_Nike/.idea/misc.xml new file mode 100644 index 0000000..a4f09e2 --- /dev/null +++ b/caddy/week2/Practice_Nike/.idea/misc.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/caddy/week2/Practice_Nike/.idea/runConfigurations.xml b/caddy/week2/Practice_Nike/.idea/runConfigurations.xml new file mode 100644 index 0000000..16660f1 --- /dev/null +++ b/caddy/week2/Practice_Nike/.idea/runConfigurations.xml @@ -0,0 +1,17 @@ + + + + + + \ No newline at end of file diff --git a/caddy/week2/Practice_Nike/app/.gitignore b/caddy/week2/Practice_Nike/app/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/caddy/week2/Practice_Nike/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/caddy/week2/Practice_Nike/app/build.gradle.kts b/caddy/week2/Practice_Nike/app/build.gradle.kts new file mode 100644 index 0000000..64a7519 --- /dev/null +++ b/caddy/week2/Practice_Nike/app/build.gradle.kts @@ -0,0 +1,47 @@ +plugins { + alias(libs.plugins.android.application) +} + +android { + namespace = "com.example.practice_nike" + compileSdk { + version = release(36) { + minorApiLevel = 1 + } + } + + defaultConfig { + applicationId = "com.example.practice_nike" + minSdk = 24 + targetSdk = 36 + versionCode = 1 + versionName = "1.0" + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } +} + +dependencies { + implementation(libs.androidx.core.ktx) + implementation(libs.androidx.appcompat) + implementation(libs.material) + implementation(libs.androidx.activity) + implementation(libs.androidx.constraintlayout) + testImplementation(libs.junit) + androidTestImplementation(libs.androidx.junit) + androidTestImplementation(libs.androidx.espresso.core) +} \ No newline at end of file diff --git a/caddy/week2/Practice_Nike/app/proguard-rules.pro b/caddy/week2/Practice_Nike/app/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/caddy/week2/Practice_Nike/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/caddy/week2/Practice_Nike/app/src/androidTest/java/com/example/practice_nike/ExampleInstrumentedTest.kt b/caddy/week2/Practice_Nike/app/src/androidTest/java/com/example/practice_nike/ExampleInstrumentedTest.kt new file mode 100644 index 0000000..4c27100 --- /dev/null +++ b/caddy/week2/Practice_Nike/app/src/androidTest/java/com/example/practice_nike/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package com.example.practice_nike + +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.practice_nike", appContext.packageName) + } +} \ No newline at end of file diff --git a/caddy/week2/Practice_Nike/app/src/main/AndroidManifest.xml b/caddy/week2/Practice_Nike/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..df5b992 --- /dev/null +++ b/caddy/week2/Practice_Nike/app/src/main/AndroidManifest.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/caddy/week2/Practice_Nike/app/src/main/java/com/example/practice_nike/CartFragment.kt b/caddy/week2/Practice_Nike/app/src/main/java/com/example/practice_nike/CartFragment.kt new file mode 100644 index 0000000..297b8fb --- /dev/null +++ b/caddy/week2/Practice_Nike/app/src/main/java/com/example/practice_nike/CartFragment.kt @@ -0,0 +1,20 @@ +package com.example.practice_nike + +import android.os.Bundle +import android.view.View +import android.widget.Button +import androidx.fragment.app.Fragment + +class CartFragment : Fragment(R.layout.fragment_cart) { + + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + + val btnOrder = view.findViewById