From eb35373606d5e7b382e605b7e17fad11e513759e Mon Sep 17 00:00:00 2001 From: shreyamatspace-svg Date: Sun, 5 Apr 2026 15:07:31 +0530 Subject: [PATCH 1/2] Phantom Troupe --- PhantomTroupe/.gitignore | 15 ++ PhantomTroupe/app/.gitignore | 1 + PhantomTroupe/app/build.gradle.kts | 50 ++++ PhantomTroupe/app/proguard-rules.pro | 21 ++ .../phantomtroupe/ExampleInstrumentedTest.kt | 24 ++ .../app/src/main/AndroidManifest.xml | 28 ++ .../example/phantomtroupe/AdviceResponse.kt | 4 + .../com/example/phantomtroupe/ApiService.kt | 13 + .../example/phantomtroupe/CareerResponse.kt | 4 + .../com/example/phantomtroupe/MainActivity.kt | 60 +++++ .../res/drawable/ic_launcher_background.xml | 170 ++++++++++++ .../res/drawable/ic_launcher_foreground.xml | 30 +++ .../app/src/main/res/layout/activity_main.xml | 62 +++++ .../res/mipmap-anydpi-v26/ic_launcher.xml | 6 + .../mipmap-anydpi-v26/ic_launcher_round.xml | 6 + .../src/main/res/mipmap-hdpi/ic_launcher.webp | Bin 0 -> 1404 bytes .../res/mipmap-hdpi/ic_launcher_round.webp | Bin 0 -> 2898 bytes .../src/main/res/mipmap-mdpi/ic_launcher.webp | Bin 0 -> 982 bytes .../res/mipmap-mdpi/ic_launcher_round.webp | Bin 0 -> 1772 bytes .../main/res/mipmap-xhdpi/ic_launcher.webp | Bin 0 -> 1900 bytes .../res/mipmap-xhdpi/ic_launcher_round.webp | Bin 0 -> 3918 bytes .../main/res/mipmap-xxhdpi/ic_launcher.webp | Bin 0 -> 2884 bytes .../res/mipmap-xxhdpi/ic_launcher_round.webp | Bin 0 -> 5914 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.webp | Bin 0 -> 3844 bytes .../res/mipmap-xxxhdpi/ic_launcher_round.webp | Bin 0 -> 7778 bytes .../app/src/main/res/values-night/themes.xml | 7 + .../app/src/main/res/values/colors.xml | 5 + .../app/src/main/res/values/strings.xml | 3 + .../app/src/main/res/values/themes.xml | 9 + .../app/src/main/res/xml/backup_rules.xml | 13 + .../main/res/xml/data_extraction_rules.xml | 19 ++ .../example/phantomtroupe/ExampleUnitTest.kt | 17 ++ PhantomTroupe/build.gradle.kts | 4 + PhantomTroupe/gradle.properties | 15 ++ PhantomTroupe/gradle/libs.versions.toml | 24 ++ .../gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 45457 bytes .../gradle/wrapper/gradle-wrapper.properties | 9 + PhantomTroupe/gradlew | 251 ++++++++++++++++++ PhantomTroupe/gradlew.bat | 94 +++++++ PhantomTroupe/settings.gradle.kts | 27 ++ 40 files changed, 991 insertions(+) create mode 100644 PhantomTroupe/.gitignore create mode 100644 PhantomTroupe/app/.gitignore create mode 100644 PhantomTroupe/app/build.gradle.kts create mode 100644 PhantomTroupe/app/proguard-rules.pro create mode 100644 PhantomTroupe/app/src/androidTest/java/com/example/phantomtroupe/ExampleInstrumentedTest.kt create mode 100644 PhantomTroupe/app/src/main/AndroidManifest.xml create mode 100644 PhantomTroupe/app/src/main/java/com/example/phantomtroupe/AdviceResponse.kt create mode 100644 PhantomTroupe/app/src/main/java/com/example/phantomtroupe/ApiService.kt create mode 100644 PhantomTroupe/app/src/main/java/com/example/phantomtroupe/CareerResponse.kt create mode 100644 PhantomTroupe/app/src/main/java/com/example/phantomtroupe/MainActivity.kt create mode 100644 PhantomTroupe/app/src/main/res/drawable/ic_launcher_background.xml create mode 100644 PhantomTroupe/app/src/main/res/drawable/ic_launcher_foreground.xml create mode 100644 PhantomTroupe/app/src/main/res/layout/activity_main.xml create mode 100644 PhantomTroupe/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml create mode 100644 PhantomTroupe/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml create mode 100644 PhantomTroupe/app/src/main/res/mipmap-hdpi/ic_launcher.webp create mode 100644 PhantomTroupe/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp create mode 100644 PhantomTroupe/app/src/main/res/mipmap-mdpi/ic_launcher.webp create mode 100644 PhantomTroupe/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp create mode 100644 PhantomTroupe/app/src/main/res/mipmap-xhdpi/ic_launcher.webp create mode 100644 PhantomTroupe/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp create mode 100644 PhantomTroupe/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp create mode 100644 PhantomTroupe/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp create mode 100644 PhantomTroupe/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp create mode 100644 PhantomTroupe/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp create mode 100644 PhantomTroupe/app/src/main/res/values-night/themes.xml create mode 100644 PhantomTroupe/app/src/main/res/values/colors.xml create mode 100644 PhantomTroupe/app/src/main/res/values/strings.xml create mode 100644 PhantomTroupe/app/src/main/res/values/themes.xml create mode 100644 PhantomTroupe/app/src/main/res/xml/backup_rules.xml create mode 100644 PhantomTroupe/app/src/main/res/xml/data_extraction_rules.xml create mode 100644 PhantomTroupe/app/src/test/java/com/example/phantomtroupe/ExampleUnitTest.kt create mode 100644 PhantomTroupe/build.gradle.kts create mode 100644 PhantomTroupe/gradle.properties create mode 100644 PhantomTroupe/gradle/libs.versions.toml create mode 100644 PhantomTroupe/gradle/wrapper/gradle-wrapper.jar create mode 100644 PhantomTroupe/gradle/wrapper/gradle-wrapper.properties create mode 100644 PhantomTroupe/gradlew create mode 100644 PhantomTroupe/gradlew.bat create mode 100644 PhantomTroupe/settings.gradle.kts diff --git a/PhantomTroupe/.gitignore b/PhantomTroupe/.gitignore new file mode 100644 index 0000000..aa724b7 --- /dev/null +++ b/PhantomTroupe/.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/PhantomTroupe/app/.gitignore b/PhantomTroupe/app/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/PhantomTroupe/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/PhantomTroupe/app/build.gradle.kts b/PhantomTroupe/app/build.gradle.kts new file mode 100644 index 0000000..a65f05c --- /dev/null +++ b/PhantomTroupe/app/build.gradle.kts @@ -0,0 +1,50 @@ +plugins { + alias(libs.plugins.android.application) +} + +android { + namespace = "com.example.phantomtroupe" + compileSdk { + version = release(36) { + minorApiLevel = 1 + } + } + + defaultConfig { + applicationId = "com.example.phantomtroupe" + 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) + implementation("com.squareup.retrofit2:retrofit:2.9.0") + implementation("com.squareup.retrofit2:converter-gson:2.9.0") + implementation("com.squareup.picasso:picasso:2.8") + testImplementation(libs.junit) + androidTestImplementation(libs.androidx.junit) + androidTestImplementation(libs.androidx.espresso.core) +} \ No newline at end of file diff --git a/PhantomTroupe/app/proguard-rules.pro b/PhantomTroupe/app/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/PhantomTroupe/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/PhantomTroupe/app/src/androidTest/java/com/example/phantomtroupe/ExampleInstrumentedTest.kt b/PhantomTroupe/app/src/androidTest/java/com/example/phantomtroupe/ExampleInstrumentedTest.kt new file mode 100644 index 0000000..182670a --- /dev/null +++ b/PhantomTroupe/app/src/androidTest/java/com/example/phantomtroupe/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package com.example.phantomtroupe + +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.phantomtroupe", appContext.packageName) + } +} \ No newline at end of file diff --git a/PhantomTroupe/app/src/main/AndroidManifest.xml b/PhantomTroupe/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..702d239 --- /dev/null +++ b/PhantomTroupe/app/src/main/AndroidManifest.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/PhantomTroupe/app/src/main/java/com/example/phantomtroupe/AdviceResponse.kt b/PhantomTroupe/app/src/main/java/com/example/phantomtroupe/AdviceResponse.kt new file mode 100644 index 0000000..3945b90 --- /dev/null +++ b/PhantomTroupe/app/src/main/java/com/example/phantomtroupe/AdviceResponse.kt @@ -0,0 +1,4 @@ +package com.example.phantomtroupe + +data class AdviceSlip(val advice: String) +data class AdviceResponse(val slip: AdviceSlip) \ No newline at end of file diff --git a/PhantomTroupe/app/src/main/java/com/example/phantomtroupe/ApiService.kt b/PhantomTroupe/app/src/main/java/com/example/phantomtroupe/ApiService.kt new file mode 100644 index 0000000..026623e --- /dev/null +++ b/PhantomTroupe/app/src/main/java/com/example/phantomtroupe/ApiService.kt @@ -0,0 +1,13 @@ +package com.example.phantomtroupe + +import retrofit2.Call +import retrofit2.http.GET + +interface ApiService { + // Fetches products - we will pick a random one from the list + @GET("https://dummyjson.com/products") + fun getCareers(): Call + + @GET("https://api.adviceslip.com/advice") + fun getAdvice(): Call +} \ No newline at end of file diff --git a/PhantomTroupe/app/src/main/java/com/example/phantomtroupe/CareerResponse.kt b/PhantomTroupe/app/src/main/java/com/example/phantomtroupe/CareerResponse.kt new file mode 100644 index 0000000..cef18ab --- /dev/null +++ b/PhantomTroupe/app/src/main/java/com/example/phantomtroupe/CareerResponse.kt @@ -0,0 +1,4 @@ +package com.example.phantomtroupe + +data class Product(val title: String) +data class CareerResponse(val products: List) \ No newline at end of file diff --git a/PhantomTroupe/app/src/main/java/com/example/phantomtroupe/MainActivity.kt b/PhantomTroupe/app/src/main/java/com/example/phantomtroupe/MainActivity.kt new file mode 100644 index 0000000..a01a491 --- /dev/null +++ b/PhantomTroupe/app/src/main/java/com/example/phantomtroupe/MainActivity.kt @@ -0,0 +1,60 @@ +package com.example.phantomtroupe + +import android.os.Bundle +import android.view.View +import android.widget.* +import androidx.appcompat.app.AppCompatActivity +import com.squareup.picasso.Picasso +import retrofit2.* +import retrofit2.converter.gson.GsonConverterFactory +import kotlin.random.Random + +class MainActivity : AppCompatActivity() { + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val nameInput = findViewById(R.id.nameInput) + val btnFindJob = findViewById