diff --git a/ActionEveryMinute/app/src/test/java/algokelvin/app/actioneveryminute/ExampleUnitTest.kt b/ActionEveryMinute/app/src/test/java/algokelvin/app/actioneveryminute/ExampleUnitTest.kt
deleted file mode 100644
index 03ed9311..00000000
--- a/ActionEveryMinute/app/src/test/java/algokelvin/app/actioneveryminute/ExampleUnitTest.kt
+++ /dev/null
@@ -1,17 +0,0 @@
-package algokelvin.app.actioneveryminute
-
-import org.junit.Test
-
-import org.junit.Assert.*
-
-/**
- * Example local unit test, which will execute on the development machine (host).
- *
- * See [testing documentation](http://d.android.com/tools/testing).
- */
-class ExampleUnitTest {
- @Test
- fun addition_isCorrect() {
- assertEquals(4, 2 + 2)
- }
-}
\ No newline at end of file
diff --git a/ActionEveryMinute/app/src/test/java/com/algokelvin/actioneveryminute/ExampleUnitTest.kt b/ActionEveryMinute/app/src/test/java/com/algokelvin/actioneveryminute/ExampleUnitTest.kt
new file mode 100644
index 00000000..b89e7457
--- /dev/null
+++ b/ActionEveryMinute/app/src/test/java/com/algokelvin/actioneveryminute/ExampleUnitTest.kt
@@ -0,0 +1,17 @@
+package com.algokelvin.actioneveryminute
+
+import org.junit.Test
+
+import org.junit.Assert.*
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * See [testing documentation](http://d.android.com/tools/testing).
+ */
+class ExampleUnitTest {
+ @Test
+ fun addition_isCorrect() {
+ assertEquals(4, 2 + 2)
+ }
+}
\ No newline at end of file
diff --git a/ActionEveryMinute/build.gradle b/ActionEveryMinute/build.gradle
index d6f12259..5bec31d9 100644
--- a/ActionEveryMinute/build.gradle
+++ b/ActionEveryMinute/build.gradle
@@ -1,14 +1,5 @@
-buildscript {
- ext {
- agp_version = '8.5.0'
- }
-}// Top-level build file where you can add configuration options common to all sub-projects/modules.
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
- id 'com.android.application' version '8.5.0' apply false
- id 'com.android.library' version '7.2.2' apply false
- id 'org.jetbrains.kotlin.android' version '1.7.10' apply false
-}
-
-task clean(type: Delete) {
- delete rootProject.buildDir
+alias(libs.plugins.android.application) apply false
+ alias(libs.plugins.kotlin.android) apply false
}
\ No newline at end of file
diff --git a/ActionEveryMinute/documentation/SS01_ActionEveryMinute.jpg b/ActionEveryMinute/documentation/SS01_ActionEveryMinute.jpg
deleted file mode 100644
index 29bb621a..00000000
Binary files a/ActionEveryMinute/documentation/SS01_ActionEveryMinute.jpg and /dev/null differ
diff --git a/ActionEveryMinute/documentation/SS02_ActionEveryMinute.jpg b/ActionEveryMinute/documentation/SS02_ActionEveryMinute.jpg
deleted file mode 100644
index b966112e..00000000
Binary files a/ActionEveryMinute/documentation/SS02_ActionEveryMinute.jpg and /dev/null differ
diff --git a/ActionEveryMinute/documentation/SS03_ActionEveryMinute.jpg b/ActionEveryMinute/documentation/SS03_ActionEveryMinute.jpg
deleted file mode 100644
index 3c689693..00000000
Binary files a/ActionEveryMinute/documentation/SS03_ActionEveryMinute.jpg and /dev/null differ
diff --git a/ActionEveryMinute/gradle.properties b/ActionEveryMinute/gradle.properties
index cd0519bb..20e2a015 100644
--- a/ActionEveryMinute/gradle.properties
+++ b/ActionEveryMinute/gradle.properties
@@ -8,11 +8,11 @@
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
-# This option should only be used with decoupled projects. More details, visit
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# This option should only be used with decoupled projects. For more details, visit
+# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
-# Android operating system, and which are packaged with your app"s APK
+# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Kotlin code style for this project: "official" or "obsolete":
diff --git a/ActionEveryMinute/gradle/libs.versions.toml b/ActionEveryMinute/gradle/libs.versions.toml
new file mode 100644
index 00000000..4fa6cca6
--- /dev/null
+++ b/ActionEveryMinute/gradle/libs.versions.toml
@@ -0,0 +1,26 @@
+[versions]
+agp = "8.10.1"
+kotlin = "2.0.21"
+coreKtx = "1.16.0"
+junit = "4.13.2"
+junitVersion = "1.3.0"
+espressoCore = "3.7.0"
+appcompat = "1.7.1"
+material = "1.12.0"
+activity = "1.10.1"
+constraintlayout = "2.2.1"
+
+[libraries]
+androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
+junit = { group = "junit", name = "junit", version.ref = "junit" }
+androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
+androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
+androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
+material = { group = "com.google.android.material", name = "material", version.ref = "material" }
+androidx-activity = { group = "androidx.activity", name = "activity", version.ref = "activity" }
+androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
+
+[plugins]
+android-application = { id = "com.android.application", version.ref = "agp" }
+kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
+
diff --git a/ActionEveryMinute/gradle/wrapper/gradle-wrapper.properties b/ActionEveryMinute/gradle/wrapper/gradle-wrapper.properties
index 21b2aa22..b897521d 100644
--- a/ActionEveryMinute/gradle/wrapper/gradle-wrapper.properties
+++ b/ActionEveryMinute/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Sun Feb 23 12:27:38 WIB 2025
+#Sat Sep 06 15:13:43 WIB 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/ActionEveryMinute/settings.gradle b/ActionEveryMinute/settings.gradle
index 924062a4..31bb4e6f 100644
--- a/ActionEveryMinute/settings.gradle
+++ b/ActionEveryMinute/settings.gradle
@@ -1,8 +1,14 @@
pluginManagement {
repositories {
- gradlePluginPortal()
- google()
+ google {
+ content {
+ includeGroupByRegex("com\\.android.*")
+ includeGroupByRegex("com\\.google.*")
+ includeGroupByRegex("androidx.*")
+ }
+ }
mavenCentral()
+ gradlePluginPortal()
}
}
dependencyResolutionManagement {
@@ -12,5 +18,6 @@ dependencyResolutionManagement {
mavenCentral()
}
}
+
rootProject.name = "ActionEveryMinute"
include ':app'
diff --git a/AnimationApp/.gitignore b/Animation/.gitignore
similarity index 100%
rename from AnimationApp/.gitignore
rename to Animation/.gitignore
diff --git a/Animation/README.md b/Animation/README.md
new file mode 100644
index 00000000..d9546936
--- /dev/null
+++ b/Animation/README.md
@@ -0,0 +1,4 @@
+# Animation
+
+--- VERSION ---
+- 1.0.0 : Create APK Project
\ No newline at end of file
diff --git a/AnimationApp/animator-featuring/.gitignore b/Animation/app/.gitignore
similarity index 100%
rename from AnimationApp/animator-featuring/.gitignore
rename to Animation/app/.gitignore
diff --git a/Animation/app/build.gradle b/Animation/app/build.gradle
new file mode 100644
index 00000000..fca2611b
--- /dev/null
+++ b/Animation/app/build.gradle
@@ -0,0 +1,48 @@
+plugins {
+ alias(libs.plugins.android.application)
+ alias(libs.plugins.kotlin.android)
+}
+
+android {
+ namespace 'com.algokelvin.animation'
+ compileSdk 36
+
+ defaultConfig {
+ applicationId "com.algokelvin.animation"
+ minSdk 24
+ targetSdk 36
+ versionCode 1
+ versionName "1.0.0"
+
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ }
+
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+ }
+ }
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_11
+ targetCompatibility JavaVersion.VERSION_11
+ }
+ kotlinOptions {
+ jvmTarget = '11'
+ }
+ buildFeatures {
+ viewBinding = true
+ }
+}
+
+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/AnimationApp/animator-featuring/proguard-rules.pro b/Animation/app/proguard-rules.pro
similarity index 100%
rename from AnimationApp/animator-featuring/proguard-rules.pro
rename to Animation/app/proguard-rules.pro
diff --git a/Animation/app/src/androidTest/java/com/algokelvin/animation/ExampleInstrumentedTest.kt b/Animation/app/src/androidTest/java/com/algokelvin/animation/ExampleInstrumentedTest.kt
new file mode 100644
index 00000000..954c6d36
--- /dev/null
+++ b/Animation/app/src/androidTest/java/com/algokelvin/animation/ExampleInstrumentedTest.kt
@@ -0,0 +1,24 @@
+package com.algokelvin.animation
+
+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.algokelvin.animation", appContext.packageName)
+ }
+}
\ No newline at end of file
diff --git a/Animation/app/src/main/AndroidManifest.xml b/Animation/app/src/main/AndroidManifest.xml
new file mode 100644
index 00000000..572ce507
--- /dev/null
+++ b/Animation/app/src/main/AndroidManifest.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Animation/app/src/main/ic_launcher-playstore.png b/Animation/app/src/main/ic_launcher-playstore.png
new file mode 100644
index 00000000..afeecb3b
Binary files /dev/null and b/Animation/app/src/main/ic_launcher-playstore.png differ
diff --git a/AnimationApp/animator-featuring/src/main/java/algokelvin/app/animatorfeaturing/AnimatorController.java b/Animation/app/src/main/java/com/algokelvin/animation/AnimatorController.java
similarity index 79%
rename from AnimationApp/animator-featuring/src/main/java/algokelvin/app/animatorfeaturing/AnimatorController.java
rename to Animation/app/src/main/java/com/algokelvin/animation/AnimatorController.java
index 89c89cd9..f490bddf 100644
--- a/AnimationApp/animator-featuring/src/main/java/algokelvin/app/animatorfeaturing/AnimatorController.java
+++ b/Animation/app/src/main/java/com/algokelvin/animation/AnimatorController.java
@@ -1,11 +1,9 @@
-package algokelvin.app.animatorfeaturing;
+package com.algokelvin.animation;
import android.animation.ObjectAnimator;
import android.widget.TextView;
public class AnimatorController {
- public static final String TRANSLATE_X = "translationX";
-
private ObjectAnimator animator;
public void animatorTextView(TextView idText, String animation, float coordinate, int duration) {
diff --git a/Animation/app/src/main/java/com/algokelvin/animation/MainActivity.kt b/Animation/app/src/main/java/com/algokelvin/animation/MainActivity.kt
new file mode 100644
index 00000000..439c0ae5
--- /dev/null
+++ b/Animation/app/src/main/java/com/algokelvin/animation/MainActivity.kt
@@ -0,0 +1,20 @@
+package com.algokelvin.animation
+
+import android.content.Intent
+import android.os.Bundle
+import androidx.appcompat.app.AppCompatActivity
+import com.algokelvin.animation.databinding.ActivityMainBinding
+
+class MainActivity : AppCompatActivity() {
+ private lateinit var binding: ActivityMainBinding
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ binding = ActivityMainBinding.inflate(layoutInflater)
+ setContentView(binding.root)
+
+ binding.btnTranslation.setOnClickListener {
+ startActivity(Intent(this, MenuTranslation::class.java))
+ }
+ }
+}
\ No newline at end of file
diff --git a/Animation/app/src/main/java/com/algokelvin/animation/MenuTranslation.kt b/Animation/app/src/main/java/com/algokelvin/animation/MenuTranslation.kt
new file mode 100644
index 00000000..a56d2b9b
--- /dev/null
+++ b/Animation/app/src/main/java/com/algokelvin/animation/MenuTranslation.kt
@@ -0,0 +1,25 @@
+package com.algokelvin.animation
+
+import android.content.Intent
+import android.os.Bundle
+import androidx.appcompat.app.AppCompatActivity
+import com.algokelvin.animation.databinding.ActivityMenuTranslationBinding
+import com.algokelvin.animation.translation.TranslationOne
+import com.algokelvin.animation.translation.TranslationTwo
+
+class MenuTranslation : AppCompatActivity() {
+ private lateinit var binding: ActivityMenuTranslationBinding
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ binding = ActivityMenuTranslationBinding.inflate(layoutInflater)
+ setContentView(binding.root)
+
+ binding.translation01.setOnClickListener {
+ startActivity(Intent(this, TranslationOne::class.java))
+ }
+ binding.translation02.setOnClickListener {
+ startActivity(Intent(this, TranslationTwo::class.java))
+ }
+ }
+}
\ No newline at end of file
diff --git a/Animation/app/src/main/java/com/algokelvin/animation/translation/TranslationOne.kt b/Animation/app/src/main/java/com/algokelvin/animation/translation/TranslationOne.kt
new file mode 100644
index 00000000..dfdeee2d
--- /dev/null
+++ b/Animation/app/src/main/java/com/algokelvin/animation/translation/TranslationOne.kt
@@ -0,0 +1,24 @@
+package com.algokelvin.animation.translation
+
+import android.os.Bundle
+import androidx.appcompat.app.AppCompatActivity
+import com.algokelvin.animation.AnimatorController
+import com.algokelvin.animation.databinding.ActivityTranslationOneBinding
+
+class TranslationOne : AppCompatActivity() {
+
+ private lateinit var binding: ActivityTranslationOneBinding
+ private val animatorController = AnimatorController()
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ binding = ActivityTranslationOneBinding.inflate(layoutInflater)
+ setContentView(binding.root)
+
+ /*
+ Make TextView translate X to coordinate 200 with duration 2 seconds.
+ This method use the module 'animator-featuring'
+ */
+ animatorController.animatorTextView(binding.txtHello, "translationX", 200f, 2000)
+ }
+}
\ No newline at end of file
diff --git a/Animation/app/src/main/java/com/algokelvin/animation/translation/TranslationTwo.kt b/Animation/app/src/main/java/com/algokelvin/animation/translation/TranslationTwo.kt
new file mode 100644
index 00000000..ab048228
--- /dev/null
+++ b/Animation/app/src/main/java/com/algokelvin/animation/translation/TranslationTwo.kt
@@ -0,0 +1,23 @@
+package com.algokelvin.animation.translation
+
+import android.os.Bundle
+import androidx.appcompat.app.AppCompatActivity
+import com.algokelvin.animation.AnimatorController
+import com.algokelvin.animation.databinding.ActivityTranslationOneBinding
+
+class TranslationTwo : AppCompatActivity() {
+ private lateinit var binding: ActivityTranslationOneBinding
+ private val animatorController = AnimatorController()
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ binding = ActivityTranslationOneBinding.inflate(layoutInflater)
+ setContentView(binding.root)
+
+ /*
+ Make TextView translate X to coordinate -200 with duration 1 seconds.
+ This method use the module 'animator-featuring'
+ */
+ animatorController.animatorTextView(binding.txtHello, "translationX", -200f, 1000)
+ }
+}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/res/drawable/ic_shopping_yuk_background.xml b/Animation/app/src/main/res/drawable/ic_launcher_background.xml
similarity index 100%
rename from ECommerce/app/src/main/res/drawable/ic_shopping_yuk_background.xml
rename to Animation/app/src/main/res/drawable/ic_launcher_background.xml
diff --git a/AnimationApp/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/Animation/app/src/main/res/drawable/ic_launcher_foreground.xml
similarity index 100%
rename from AnimationApp/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
rename to Animation/app/src/main/res/drawable/ic_launcher_foreground.xml
diff --git a/AnimationApp/app/src/main/res/layout/activity_main.xml b/Animation/app/src/main/res/layout/activity_main.xml
similarity index 100%
rename from AnimationApp/app/src/main/res/layout/activity_main.xml
rename to Animation/app/src/main/res/layout/activity_main.xml
diff --git a/AnimationApp/app/src/main/res/layout/activity_menu_translation.xml b/Animation/app/src/main/res/layout/activity_menu_translation.xml
similarity index 100%
rename from AnimationApp/app/src/main/res/layout/activity_menu_translation.xml
rename to Animation/app/src/main/res/layout/activity_menu_translation.xml
diff --git a/AnimationApp/app/src/main/res/layout/activity_translation_one.xml b/Animation/app/src/main/res/layout/activity_translation_one.xml
similarity index 100%
rename from AnimationApp/app/src/main/res/layout/activity_translation_one.xml
rename to Animation/app/src/main/res/layout/activity_translation_one.xml
diff --git a/Animation/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/Animation/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 00000000..c4a603d4
--- /dev/null
+++ b/Animation/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/Animation/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/Animation/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
new file mode 100644
index 00000000..c4a603d4
--- /dev/null
+++ b/Animation/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/Animation/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/Animation/app/src/main/res/mipmap-hdpi/ic_launcher.webp
new file mode 100644
index 00000000..1f4c0d01
Binary files /dev/null and b/Animation/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ
diff --git a/Animation/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp b/Animation/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..7b289835
Binary files /dev/null and b/Animation/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp differ
diff --git a/Animation/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/Animation/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
new file mode 100644
index 00000000..1a6ccc46
Binary files /dev/null and b/Animation/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ
diff --git a/Animation/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/Animation/app/src/main/res/mipmap-mdpi/ic_launcher.webp
new file mode 100644
index 00000000..559e666e
Binary files /dev/null and b/Animation/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ
diff --git a/Animation/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp b/Animation/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..cd0a7975
Binary files /dev/null and b/Animation/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp differ
diff --git a/Animation/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/Animation/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
new file mode 100644
index 00000000..617fd9ea
Binary files /dev/null and b/Animation/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ
diff --git a/Animation/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/Animation/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
new file mode 100644
index 00000000..5efb6422
Binary files /dev/null and b/Animation/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ
diff --git a/Animation/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp b/Animation/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..bcae5e61
Binary files /dev/null and b/Animation/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp differ
diff --git a/Animation/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/Animation/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
new file mode 100644
index 00000000..0cb98685
Binary files /dev/null and b/Animation/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ
diff --git a/Animation/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/Animation/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
new file mode 100644
index 00000000..ee8d549c
Binary files /dev/null and b/Animation/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ
diff --git a/Animation/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp b/Animation/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..f8f8d033
Binary files /dev/null and b/Animation/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp differ
diff --git a/Animation/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/Animation/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
new file mode 100644
index 00000000..ef80d15c
Binary files /dev/null and b/Animation/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ
diff --git a/Animation/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/Animation/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
new file mode 100644
index 00000000..b4e0005b
Binary files /dev/null and b/Animation/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ
diff --git a/Animation/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp b/Animation/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..fed1a6c4
Binary files /dev/null and b/Animation/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp differ
diff --git a/Animation/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/Animation/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
new file mode 100644
index 00000000..31b5df0a
Binary files /dev/null and b/Animation/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ
diff --git a/Animation/app/src/main/res/values-night/themes.xml b/Animation/app/src/main/res/values-night/themes.xml
new file mode 100644
index 00000000..b8ed727b
--- /dev/null
+++ b/Animation/app/src/main/res/values-night/themes.xml
@@ -0,0 +1,7 @@
+
+
+
+
\ No newline at end of file
diff --git a/ImageText/app/src/main/res/values/colors.xml b/Animation/app/src/main/res/values/colors.xml
similarity index 100%
rename from ImageText/app/src/main/res/values/colors.xml
rename to Animation/app/src/main/res/values/colors.xml
diff --git a/Animation/app/src/main/res/values/strings.xml b/Animation/app/src/main/res/values/strings.xml
new file mode 100644
index 00000000..3200b201
--- /dev/null
+++ b/Animation/app/src/main/res/values/strings.xml
@@ -0,0 +1,7 @@
+
+ Animation
+ Hello Translation Part01
+ Translation
+ Translation01
+ Translation02
+
\ No newline at end of file
diff --git a/Animation/app/src/main/res/values/themes.xml b/Animation/app/src/main/res/values/themes.xml
new file mode 100644
index 00000000..af5291c6
--- /dev/null
+++ b/Animation/app/src/main/res/values/themes.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Animation/app/src/main/res/xml/backup_rules.xml b/Animation/app/src/main/res/xml/backup_rules.xml
new file mode 100644
index 00000000..4df92558
--- /dev/null
+++ b/Animation/app/src/main/res/xml/backup_rules.xml
@@ -0,0 +1,13 @@
+
+
+
+
\ No newline at end of file
diff --git a/BirthdayCardCompose/app/src/main/res/xml/data_extraction_rules.xml b/Animation/app/src/main/res/xml/data_extraction_rules.xml
similarity index 100%
rename from BirthdayCardCompose/app/src/main/res/xml/data_extraction_rules.xml
rename to Animation/app/src/main/res/xml/data_extraction_rules.xml
diff --git a/Animation/app/src/test/java/com/algokelvin/animation/ExampleUnitTest.kt b/Animation/app/src/test/java/com/algokelvin/animation/ExampleUnitTest.kt
new file mode 100644
index 00000000..b66c4917
--- /dev/null
+++ b/Animation/app/src/test/java/com/algokelvin/animation/ExampleUnitTest.kt
@@ -0,0 +1,17 @@
+package com.algokelvin.animation
+
+import org.junit.Test
+
+import org.junit.Assert.*
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * See [testing documentation](http://d.android.com/tools/testing).
+ */
+class ExampleUnitTest {
+ @Test
+ fun addition_isCorrect() {
+ assertEquals(4, 2 + 2)
+ }
+}
\ No newline at end of file
diff --git a/Animation/build.gradle b/Animation/build.gradle
new file mode 100644
index 00000000..5bec31d9
--- /dev/null
+++ b/Animation/build.gradle
@@ -0,0 +1,5 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+plugins {
+alias(libs.plugins.android.application) apply false
+ alias(libs.plugins.kotlin.android) apply false
+}
\ No newline at end of file
diff --git a/CalculatorCompose/gradle.properties b/Animation/gradle.properties
similarity index 100%
rename from CalculatorCompose/gradle.properties
rename to Animation/gradle.properties
diff --git a/Animation/gradle/libs.versions.toml b/Animation/gradle/libs.versions.toml
new file mode 100644
index 00000000..6b7dabb4
--- /dev/null
+++ b/Animation/gradle/libs.versions.toml
@@ -0,0 +1,26 @@
+[versions]
+agp = "8.10.1"
+kotlin = "2.0.21"
+coreKtx = "1.17.0"
+junit = "4.13.2"
+junitVersion = "1.3.0"
+espressoCore = "3.7.0"
+appcompat = "1.7.1"
+material = "1.13.0"
+activity = "1.10.1"
+constraintlayout = "2.2.1"
+
+[libraries]
+androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
+junit = { group = "junit", name = "junit", version.ref = "junit" }
+androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
+androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
+androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
+material = { group = "com.google.android.material", name = "material", version.ref = "material" }
+androidx-activity = { group = "androidx.activity", name = "activity", version.ref = "activity" }
+androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
+
+[plugins]
+android-application = { id = "com.android.application", version.ref = "agp" }
+kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
+
diff --git a/BirthdayCardCompose/gradle/wrapper/gradle-wrapper.jar b/Animation/gradle/wrapper/gradle-wrapper.jar
similarity index 100%
rename from BirthdayCardCompose/gradle/wrapper/gradle-wrapper.jar
rename to Animation/gradle/wrapper/gradle-wrapper.jar
diff --git a/Animation/gradle/wrapper/gradle-wrapper.properties b/Animation/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 00000000..c58c4e99
--- /dev/null
+++ b/Animation/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Sat Sep 06 15:57:30 WIB 2025
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/BirthdayCardCompose/gradlew b/Animation/gradlew
similarity index 100%
rename from BirthdayCardCompose/gradlew
rename to Animation/gradlew
diff --git a/BirthdayCardCompose/gradlew.bat b/Animation/gradlew.bat
similarity index 100%
rename from BirthdayCardCompose/gradlew.bat
rename to Animation/gradlew.bat
diff --git a/Animation/settings.gradle b/Animation/settings.gradle
new file mode 100644
index 00000000..72d23597
--- /dev/null
+++ b/Animation/settings.gradle
@@ -0,0 +1,23 @@
+pluginManagement {
+ repositories {
+ google {
+ content {
+ includeGroupByRegex("com\\.android.*")
+ includeGroupByRegex("com\\.google.*")
+ includeGroupByRegex("androidx.*")
+ }
+ }
+ mavenCentral()
+ gradlePluginPortal()
+ }
+}
+dependencyResolutionManagement {
+ repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
+ repositories {
+ google()
+ mavenCentral()
+ }
+}
+
+rootProject.name = "Animation"
+include ':app'
diff --git a/AnimationApp/README.md b/AnimationApp/README.md
deleted file mode 100644
index 5b1e9b71..00000000
--- a/AnimationApp/README.md
+++ /dev/null
@@ -1,41 +0,0 @@
-## Animation Application
-
-Aplikasi Android Sederhana - Animationn TextView
-
-|  |
-|:------------------------------------------------:|
-| Gambar 1:
Action Animation |
-
-## Implementation
-- Object Animator
-- Modularization
-- Java Code
-
-## Environment
-- **Android Gradle**: 8.5.0
-- **Plugins Version**: 8.7
-- **Gradle Version**: 8.0
-- **Java JDK**: 17
-- **Kotlin Version**: 1.9.0
-- **Min SDK**: 21
-- **Target SDK**: 34
-
-## Contributors
-Thanks all contributors for build this repository
-
-```
-Copyright [2021] [The Dictionary of Android Projects]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-```
diff --git a/AnimationApp/animator-featuring/build.gradle b/AnimationApp/animator-featuring/build.gradle
deleted file mode 100644
index f7b16a9d..00000000
--- a/AnimationApp/animator-featuring/build.gradle
+++ /dev/null
@@ -1,35 +0,0 @@
-plugins {
- id 'com.android.library'
-}
-
-android {
- compileSdkVersion 31
- buildToolsVersion "30.0.3"
-
- defaultConfig {
- minSdkVersion 16
- targetSdkVersion 31
- versionCode 1
- versionName "1.0"
-
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- consumerProguardFiles "consumer-rules.pro"
- }
-
- 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.4.1'
-// implementation 'com.google.android.material:material:1.5.0'
- implementation 'com.google.android.material:material:1.5.0@aar'
-}
\ No newline at end of file
diff --git a/AnimationApp/animator-featuring/consumer-rules.pro b/AnimationApp/animator-featuring/consumer-rules.pro
deleted file mode 100644
index e69de29b..00000000
diff --git a/AnimationApp/animator-featuring/src/main/AndroidManifest.xml b/AnimationApp/animator-featuring/src/main/AndroidManifest.xml
deleted file mode 100644
index 4917ea8d..00000000
--- a/AnimationApp/animator-featuring/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
\ No newline at end of file
diff --git a/AnimationApp/app/build.gradle b/AnimationApp/app/build.gradle
deleted file mode 100644
index cdc74407..00000000
--- a/AnimationApp/app/build.gradle
+++ /dev/null
@@ -1,43 +0,0 @@
-plugins {
- id 'com.android.application'
- id 'kotlin-android'
- id 'kotlin-android-extensions'
-}
-
-android {
- compileSdkVersion 30
- buildToolsVersion "30.0.3"
-
- defaultConfig {
- applicationId "com.algokelvin.animationandroid"
- minSdkVersion 16
- 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
- }
- kotlinOptions {
- jvmTarget = '1.8'
- }
-}
-
-dependencies {
- implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
- implementation 'androidx.core:core-ktx:1.3.2'
- implementation 'androidx.appcompat:appcompat:1.2.0'
- implementation 'com.google.android.material:material:1.3.0'
- implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
- implementation project(':animator-featuring')
-}
\ No newline at end of file
diff --git a/AnimationApp/app/src/main/AndroidManifest.xml b/AnimationApp/app/src/main/AndroidManifest.xml
deleted file mode 100644
index 84ba52d4..00000000
--- a/AnimationApp/app/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/AnimationApp/app/src/main/java/com/algokelvin/animationandroid/MainActivity.kt b/AnimationApp/app/src/main/java/com/algokelvin/animationandroid/MainActivity.kt
deleted file mode 100644
index 231963d9..00000000
--- a/AnimationApp/app/src/main/java/com/algokelvin/animationandroid/MainActivity.kt
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.algokelvin.animationandroid
-
-import android.content.Intent
-import android.os.Bundle
-import androidx.appcompat.app.AppCompatActivity
-import kotlinx.android.synthetic.main.activity_main.*
-
-class MainActivity : AppCompatActivity() {
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- setContentView(R.layout.activity_main)
-
- btnTranslation.setOnClickListener {
- startActivity(Intent(this, MenuTranslation::class.java))
- }
- }
-}
\ No newline at end of file
diff --git a/AnimationApp/app/src/main/java/com/algokelvin/animationandroid/MenuTranslation.kt b/AnimationApp/app/src/main/java/com/algokelvin/animationandroid/MenuTranslation.kt
deleted file mode 100644
index 98cb5828..00000000
--- a/AnimationApp/app/src/main/java/com/algokelvin/animationandroid/MenuTranslation.kt
+++ /dev/null
@@ -1,22 +0,0 @@
-package com.algokelvin.animationandroid
-
-import android.content.Intent
-import android.os.Bundle
-import androidx.appcompat.app.AppCompatActivity
-import com.algokelvin.animationandroid.translation.TranslationOne
-import com.algokelvin.animationandroid.translation.TranslationTwo
-import kotlinx.android.synthetic.main.activity_menu_translation.*
-
-class MenuTranslation : AppCompatActivity() {
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- setContentView(R.layout.activity_menu_translation)
-
- translation01.setOnClickListener {
- startActivity(Intent(this, TranslationOne::class.java))
- }
- translation02.setOnClickListener {
- startActivity(Intent(this, TranslationTwo::class.java))
- }
- }
-}
\ No newline at end of file
diff --git a/AnimationApp/app/src/main/java/com/algokelvin/animationandroid/translation/TranslationOne.kt b/AnimationApp/app/src/main/java/com/algokelvin/animationandroid/translation/TranslationOne.kt
deleted file mode 100644
index 0a713904..00000000
--- a/AnimationApp/app/src/main/java/com/algokelvin/animationandroid/translation/TranslationOne.kt
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.algokelvin.animationandroid.translation
-
-import android.os.Bundle
-import androidx.appcompat.app.AppCompatActivity
-import com.algokelvin.animationandroid.R
-import algokelvin.app.animatorfeaturing.AnimatorController.TRANSLATE_X
-import kotlinx.android.synthetic.main.activity_translation_one.*
-
-class TranslationOne : AppCompatActivity() {
-
- private val animatorController = algokelvin.app.animatorfeaturing.AnimatorController()
-
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- setContentView(R.layout.activity_translation_one)
-
- /*
- Make TextView translate X to coordinate 200 with duration 2 seconds.
- This method use the module 'animator-featuring'
- */
- animatorController.animatorTextView(txt_hello, TRANSLATE_X, 200f, 2000)
- }
-}
\ No newline at end of file
diff --git a/AnimationApp/app/src/main/java/com/algokelvin/animationandroid/translation/TranslationTwo.kt b/AnimationApp/app/src/main/java/com/algokelvin/animationandroid/translation/TranslationTwo.kt
deleted file mode 100644
index 195644eb..00000000
--- a/AnimationApp/app/src/main/java/com/algokelvin/animationandroid/translation/TranslationTwo.kt
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.algokelvin.animationandroid.translation
-
-import android.os.Bundle
-import androidx.appcompat.app.AppCompatActivity
-import com.algokelvin.animationandroid.R
-import algokelvin.app.animatorfeaturing.AnimatorController.TRANSLATE_X
-import kotlinx.android.synthetic.main.activity_translation_one.*
-
-class TranslationTwo : AppCompatActivity() {
-
- private val animatorController = algokelvin.app.animatorfeaturing.AnimatorController()
-
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- setContentView(R.layout.activity_translation_one)
-
- /*
- Make TextView translate X to coordinate -200 with duration 1 seconds.
- This method use the module 'animator-featuring'
- */
- animatorController.animatorTextView(txt_hello, TRANSLATE_X, -200f, 1000)
- }
-}
\ No newline at end of file
diff --git a/AnimationApp/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/AnimationApp/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
deleted file mode 100644
index eca70cfe..00000000
--- a/AnimationApp/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/AnimationApp/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/AnimationApp/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
deleted file mode 100644
index eca70cfe..00000000
--- a/AnimationApp/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/AnimationApp/app/src/main/res/mipmap-hdpi/ic_launcher.png b/AnimationApp/app/src/main/res/mipmap-hdpi/ic_launcher.png
deleted file mode 100644
index a571e600..00000000
Binary files a/AnimationApp/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ
diff --git a/AnimationApp/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/AnimationApp/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
deleted file mode 100644
index 61da551c..00000000
Binary files a/AnimationApp/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and /dev/null differ
diff --git a/AnimationApp/app/src/main/res/mipmap-mdpi/ic_launcher.png b/AnimationApp/app/src/main/res/mipmap-mdpi/ic_launcher.png
deleted file mode 100644
index c41dd285..00000000
Binary files a/AnimationApp/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ
diff --git a/AnimationApp/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/AnimationApp/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
deleted file mode 100644
index db5080a7..00000000
Binary files a/AnimationApp/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and /dev/null differ
diff --git a/AnimationApp/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/AnimationApp/app/src/main/res/mipmap-xhdpi/ic_launcher.png
deleted file mode 100644
index 6dba46da..00000000
Binary files a/AnimationApp/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ
diff --git a/AnimationApp/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/AnimationApp/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
deleted file mode 100644
index da31a871..00000000
Binary files a/AnimationApp/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/AnimationApp/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/AnimationApp/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
deleted file mode 100644
index 15ac6817..00000000
Binary files a/AnimationApp/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ
diff --git a/AnimationApp/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/AnimationApp/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
deleted file mode 100644
index b216f2d3..00000000
Binary files a/AnimationApp/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/AnimationApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/AnimationApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
deleted file mode 100644
index f25a4197..00000000
Binary files a/AnimationApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ
diff --git a/AnimationApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/AnimationApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
deleted file mode 100644
index e96783cc..00000000
Binary files a/AnimationApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/AnimationApp/app/src/main/res/values-night/strings.xml b/AnimationApp/app/src/main/res/values-night/strings.xml
deleted file mode 100644
index 89ee6f45..00000000
--- a/AnimationApp/app/src/main/res/values-night/strings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
- Translation
- Translation02
-
\ No newline at end of file
diff --git a/AnimationApp/app/src/main/res/values-night/themes.xml b/AnimationApp/app/src/main/res/values-night/themes.xml
deleted file mode 100644
index de38918b..00000000
--- a/AnimationApp/app/src/main/res/values-night/themes.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/AnimationApp/app/src/main/res/values/strings.xml b/AnimationApp/app/src/main/res/values/strings.xml
deleted file mode 100644
index ca90650b..00000000
--- a/AnimationApp/app/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
- AnimationAndroid
- Hello Translation Part01
- Translation
- Translation01
- Translation02
-
\ No newline at end of file
diff --git a/AnimationApp/app/src/main/res/values/themes.xml b/AnimationApp/app/src/main/res/values/themes.xml
deleted file mode 100644
index 44354e03..00000000
--- a/AnimationApp/app/src/main/res/values/themes.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/AnimationApp/build.gradle b/AnimationApp/build.gradle
deleted file mode 100644
index 024b1f11..00000000
--- a/AnimationApp/build.gradle
+++ /dev/null
@@ -1,29 +0,0 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
-buildscript {
- ext {
- agp_version = '8.5.0'
- }
- ext.kotlin_version = "1.3.72"
- repositories {
- google()
- jcenter()
- }
- dependencies {
- classpath "com.android.tools.build:gradle:$agp_version"
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
-
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
- }
-}
-
-allprojects {
- repositories {
- google()
- jcenter()
- }
-}
-
-task clean(type: Delete) {
- delete rootProject.buildDir
-}
\ No newline at end of file
diff --git a/AnimationApp/documentation/SS_Animation_01.gif b/AnimationApp/documentation/SS_Animation_01.gif
deleted file mode 100644
index de9f741e..00000000
Binary files a/AnimationApp/documentation/SS_Animation_01.gif and /dev/null differ
diff --git a/AnimationApp/gradle.properties b/AnimationApp/gradle.properties
deleted file mode 100644
index 98bed167..00000000
--- a/AnimationApp/gradle.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-# Project-wide Gradle settings.
-# IDE (e.g. Android Studio) users:
-# Gradle settings configured through the IDE *will override*
-# any settings specified in this file.
-# For more details on how to configure your build environment visit
-# http://www.gradle.org/docs/current/userguide/build_environment.html
-# Specifies the JVM arguments used for the daemon process.
-# The setting is particularly useful for tweaking memory settings.
-org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
-# When configured, Gradle will run in incubating parallel mode.
-# This option should only be used with decoupled projects. More details, visit
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
-# org.gradle.parallel=true
-# AndroidX package structure to make it clearer which packages are bundled with the
-# Android operating system, and which are packaged with your app"s APK
-# https://developer.android.com/topic/libraries/support-library/androidx-rn
-android.useAndroidX=true
-# Automatically convert third-party libraries to use AndroidX
-android.enableJetifier=true
-# Kotlin code style for this project: "official" or "obsolete":
-kotlin.code.style=official
\ No newline at end of file
diff --git a/AnimationApp/gradle/wrapper/gradle-wrapper.properties b/AnimationApp/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index fbd24241..00000000
--- a/AnimationApp/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Sun Feb 23 12:28:57 WIB 2025
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
diff --git a/AnimationApp/settings.gradle b/AnimationApp/settings.gradle
deleted file mode 100644
index a19055f5..00000000
--- a/AnimationApp/settings.gradle
+++ /dev/null
@@ -1,3 +0,0 @@
-include ':app'
-rootProject.name = "AnimationAndroid"
-include ':animator-featuring'
\ No newline at end of file
diff --git a/BirthdayCardCompose/README.md b/BirthdayCardCompose/README.md
deleted file mode 100644
index 4932ecce..00000000
--- a/BirthdayCardCompose/README.md
+++ /dev/null
@@ -1,37 +0,0 @@
-## Birthday Card Compose
-
-|  |
-|:------------------------------------------------:|
-| Gambar 1:
Card Birthday |
-
-## Implementation
-- Jetpack Compose Android
-
-## Environment
-- **Android Gradle**: 8.5.0
-- **Plugins Version**: 8.7
-- **Gradle Version**: 8.0
-- **Java JDK**: 17
-- **Kotlin Version**: 1.9.0
-- **Min SDK**: 21
-- **Target SDK**: 34
-
-## Contributors
-Thanks all contributors for build this repository
-
-```
-Copyright [2021] [The Dictionary of Android Projects]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-```
diff --git a/BirthdayCardCompose/app/build.gradle b/BirthdayCardCompose/app/build.gradle
deleted file mode 100644
index 7c5d6eea..00000000
--- a/BirthdayCardCompose/app/build.gradle
+++ /dev/null
@@ -1,62 +0,0 @@
-plugins {
- id 'com.android.application'
- id 'org.jetbrains.kotlin.android'
-}
-
-android {
- compileSdk 32
-
- defaultConfig {
- applicationId "kelvinht.app.birthdaycard"
- minSdk 21
- targetSdk 32
- versionCode 1
- versionName "1.0"
-
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- vectorDrawables {
- useSupportLibrary true
- }
- }
-
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- }
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- kotlinOptions {
- jvmTarget = '1.8'
- }
- buildFeatures {
- compose true
- }
- composeOptions {
- kotlinCompilerExtensionVersion compose_version
- }
- packagingOptions {
- resources {
- excludes += '/META-INF/{AL2.0,LGPL2.1}'
- }
- }
-}
-
-dependencies {
-
- implementation 'androidx.core:core-ktx:1.7.0'
- implementation "androidx.compose.ui:ui:$compose_version"
- implementation "androidx.compose.material:material:$compose_version"
- implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
- implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
- implementation 'androidx.activity:activity-compose:1.3.1'
- testImplementation 'junit:junit:4.13.2'
- androidTestImplementation 'androidx.test.ext:junit:1.1.3'
- androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
- androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
- debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
- debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_version"
-}
\ No newline at end of file
diff --git a/BirthdayCardCompose/app/src/androidTest/java/kelvinht/app/birthdaycard/ExampleInstrumentedTest.kt b/BirthdayCardCompose/app/src/androidTest/java/kelvinht/app/birthdaycard/ExampleInstrumentedTest.kt
deleted file mode 100644
index b46bab22..00000000
--- a/BirthdayCardCompose/app/src/androidTest/java/kelvinht/app/birthdaycard/ExampleInstrumentedTest.kt
+++ /dev/null
@@ -1,24 +0,0 @@
-package kelvinht.app.birthdaycard
-
-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("kelvinht.app.birthdaycard", appContext.packageName)
- }
-}
\ No newline at end of file
diff --git a/BirthdayCardCompose/app/src/main/AndroidManifest.xml b/BirthdayCardCompose/app/src/main/AndroidManifest.xml
deleted file mode 100644
index e8420fed..00000000
--- a/BirthdayCardCompose/app/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/BirthdayCardCompose/app/src/main/java/kelvinht/app/birthdaycard/MainActivity.kt b/BirthdayCardCompose/app/src/main/java/kelvinht/app/birthdaycard/MainActivity.kt
deleted file mode 100644
index 4c828b5d..00000000
--- a/BirthdayCardCompose/app/src/main/java/kelvinht/app/birthdaycard/MainActivity.kt
+++ /dev/null
@@ -1,74 +0,0 @@
-package kelvinht.app.birthdaycard
-
-import android.os.Bundle
-import androidx.activity.ComponentActivity
-import androidx.activity.compose.setContent
-import androidx.compose.foundation.Image
-import androidx.compose.foundation.layout.*
-import androidx.compose.material.MaterialTheme
-import androidx.compose.material.Surface
-import androidx.compose.material.Text
-import androidx.compose.runtime.Composable
-import androidx.compose.ui.Alignment
-import androidx.compose.ui.Modifier
-import androidx.compose.ui.layout.ContentScale
-import androidx.compose.ui.res.painterResource
-import androidx.compose.ui.text.style.TextAlign
-import androidx.compose.ui.tooling.preview.Preview
-import androidx.compose.ui.unit.dp
-import androidx.compose.ui.unit.sp
-import kelvinht.app.birthdaycard.ui.theme.BirthdayCardTheme
-
-class MainActivity : ComponentActivity() {
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- setContent {
- DefaultPreview()
- }
- }
-}
-
-@Composable
-fun BirthdayGreeting(name: String, from: String) {
- Box {
- val image = painterResource(R.drawable.androidparty)
- Image(
- painter = image,
- contentDescription = null,
- modifier = Modifier
- .fillMaxHeight()
- .fillMaxWidth(),
- contentScale = ContentScale.Crop
- )
- Column() {
- Text(
- text = "Happy Birthday $name",
- fontSize = 24.sp,
- textAlign = TextAlign.Center,
- modifier = Modifier
- .fillMaxWidth()
- .padding(16.dp)
- )
- Text(
- text = "from: $from",
- fontSize = 20.sp,
- textAlign = TextAlign.End,
- modifier = Modifier
- .fillMaxWidth()
- .fillMaxHeight()
- .wrapContentHeight(Alignment.Bottom)
- .padding(16.dp)
- )
- }
- }
-}
-
-@Preview(showBackground = true, showSystemUi = true)
-@Composable
-fun DefaultPreview() {
- BirthdayCardTheme {
- Surface(color = MaterialTheme.colors.background) {
- BirthdayGreeting("Kelvin Tandrio", "AlgoKelvin")
- }
- }
-}
\ No newline at end of file
diff --git a/BirthdayCardCompose/app/src/main/java/kelvinht/app/birthdaycard/ui/theme/Color.kt b/BirthdayCardCompose/app/src/main/java/kelvinht/app/birthdaycard/ui/theme/Color.kt
deleted file mode 100644
index 8b5cd3c8..00000000
--- a/BirthdayCardCompose/app/src/main/java/kelvinht/app/birthdaycard/ui/theme/Color.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package kelvinht.app.birthdaycard.ui.theme
-
-import androidx.compose.ui.graphics.Color
-
-val Purple200 = Color(0xFFBB86FC)
-val Purple500 = Color(0xFF6200EE)
-val Purple700 = Color(0xFF3700B3)
-val Teal200 = Color(0xFF03DAC5)
\ No newline at end of file
diff --git a/BirthdayCardCompose/app/src/main/java/kelvinht/app/birthdaycard/ui/theme/Shape.kt b/BirthdayCardCompose/app/src/main/java/kelvinht/app/birthdaycard/ui/theme/Shape.kt
deleted file mode 100644
index 72702f4b..00000000
--- a/BirthdayCardCompose/app/src/main/java/kelvinht/app/birthdaycard/ui/theme/Shape.kt
+++ /dev/null
@@ -1,11 +0,0 @@
-package kelvinht.app.birthdaycard.ui.theme
-
-import androidx.compose.foundation.shape.RoundedCornerShape
-import androidx.compose.material.Shapes
-import androidx.compose.ui.unit.dp
-
-val Shapes = Shapes(
- small = RoundedCornerShape(4.dp),
- medium = RoundedCornerShape(4.dp),
- large = RoundedCornerShape(0.dp)
-)
\ No newline at end of file
diff --git a/BirthdayCardCompose/app/src/main/java/kelvinht/app/birthdaycard/ui/theme/Theme.kt b/BirthdayCardCompose/app/src/main/java/kelvinht/app/birthdaycard/ui/theme/Theme.kt
deleted file mode 100644
index 4e29347e..00000000
--- a/BirthdayCardCompose/app/src/main/java/kelvinht/app/birthdaycard/ui/theme/Theme.kt
+++ /dev/null
@@ -1,44 +0,0 @@
-package kelvinht.app.birthdaycard.ui.theme
-
-import androidx.compose.foundation.isSystemInDarkTheme
-import androidx.compose.material.MaterialTheme
-import androidx.compose.material.darkColors
-import androidx.compose.material.lightColors
-import androidx.compose.runtime.Composable
-
-private val DarkColorPalette = darkColors(
- primary = Purple200,
- primaryVariant = Purple700,
- secondary = Teal200
-)
-
-private val LightColorPalette = lightColors(
- primary = Purple500,
- primaryVariant = Purple700,
- secondary = Teal200
-
- /* Other default colors to override
- background = Color.White,
- surface = Color.White,
- onPrimary = Color.White,
- onSecondary = Color.Black,
- onBackground = Color.Black,
- onSurface = Color.Black,
- */
-)
-
-@Composable
-fun BirthdayCardTheme(darkTheme: Boolean = isSystemInDarkTheme(), content: @Composable () -> Unit) {
- val colors = if (darkTheme) {
- DarkColorPalette
- } else {
- LightColorPalette
- }
-
- MaterialTheme(
- colors = colors,
- typography = Typography,
- shapes = Shapes,
- content = content
- )
-}
\ No newline at end of file
diff --git a/BirthdayCardCompose/app/src/main/java/kelvinht/app/birthdaycard/ui/theme/Type.kt b/BirthdayCardCompose/app/src/main/java/kelvinht/app/birthdaycard/ui/theme/Type.kt
deleted file mode 100644
index ee65c33a..00000000
--- a/BirthdayCardCompose/app/src/main/java/kelvinht/app/birthdaycard/ui/theme/Type.kt
+++ /dev/null
@@ -1,28 +0,0 @@
-package kelvinht.app.birthdaycard.ui.theme
-
-import androidx.compose.material.Typography
-import androidx.compose.ui.text.TextStyle
-import androidx.compose.ui.text.font.FontFamily
-import androidx.compose.ui.text.font.FontWeight
-import androidx.compose.ui.unit.sp
-
-// Set of Material typography styles to start with
-val Typography = Typography(
- body1 = TextStyle(
- fontFamily = FontFamily.Default,
- fontWeight = FontWeight.Normal,
- fontSize = 16.sp
- )
- /* Other default text styles to override
- button = TextStyle(
- fontFamily = FontFamily.Default,
- fontWeight = FontWeight.W500,
- fontSize = 14.sp
- ),
- caption = TextStyle(
- fontFamily = FontFamily.Default,
- fontWeight = FontWeight.Normal,
- fontSize = 12.sp
- )
- */
-)
\ No newline at end of file
diff --git a/BirthdayCardCompose/app/src/main/res/drawable-nodpi/androidparty.png b/BirthdayCardCompose/app/src/main/res/drawable-nodpi/androidparty.png
deleted file mode 100644
index 87124d65..00000000
Binary files a/BirthdayCardCompose/app/src/main/res/drawable-nodpi/androidparty.png and /dev/null differ
diff --git a/BirthdayCardCompose/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/BirthdayCardCompose/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
deleted file mode 100644
index eca70cfe..00000000
--- a/BirthdayCardCompose/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/BirthdayCardCompose/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/BirthdayCardCompose/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
deleted file mode 100644
index eca70cfe..00000000
--- a/BirthdayCardCompose/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/BirthdayCardCompose/app/src/main/res/values/strings.xml b/BirthdayCardCompose/app/src/main/res/values/strings.xml
deleted file mode 100644
index 6b663783..00000000
--- a/BirthdayCardCompose/app/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- BirthdayCard
-
\ No newline at end of file
diff --git a/BirthdayCardCompose/app/src/main/res/values/themes.xml b/BirthdayCardCompose/app/src/main/res/values/themes.xml
deleted file mode 100644
index 5d6c2dd8..00000000
--- a/BirthdayCardCompose/app/src/main/res/values/themes.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/BirthdayCardCompose/app/src/test/java/kelvinht/app/birthdaycard/ExampleUnitTest.kt b/BirthdayCardCompose/app/src/test/java/kelvinht/app/birthdaycard/ExampleUnitTest.kt
deleted file mode 100644
index 0d2cdf04..00000000
--- a/BirthdayCardCompose/app/src/test/java/kelvinht/app/birthdaycard/ExampleUnitTest.kt
+++ /dev/null
@@ -1,17 +0,0 @@
-package kelvinht.app.birthdaycard
-
-import org.junit.Test
-
-import org.junit.Assert.*
-
-/**
- * Example local unit test, which will execute on the development machine (host).
- *
- * See [testing documentation](http://d.android.com/tools/testing).
- */
-class ExampleUnitTest {
- @Test
- fun addition_isCorrect() {
- assertEquals(4, 2 + 2)
- }
-}
\ No newline at end of file
diff --git a/BirthdayCardCompose/build.gradle b/BirthdayCardCompose/build.gradle
deleted file mode 100644
index b2f37c82..00000000
--- a/BirthdayCardCompose/build.gradle
+++ /dev/null
@@ -1,15 +0,0 @@
-buildscript {
- ext {
- compose_version = '1.1.0-beta01'
- agp_version = '8.5.0'
- }
-}// Top-level build file where you can add configuration options common to all sub-projects/modules.
-plugins {
- id 'com.android.application' version '8.5.0' apply false
- id 'com.android.library' version '7.2.2' apply false
- id 'org.jetbrains.kotlin.android' version '1.5.31' apply false
-}
-
-task clean(type: Delete) {
- delete rootProject.buildDir
-}
\ No newline at end of file
diff --git a/BirthdayCardCompose/gradle.properties b/BirthdayCardCompose/gradle.properties
deleted file mode 100644
index cd0519bb..00000000
--- a/BirthdayCardCompose/gradle.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-# Project-wide Gradle settings.
-# IDE (e.g. Android Studio) users:
-# Gradle settings configured through the IDE *will override*
-# any settings specified in this file.
-# For more details on how to configure your build environment visit
-# http://www.gradle.org/docs/current/userguide/build_environment.html
-# Specifies the JVM arguments used for the daemon process.
-# The setting is particularly useful for tweaking memory settings.
-org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
-# When configured, Gradle will run in incubating parallel mode.
-# This option should only be used with decoupled projects. More details, visit
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
-# org.gradle.parallel=true
-# AndroidX package structure to make it clearer which packages are bundled with the
-# Android operating system, and which are packaged with your app"s APK
-# https://developer.android.com/topic/libraries/support-library/androidx-rn
-android.useAndroidX=true
-# Kotlin code style for this project: "official" or "obsolete":
-kotlin.code.style=official
-# Enables namespacing of each library's R class so that its R class includes only the
-# resources declared in the library itself and none from the library's dependencies,
-# thereby reducing the size of the R class for that library
-android.nonTransitiveRClass=true
\ No newline at end of file
diff --git a/BirthdayCardCompose/gradle/wrapper/gradle-wrapper.properties b/BirthdayCardCompose/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 133523e4..00000000
--- a/BirthdayCardCompose/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Mon Mar 10 13:40:38 WIB 2025
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
diff --git a/BirthdayCardCompose/settings.gradle b/BirthdayCardCompose/settings.gradle
deleted file mode 100644
index b18acd6e..00000000
--- a/BirthdayCardCompose/settings.gradle
+++ /dev/null
@@ -1,16 +0,0 @@
-pluginManagement {
- repositories {
- gradlePluginPortal()
- google()
- mavenCentral()
- }
-}
-dependencyResolutionManagement {
- repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
- repositories {
- google()
- mavenCentral()
- }
-}
-rootProject.name = "BirthdayCard"
-include ':app'
diff --git a/CalculatorCompose/app/build.gradle b/CalculatorCompose/app/build.gradle
deleted file mode 100644
index 490d9a82..00000000
--- a/CalculatorCompose/app/build.gradle
+++ /dev/null
@@ -1,66 +0,0 @@
-plugins {
- alias(libs.plugins.android.application)
- alias(libs.plugins.jetbrains.kotlin.android)
-}
-
-android {
- namespace 'com.algokelvin.calculator'
- compileSdk 34
-
- defaultConfig {
- applicationId "com.algokelvin.calculator"
- minSdk 24
- targetSdk 34
- versionCode 1
- versionName "1.0"
-
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- vectorDrawables {
- useSupportLibrary true
- }
- }
-
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- }
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- kotlinOptions {
- jvmTarget = '1.8'
- }
- buildFeatures {
- compose true
- }
- composeOptions {
- kotlinCompilerExtensionVersion '1.5.1'
- }
- packaging {
- resources {
- excludes += '/META-INF/{AL2.0,LGPL2.1}'
- }
- }
-}
-
-dependencies {
-
- implementation libs.androidx.core.ktx
- implementation libs.androidx.lifecycle.runtime.ktx
- implementation libs.androidx.activity.compose
- implementation platform(libs.androidx.compose.bom)
- implementation libs.androidx.ui
- implementation libs.androidx.ui.graphics
- implementation libs.androidx.ui.tooling.preview
- implementation libs.androidx.material3
- testImplementation libs.junit
- androidTestImplementation libs.androidx.junit
- androidTestImplementation libs.androidx.espresso.core
- androidTestImplementation platform(libs.androidx.compose.bom)
- androidTestImplementation libs.androidx.ui.test.junit4
- debugImplementation libs.androidx.ui.tooling
- debugImplementation libs.androidx.ui.test.manifest
-}
\ No newline at end of file
diff --git a/CalculatorCompose/app/src/androidTest/java/com/algokelvin/calculator/ExampleInstrumentedTest.kt b/CalculatorCompose/app/src/androidTest/java/com/algokelvin/calculator/ExampleInstrumentedTest.kt
deleted file mode 100644
index 239568f4..00000000
--- a/CalculatorCompose/app/src/androidTest/java/com/algokelvin/calculator/ExampleInstrumentedTest.kt
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.algokelvin.calculator
-
-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.algokelvin.calculator", appContext.packageName)
- }
-}
\ No newline at end of file
diff --git a/CalculatorCompose/app/src/main/AndroidManifest.xml b/CalculatorCompose/app/src/main/AndroidManifest.xml
deleted file mode 100644
index 8d7bca4a..00000000
--- a/CalculatorCompose/app/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/CalculatorCompose/app/src/main/java/com/algokelvin/calculator/MainActivity.kt b/CalculatorCompose/app/src/main/java/com/algokelvin/calculator/MainActivity.kt
deleted file mode 100644
index c31b723a..00000000
--- a/CalculatorCompose/app/src/main/java/com/algokelvin/calculator/MainActivity.kt
+++ /dev/null
@@ -1,47 +0,0 @@
-package com.algokelvin.calculator
-
-import android.os.Bundle
-import androidx.activity.ComponentActivity
-import androidx.activity.compose.setContent
-import androidx.activity.enableEdgeToEdge
-import androidx.compose.foundation.layout.fillMaxSize
-import androidx.compose.foundation.layout.padding
-import androidx.compose.material3.Scaffold
-import androidx.compose.material3.Text
-import androidx.compose.runtime.Composable
-import androidx.compose.ui.Modifier
-import androidx.compose.ui.tooling.preview.Preview
-import com.algokelvin.calculator.ui.theme.CalculatorTheme
-
-class MainActivity : ComponentActivity() {
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- enableEdgeToEdge()
- setContent {
- CalculatorTheme {
- Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding ->
- Greeting(
- name = "Android",
- modifier = Modifier.padding(innerPadding)
- )
- }
- }
- }
- }
-}
-
-@Composable
-fun Greeting(name: String, modifier: Modifier = Modifier) {
- Text(
- text = "Hello $name!",
- modifier = modifier
- )
-}
-
-@Preview(showBackground = true)
-@Composable
-fun GreetingPreview() {
- CalculatorTheme {
- Greeting("Android")
- }
-}
\ No newline at end of file
diff --git a/CalculatorCompose/app/src/main/java/com/algokelvin/calculator/ui/theme/Color.kt b/CalculatorCompose/app/src/main/java/com/algokelvin/calculator/ui/theme/Color.kt
deleted file mode 100644
index 8b9f6512..00000000
--- a/CalculatorCompose/app/src/main/java/com/algokelvin/calculator/ui/theme/Color.kt
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.algokelvin.calculator.ui.theme
-
-import androidx.compose.ui.graphics.Color
-
-val Purple80 = Color(0xFFD0BCFF)
-val PurpleGrey80 = Color(0xFFCCC2DC)
-val Pink80 = Color(0xFFEFB8C8)
-
-val Purple40 = Color(0xFF6650a4)
-val PurpleGrey40 = Color(0xFF625b71)
-val Pink40 = Color(0xFF7D5260)
\ No newline at end of file
diff --git a/CalculatorCompose/app/src/main/java/com/algokelvin/calculator/ui/theme/Theme.kt b/CalculatorCompose/app/src/main/java/com/algokelvin/calculator/ui/theme/Theme.kt
deleted file mode 100644
index 9005478d..00000000
--- a/CalculatorCompose/app/src/main/java/com/algokelvin/calculator/ui/theme/Theme.kt
+++ /dev/null
@@ -1,58 +0,0 @@
-package com.algokelvin.calculator.ui.theme
-
-import android.app.Activity
-import android.os.Build
-import androidx.compose.foundation.isSystemInDarkTheme
-import androidx.compose.material3.MaterialTheme
-import androidx.compose.material3.darkColorScheme
-import androidx.compose.material3.dynamicDarkColorScheme
-import androidx.compose.material3.dynamicLightColorScheme
-import androidx.compose.material3.lightColorScheme
-import androidx.compose.runtime.Composable
-import androidx.compose.ui.platform.LocalContext
-
-private val DarkColorScheme = darkColorScheme(
- primary = Purple80,
- secondary = PurpleGrey80,
- tertiary = Pink80
-)
-
-private val LightColorScheme = lightColorScheme(
- primary = Purple40,
- secondary = PurpleGrey40,
- tertiary = Pink40
-
- /* Other default colors to override
- background = Color(0xFFFFFBFE),
- surface = Color(0xFFFFFBFE),
- onPrimary = Color.White,
- onSecondary = Color.White,
- onTertiary = Color.White,
- onBackground = Color(0xFF1C1B1F),
- onSurface = Color(0xFF1C1B1F),
- */
-)
-
-@Composable
-fun CalculatorTheme(
- darkTheme: Boolean = isSystemInDarkTheme(),
- // Dynamic color is available on Android 12+
- dynamicColor: Boolean = true,
- content: @Composable () -> Unit
-) {
- val colorScheme = when {
- dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
- val context = LocalContext.current
- if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)
- }
-
- darkTheme -> DarkColorScheme
- else -> LightColorScheme
- }
-
- MaterialTheme(
- colorScheme = colorScheme,
- typography = Typography,
- content = content
- )
-}
\ No newline at end of file
diff --git a/CalculatorCompose/app/src/main/java/com/algokelvin/calculator/ui/theme/Type.kt b/CalculatorCompose/app/src/main/java/com/algokelvin/calculator/ui/theme/Type.kt
deleted file mode 100644
index 9748ca99..00000000
--- a/CalculatorCompose/app/src/main/java/com/algokelvin/calculator/ui/theme/Type.kt
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.algokelvin.calculator.ui.theme
-
-import androidx.compose.material3.Typography
-import androidx.compose.ui.text.TextStyle
-import androidx.compose.ui.text.font.FontFamily
-import androidx.compose.ui.text.font.FontWeight
-import androidx.compose.ui.unit.sp
-
-// Set of Material typography styles to start with
-val Typography = Typography(
- bodyLarge = TextStyle(
- fontFamily = FontFamily.Default,
- fontWeight = FontWeight.Normal,
- fontSize = 16.sp,
- lineHeight = 24.sp,
- letterSpacing = 0.5.sp
- )
- /* Other default text styles to override
- titleLarge = TextStyle(
- fontFamily = FontFamily.Default,
- fontWeight = FontWeight.Normal,
- fontSize = 22.sp,
- lineHeight = 28.sp,
- letterSpacing = 0.sp
- ),
- labelSmall = TextStyle(
- fontFamily = FontFamily.Default,
- fontWeight = FontWeight.Medium,
- fontSize = 11.sp,
- lineHeight = 16.sp,
- letterSpacing = 0.5.sp
- )
- */
-)
\ No newline at end of file
diff --git a/CalculatorCompose/app/src/main/res/values/strings.xml b/CalculatorCompose/app/src/main/res/values/strings.xml
deleted file mode 100644
index 665ca8de..00000000
--- a/CalculatorCompose/app/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- Calculator
-
\ No newline at end of file
diff --git a/CalculatorCompose/app/src/main/res/values/themes.xml b/CalculatorCompose/app/src/main/res/values/themes.xml
deleted file mode 100644
index f2446788..00000000
--- a/CalculatorCompose/app/src/main/res/values/themes.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/CalculatorCompose/app/src/test/java/com/algokelvin/calculator/ExampleUnitTest.kt b/CalculatorCompose/app/src/test/java/com/algokelvin/calculator/ExampleUnitTest.kt
deleted file mode 100644
index c482a3f4..00000000
--- a/CalculatorCompose/app/src/test/java/com/algokelvin/calculator/ExampleUnitTest.kt
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.algokelvin.calculator
-
-import org.junit.Test
-
-import org.junit.Assert.*
-
-/**
- * Example local unit test, which will execute on the development machine (host).
- *
- * See [testing documentation](http://d.android.com/tools/testing).
- */
-class ExampleUnitTest {
- @Test
- fun addition_isCorrect() {
- assertEquals(4, 2 + 2)
- }
-}
\ No newline at end of file
diff --git a/CalculatorCompose/gradle/libs.versions.toml b/CalculatorCompose/gradle/libs.versions.toml
deleted file mode 100644
index eae502b2..00000000
--- a/CalculatorCompose/gradle/libs.versions.toml
+++ /dev/null
@@ -1,31 +0,0 @@
-[versions]
-agp = "8.5.0"
-kotlin = "1.9.0"
-coreKtx = "1.15.0"
-junit = "4.13.2"
-junitVersion = "1.2.1"
-espressoCore = "3.6.1"
-lifecycleRuntimeKtx = "2.8.7"
-activityCompose = "1.10.1"
-composeBom = "2024.04.01"
-
-[libraries]
-androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
-junit = { group = "junit", name = "junit", version.ref = "junit" }
-androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
-androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
-androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" }
-androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" }
-androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" }
-androidx-ui = { group = "androidx.compose.ui", name = "ui" }
-androidx-ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" }
-androidx-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
-androidx-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" }
-androidx-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" }
-androidx-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }
-androidx-material3 = { group = "androidx.compose.material3", name = "material3" }
-
-[plugins]
-android-application = { id = "com.android.application", version.ref = "agp" }
-jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
-
diff --git a/CalculatorCompose/gradle/wrapper/gradle-wrapper.properties b/CalculatorCompose/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index f970c499..00000000
--- a/CalculatorCompose/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Mon Mar 17 15:09:29 WIB 2025
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
diff --git a/CalculatorCompose/settings.gradle b/CalculatorCompose/settings.gradle
deleted file mode 100644
index c45e41f6..00000000
--- a/CalculatorCompose/settings.gradle
+++ /dev/null
@@ -1,23 +0,0 @@
-pluginManagement {
- repositories {
- google {
- content {
- includeGroupByRegex("com\\.android.*")
- includeGroupByRegex("com\\.google.*")
- includeGroupByRegex("androidx.*")
- }
- }
- mavenCentral()
- gradlePluginPortal()
- }
-}
-dependencyResolutionManagement {
- repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
- repositories {
- google()
- mavenCentral()
- }
-}
-
-rootProject.name = "Calculator"
-include ':app'
diff --git a/CameraRotation/README.md b/CameraRotation/README.md
deleted file mode 100644
index c66531d0..00000000
--- a/CameraRotation/README.md
+++ /dev/null
@@ -1,37 +0,0 @@
-## Camera Rotation
-
-|  |
-|:------------------------------------------------:|
-| Gambar 1:
Card Birthday |
-
-## Implementation
-- ???
-
-## Environment
-- **Android Gradle**: 8.5.0
-- **Plugins Version**: 8.7
-- **Gradle Version**: 8.0
-- **Java JDK**: 17
-- **Kotlin Version**: 1.9.0
-- **Min SDK**: 21
-- **Target SDK**: 34
-
-## Contributors
-Thanks all contributors for build this repository
-
-```
-Copyright [2021] [The Dictionary of Android Projects]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-```
diff --git a/CameraRotation/app/build.gradle b/CameraRotation/app/build.gradle
deleted file mode 100644
index ca4c4e0b..00000000
--- a/CameraRotation/app/build.gradle
+++ /dev/null
@@ -1,35 +0,0 @@
-plugins {
- id 'com.android.application'
-}
-
-android {
- compileSdkVersion 30
- buildToolsVersion "30.0.3"
-
- defaultConfig {
- applicationId "com.algokelvin.camera.rotation"
- minSdkVersion 16
- 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.3.0'
- implementation 'com.google.android.material:material:1.3.0'
- implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
-}
\ No newline at end of file
diff --git a/CameraRotation/app/src/main/AndroidManifest.xml b/CameraRotation/app/src/main/AndroidManifest.xml
deleted file mode 100644
index 00e4e635..00000000
--- a/CameraRotation/app/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/CameraRotation/app/src/main/java/com/algokelvin/camera/rotation/MainActivity.java b/CameraRotation/app/src/main/java/com/algokelvin/camera/rotation/MainActivity.java
deleted file mode 100644
index 41d24813..00000000
--- a/CameraRotation/app/src/main/java/com/algokelvin/camera/rotation/MainActivity.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package com.algokelvin.camera.rotation;
-
-import android.Manifest;
-import android.content.pm.PackageManager;
-import android.os.Bundle;
-import android.view.SurfaceView;
-import android.view.Window;
-import android.widget.TextView;
-import android.widget.Toast;
-
-import androidx.annotation.NonNull;
-
-import com.algokelvin.camera.rotation.utils.CameraSurfaceHolder;
-
-public class MainActivity extends CameraSurfaceHolder {
- private final String[] permissions = {
- Manifest.permission.CAMERA,
- Manifest.permission.WRITE_EXTERNAL_STORAGE,
- Manifest.permission.READ_EXTERNAL_STORAGE
- };
- SurfaceView surfaceView;
- TextView txtDegree;
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- requestWindowFeature(Window.FEATURE_NO_TITLE);
- setContentView(R.layout.activity_main);
-
- txtDegree = findViewById(R.id.txt_degree);
- surfaceView = findViewById(R.id.camerapreview);
- setCameraSurface(txtDegree, surfaceView);
-
- if (hasNoPermissions()) {
- requestPermission();
- } else {
- initCamera();
- }
- }
-
- @Override
- protected void onResume() {
- super.onResume();
-
- if (!hasNoPermissions()) {
- initCamera();
- }
- }
-
- @Override
- public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
- super.onRequestPermissionsResult(requestCode, permissions, grantResults);
- if (requestCode == 0) {
- boolean allGranted = true;
- for (int result : grantResults) {
- if (result != PackageManager.PERMISSION_GRANTED) {
- allGranted = false;
- break;
- }
- }
- if (allGranted) { // Initialize the camera if all permissions are granted
- initCamera();
- } else { // Handle the case where some permissions are not granted
- Toast.makeText(this, "Some permissions are not granted", Toast.LENGTH_SHORT).show();
- }
- }
- }
-
-}
\ No newline at end of file
diff --git a/CameraRotation/app/src/main/java/com/algokelvin/camera/rotation/utils/CameraSurfaceHolder.java b/CameraRotation/app/src/main/java/com/algokelvin/camera/rotation/utils/CameraSurfaceHolder.java
deleted file mode 100644
index 25ec9c8b..00000000
--- a/CameraRotation/app/src/main/java/com/algokelvin/camera/rotation/utils/CameraSurfaceHolder.java
+++ /dev/null
@@ -1,101 +0,0 @@
-package com.algokelvin.camera.rotation.utils;
-
-import android.Manifest;
-import android.app.Activity;
-import android.content.pm.PackageManager;
-import android.hardware.Camera;
-import android.view.SurfaceHolder;
-import android.view.SurfaceView;
-import android.widget.TextView;
-
-import androidx.annotation.NonNull;
-import androidx.core.app.ActivityCompat;
-import androidx.core.content.ContextCompat;
-
-import java.io.IOException;
-
-public class CameraSurfaceHolder extends Activity implements SurfaceHolder.Callback {
- private final String[] permissions = {
- Manifest.permission.CAMERA,
- Manifest.permission.WRITE_EXTERNAL_STORAGE,
- Manifest.permission.READ_EXTERNAL_STORAGE
- };
- Camera camera;
- SurfaceView surfaceView;
- TextView txtDegree;
- SurfaceHolder surfaceHolder;
- boolean previewing = false;
-
- protected void setCameraSurface(TextView txtDegree, SurfaceView surfaceView) {
- this.txtDegree = txtDegree;
- this.surfaceView = surfaceView;
- surfaceHolder = surfaceView.getHolder();
- surfaceHolder.addCallback(this);
- }
-
- protected boolean hasNoPermissions() {
- return ContextCompat.checkSelfPermission(this,
- Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED || ContextCompat.checkSelfPermission(this,
- Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED || ContextCompat.checkSelfPermission(this,
- Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED;
- }
-
- protected void requestPermission(){
- ActivityCompat.requestPermissions(this, permissions,0);
- }
-
- protected void initCamera() {
- if (surfaceHolder.getSurface() == null) {
- return;
- }
-
- if (camera == null) {
- camera = Camera.open();
- camera.setDisplayOrientation(90);
-
- try {
- camera.setPreviewDisplay(surfaceHolder);
- camera.startPreview();
- previewing = true;
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
-
- @Override
- public void surfaceCreated(@NonNull SurfaceHolder surfaceHolder) {
- float r = surfaceView.getRotation();
- txtDegree.setText(String.valueOf(r));
-
- if (!hasNoPermissions()) {
- initCamera();
- }
- }
-
- @Override
- public void surfaceChanged(@NonNull SurfaceHolder surfaceHolder, int i, int i1, int i2) {
- if(previewing){
- camera.stopPreview();
- previewing = false;
- }
-
- if (camera != null){
- try {
- camera.setPreviewDisplay(surfaceHolder);
- camera.startPreview();
- previewing = true;
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
-
- @Override
- public void surfaceDestroyed(@NonNull SurfaceHolder surfaceHolder) {
- camera.stopPreview();
- camera.release();
- camera = null;
- previewing = false;
- }
-}
diff --git a/CameraRotation/app/src/main/res/drawable/ic_launcher_background.xml b/CameraRotation/app/src/main/res/drawable/ic_launcher_background.xml
deleted file mode 100644
index 07d5da9c..00000000
--- a/CameraRotation/app/src/main/res/drawable/ic_launcher_background.xml
+++ /dev/null
@@ -1,170 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/CameraRotation/app/src/main/res/layout/activity_main.xml b/CameraRotation/app/src/main/res/layout/activity_main.xml
deleted file mode 100644
index d91bcb93..00000000
--- a/CameraRotation/app/src/main/res/layout/activity_main.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/CameraRotation/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/CameraRotation/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
deleted file mode 100644
index eca70cfe..00000000
--- a/CameraRotation/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/CameraRotation/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/CameraRotation/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
deleted file mode 100644
index eca70cfe..00000000
--- a/CameraRotation/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/CameraRotation/app/src/main/res/mipmap-hdpi/ic_launcher.png b/CameraRotation/app/src/main/res/mipmap-hdpi/ic_launcher.png
deleted file mode 100644
index a571e600..00000000
Binary files a/CameraRotation/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ
diff --git a/CameraRotation/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/CameraRotation/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
deleted file mode 100644
index 61da551c..00000000
Binary files a/CameraRotation/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and /dev/null differ
diff --git a/CameraRotation/app/src/main/res/mipmap-mdpi/ic_launcher.png b/CameraRotation/app/src/main/res/mipmap-mdpi/ic_launcher.png
deleted file mode 100644
index c41dd285..00000000
Binary files a/CameraRotation/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ
diff --git a/CameraRotation/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/CameraRotation/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
deleted file mode 100644
index db5080a7..00000000
Binary files a/CameraRotation/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and /dev/null differ
diff --git a/CameraRotation/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/CameraRotation/app/src/main/res/mipmap-xhdpi/ic_launcher.png
deleted file mode 100644
index 6dba46da..00000000
Binary files a/CameraRotation/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ
diff --git a/CameraRotation/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/CameraRotation/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
deleted file mode 100644
index da31a871..00000000
Binary files a/CameraRotation/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/CameraRotation/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/CameraRotation/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
deleted file mode 100644
index 15ac6817..00000000
Binary files a/CameraRotation/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ
diff --git a/CameraRotation/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/CameraRotation/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
deleted file mode 100644
index b216f2d3..00000000
Binary files a/CameraRotation/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/CameraRotation/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/CameraRotation/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
deleted file mode 100644
index f25a4197..00000000
Binary files a/CameraRotation/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ
diff --git a/CameraRotation/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/CameraRotation/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
deleted file mode 100644
index e96783cc..00000000
Binary files a/CameraRotation/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/CameraRotation/app/src/main/res/values-night/themes.xml b/CameraRotation/app/src/main/res/values-night/themes.xml
deleted file mode 100644
index c1fe886b..00000000
--- a/CameraRotation/app/src/main/res/values-night/themes.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/CameraRotation/app/src/main/res/values/colors.xml b/CameraRotation/app/src/main/res/values/colors.xml
deleted file mode 100644
index f8c6127d..00000000
--- a/CameraRotation/app/src/main/res/values/colors.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
- #FFBB86FC
- #FF6200EE
- #FF3700B3
- #FF03DAC5
- #FF018786
- #FF000000
- #FFFFFFFF
-
\ No newline at end of file
diff --git a/CameraRotation/app/src/main/res/values/strings.xml b/CameraRotation/app/src/main/res/values/strings.xml
deleted file mode 100644
index f548a5a5..00000000
--- a/CameraRotation/app/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- CameraRotation
-
\ No newline at end of file
diff --git a/CameraRotation/app/src/main/res/values/themes.xml b/CameraRotation/app/src/main/res/values/themes.xml
deleted file mode 100644
index 7189886f..00000000
--- a/CameraRotation/app/src/main/res/values/themes.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/CameraRotation/build.gradle b/CameraRotation/build.gradle
deleted file mode 100644
index 055c2bd2..00000000
--- a/CameraRotation/build.gradle
+++ /dev/null
@@ -1,28 +0,0 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
-buildscript {
- ext {
- agp_version = '8.5.0'
- }
- repositories {
- google()
- mavenCentral()
- }
- dependencies {
- classpath "com.android.tools.build:gradle:$agp_version"
-
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
- }
-}
-
-allprojects {
- repositories {
- google()
- mavenCentral()
- jcenter() // Warning: this repository is going to shut down soon
- }
-}
-
-task clean(type: Delete) {
- delete rootProject.buildDir
-}
\ No newline at end of file
diff --git a/CameraRotation/gradle/wrapper/gradle-wrapper.jar b/CameraRotation/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index f6b961fd..00000000
Binary files a/CameraRotation/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/CameraRotation/gradle/wrapper/gradle-wrapper.properties b/CameraRotation/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 58df879b..00000000
--- a/CameraRotation/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Sat Feb 22 21:57:43 WIB 2025
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
diff --git a/CameraRotation/gradlew b/CameraRotation/gradlew
deleted file mode 100644
index cccdd3d5..00000000
--- a/CameraRotation/gradlew
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/usr/bin/env sh
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn () {
- echo "$*"
-}
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=$((i+1))
- done
- case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=$(save "$@")
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-
-# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
-if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
- cd "$(dirname "$0")"
-fi
-
-exec "$JAVACMD" "$@"
diff --git a/CameraRotation/gradlew.bat b/CameraRotation/gradlew.bat
deleted file mode 100644
index f9553162..00000000
--- a/CameraRotation/gradlew.bat
+++ /dev/null
@@ -1,84 +0,0 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/CameraRotation/settings.gradle b/CameraRotation/settings.gradle
deleted file mode 100644
index 58a57d18..00000000
--- a/CameraRotation/settings.gradle
+++ /dev/null
@@ -1,2 +0,0 @@
-rootProject.name = "CameraRotation"
-include ':app'
diff --git a/CleanArchitectureMVVM/app/build.gradle b/CleanArchitectureMVVM/app/build.gradle
deleted file mode 100644
index 60fa895c..00000000
--- a/CleanArchitectureMVVM/app/build.gradle
+++ /dev/null
@@ -1,57 +0,0 @@
-plugins {
- id 'com.android.application'
- id 'kotlin-android'
- id 'kotlin-kapt'
- id 'kotlin-parcelize'
-}
-
-android {
- compileSdkVersion 31
- buildToolsVersion "30.0.3"
-
- defaultConfig {
- applicationId "com.algokelvin.app"
- minSdkVersion 21
- targetSdkVersion 31
- versionCode 1
- versionName "1.0"
-
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- }
-
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- }
- }
- buildFeatures {
- viewBinding true
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- kotlinOptions {
- jvmTarget = '1.8'
- }
-}
-
-dependencies {
- implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
- implementation 'androidx.core:core-ktx:1.6.0'
- implementation 'androidx.appcompat:appcompat:1.3.1'
- implementation 'com.google.android.material:material:1.4.0'
- implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
-
- // Lifecycle
- implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.4.0"
-
- // Room
- implementation "androidx.room:room-ktx:2.3.0"
- kapt "androidx.room:room-compiler:2.3.0"
-
- // Coroutines
- implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1'
- implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.1'
-}
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/AndroidManifest.xml b/CleanArchitectureMVVM/app/src/main/AndroidManifest.xml
deleted file mode 100644
index 5df23274..00000000
--- a/CleanArchitectureMVVM/app/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/base/BaseActivity.kt b/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/base/BaseActivity.kt
deleted file mode 100644
index bff763dd..00000000
--- a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/base/BaseActivity.kt
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.algokelvin.app.base
-
-import android.widget.Toast
-import androidx.appcompat.app.AppCompatActivity
-
-open class BaseActivity: AppCompatActivity() {
- protected fun toast(message: String, isLong: Boolean = false) {
- Toast.makeText(this, message,
- if (isLong)
- Toast.LENGTH_LONG
- else
- Toast.LENGTH_SHORT
- ).show()
- }
-}
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/base/UseCase.kt b/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/base/UseCase.kt
deleted file mode 100644
index 8beeb1a0..00000000
--- a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/base/UseCase.kt
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.algokelvin.app.base
-
-import com.algokelvin.app.model.Resource
-import kotlinx.coroutines.CoroutineDispatcher
-import kotlinx.coroutines.flow.Flow
-import kotlinx.coroutines.flow.catch
-import kotlinx.coroutines.flow.flowOn
-
-abstract class UseCase(private val dispatcher: CoroutineDispatcher) {
-
- operator fun invoke(param: P): Flow> {
- return execute(param).catch {
- emit(Resource.error(it.message ?: ""))
- }.flowOn(dispatcher)
- }
-
- @Throws(RuntimeException::class)
- abstract fun execute(param: P): Flow>
-
-}
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/data/NetworkBoundResource.kt b/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/data/NetworkBoundResource.kt
deleted file mode 100644
index 7b5273c2..00000000
--- a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/data/NetworkBoundResource.kt
+++ /dev/null
@@ -1,40 +0,0 @@
-package com.algokelvin.app.data
-
-import kotlinx.coroutines.flow.*
-
-/*
-* This is the strategy util to make a data request
-* supported offline-mode using Flow.
-* */
-class NetworkBoundResource(
- val query: () -> Flow, // first, getting the data from local db
- val fetch: suspend () -> T, // then, fetch the data from network
- val saveFetchResult: (T) -> Unit, // after getting the data from network, save it into local db
- val onFetchFailed: (Throwable) -> Unit = {}, // handling fetch failed if any
- val isShouldFetch: (T) -> Boolean = { _ -> true } // is it need to fetch to network or not (default: true)
-) {
-
- fun asFlow(): Flow> = flow {
- val flow = query()
- .onStart { emit(Resource.loading(null)) }
- .flatMapConcat { data ->
- if (isShouldFetch(data)) {
- emit(Resource.loading(data))
-
- try {
- saveFetchResult(fetch())
- query().map { Resource.success(it) }
- } catch (throwable: Throwable) {
- onFetchFailed(throwable)
- query().map {
- Resource.error(throwable.message?: "", null)
- }
- }
- } else {
- query().map { Resource.success(it) }
- }
- }
-
- emitAll(flow)
- }
-}
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/data/Resource.kt b/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/data/Resource.kt
deleted file mode 100644
index f9a9c3b3..00000000
--- a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/data/Resource.kt
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.algokelvin.app.data
-
-data class Resource (val status: Status, val data: T?, val message: String?) {
- enum class Status {
- SUCCESS,
- ERROR,
- LOADING
- }
-
- companion object {
- fun success(data: T):Resource {
- return Resource(Status.SUCCESS, data, null)
- }
- fun error(message: String, data: T? = null):Resource {
- return Resource(Status.ERROR, data, message)
- }
- fun loading(data: T? = null):Resource {
- return Resource(Status.LOADING, data, null)
- }
- }
-}
diff --git a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/data/datasource/local/ProductDao.kt b/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/data/datasource/local/ProductDao.kt
deleted file mode 100644
index a941b537..00000000
--- a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/data/datasource/local/ProductDao.kt
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.algokelvin.app.data.datasource.local
-
-import androidx.room.Dao
-import androidx.room.Insert
-import androidx.room.OnConflictStrategy
-import androidx.room.Query
-import com.algokelvin.app.data.entity.Product
-import kotlinx.coroutines.flow.Flow
-
-@Dao
-interface ProductDao {
- @Query("SELECT * FROM product")
- fun products(): Flow>
-
- @JvmSuppressWildcards
- @Insert(onConflict = OnConflictStrategy.REPLACE)
- fun insertAll(products: List)
-
- @Insert
- fun insert(product: Product)
-
- @Query("SELECT * FROM product WHERE id=:id")
- fun productBy(id: Int): Flow
-}
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/data/datasource/local/ProductDatabase.kt b/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/data/datasource/local/ProductDatabase.kt
deleted file mode 100644
index 1e3cba6e..00000000
--- a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/data/datasource/local/ProductDatabase.kt
+++ /dev/null
@@ -1,30 +0,0 @@
-package com.algokelvin.app.data.datasource.local
-
-import android.content.Context
-import androidx.room.Database
-import androidx.room.Room
-import androidx.room.RoomDatabase
-import com.algokelvin.app.data.entity.Product
-
-@Database(entities = [Product::class], version = 1)
-abstract class ProductDatabase : RoomDatabase() {
- abstract fun productDao(): ProductDao
-
- companion object {
- private const val DB_NAME = "product_data"
- @Volatile private var INSTANCE: ProductDatabase? = null
-
- fun instance(context: Context): ProductDatabase {
- return INSTANCE?: synchronized(this) {
- Room.databaseBuilder(
- context.applicationContext,
- ProductDatabase::class.java,
- DB_NAME
- ).fallbackToDestructiveMigration()
- .build()
- .also { INSTANCE = it }
- }
- }
- }
-
-}
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/data/datasource/remote/ProductServices.kt b/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/data/datasource/remote/ProductServices.kt
deleted file mode 100644
index ecc2ffc7..00000000
--- a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/data/datasource/remote/ProductServices.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.algokelvin.app.data.datasource.remote
-
-import com.algokelvin.app.data.entity.Product
-
-interface ProductServices {
- fun products(): List
- fun productById(id: Int): Product
-}
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/data/datasource/remote/RemoteProductFactory.kt b/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/data/datasource/remote/RemoteProductFactory.kt
deleted file mode 100644
index d40bfc1e..00000000
--- a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/data/datasource/remote/RemoteProductFactory.kt
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.algokelvin.app.data.datasource.remote
-
-import com.algokelvin.app.data.entity.Product
-
-class RemoteProductFactory: ProductServices {
- private val products = listOf(
- Product(id = 1, name = "iPhone", price = 1000),
- Product(id = 2, name = "Android", price = 2000),
- Product(id = 3, name = "Huawei", price = 3000),
- Product(id = 4, name = "Xiaomi", price = 4000),
- Product(id = 5, name = "Samsung", price = 5000),
- )
-
- override fun products(): List {
- return products
- }
-
- override fun productById(id: Int): Product {
- return products.first { it.id == id }
- }
-}
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/data/entity/Product.kt b/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/data/entity/Product.kt
deleted file mode 100644
index 77e70790..00000000
--- a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/data/entity/Product.kt
+++ /dev/null
@@ -1,18 +0,0 @@
-package com.algokelvin.app.data.entity
-
-import androidx.room.ColumnInfo
-import androidx.room.Entity
-import androidx.room.PrimaryKey
-
-@Entity(tableName = "product")
-data class Product(
- @PrimaryKey(autoGenerate = true)
- @ColumnInfo(name="id")
- val id: Int = 0,
-
- @ColumnInfo(name="name")
- val name: String = "",
-
- @ColumnInfo(name="price")
- val price: Int = 0
-)
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/data/mapper/Mapper.kt b/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/data/mapper/Mapper.kt
deleted file mode 100644
index 42699118..00000000
--- a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/data/mapper/Mapper.kt
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.algokelvin.app.data.mapper
-
-import com.algokelvin.app.data.entity.Product
-import com.algokelvin.app.ui.uimodel.ProductUIModel
-import com.algokelvin.app.ui.uimodel.ProductsUIModel
-
-fun Product?.mapToUiModel() = ProductUIModel(
- id = this?.id?: 0,
- name = this?.name?: "",
- price = this?.price?: 0
-)
-
-fun List?.mapToUiModel() = ProductsUIModel(
- data = this?.map {
- it.mapToUiModel()
- }?: listOf()
-)
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/data/repository/ProductRepository.kt b/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/data/repository/ProductRepository.kt
deleted file mode 100644
index b90bccd0..00000000
--- a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/data/repository/ProductRepository.kt
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.algokelvin.app.data.repository
-
-import com.algokelvin.app.data.Resource
-import com.algokelvin.app.data.entity.Product
-import kotlinx.coroutines.flow.Flow
-
-interface ProductRepository {
- fun products(): Flow>>
- fun productById(id: Int): Flow
-}
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/data/repository/ProductRepositoryImpl.kt b/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/data/repository/ProductRepositoryImpl.kt
deleted file mode 100644
index 03d94a8d..00000000
--- a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/data/repository/ProductRepositoryImpl.kt
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.algokelvin.app.data.repository
-
-import com.algokelvin.app.data.NetworkBoundResource
-import com.algokelvin.app.data.Resource
-import com.algokelvin.app.data.datasource.local.ProductDao
-import com.algokelvin.app.data.datasource.remote.ProductServices
-import com.algokelvin.app.data.entity.Product
-import kotlinx.coroutines.flow.Flow
-
-class ProductRepositoryImpl(private val localSource: ProductDao, private val remoteSource: ProductServices): ProductRepository {
-
- override fun products(): Flow>> {
- return NetworkBoundResource(
- query = { localSource.products() },
- fetch = { remoteSource.products() },
- saveFetchResult = { localSource.insertAll(it) }
- ).asFlow()
- }
-
- override fun productById(id: Int): Flow {
- return localSource.productBy(id)
- }
-}
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/di/DependencyFactory.kt b/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/di/DependencyFactory.kt
deleted file mode 100644
index ff1644ad..00000000
--- a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/di/DependencyFactory.kt
+++ /dev/null
@@ -1,47 +0,0 @@
-package com.algokelvin.app.di
-
-import android.content.Context
-import com.algokelvin.app.domain.GetProductByIdUseCase
-import com.algokelvin.app.domain.GetProductsUseCase
-import com.algokelvin.app.model.datasource.local.ProductDatabase
-import com.algokelvin.app.model.datasource.remote.RemoteProductFactory
-import com.algokelvin.app.model.repository.ProductRepository
-import com.algokelvin.app.model.repository.ProductRepositoryImpl
-import com.algokelvin.app.ui.main.MainViewModel
-import kotlinx.coroutines.CoroutineDispatcher
-import kotlinx.coroutines.Dispatchers
-
-object DependencyFactory {
-
- fun buildMainViewModel(context: Context): MainViewModel {
- val repository = provideProductRepository(context)
- val dispatcherIo = Dispatchers.IO
-
- val provideProductsUseCase = provideProductsUseCase(repository, dispatcherIo)
- val provideGetProductByIdUseCase = provideGetProductByIdUseCase(repository, dispatcherIo)
- return provideMainViewModel(provideProductsUseCase, provideGetProductByIdUseCase)
- }
-
- private fun provideMainViewModel(
- getProductsUseCase: GetProductsUseCase,
- getProductByIdUseCase: GetProductByIdUseCase
- ) = MainViewModel(getProductByIdUseCase, getProductsUseCase)
-
- private fun provideProductsUseCase(
- repository: ProductRepository,
- dispatcher: CoroutineDispatcher
- ) = GetProductsUseCase(repository, dispatcher)
-
- private fun provideGetProductByIdUseCase(
- repository: ProductRepository,
- dispatcher: CoroutineDispatcher
- ) = GetProductByIdUseCase(repository, dispatcher)
-
- private fun provideProductRepository(context: Context): ProductRepository {
- return ProductRepositoryImpl(
- localSource = ProductDatabase.instance(context).productDao(),
- remoteSource = RemoteProductFactory()
- )
- }
-
-}
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/domain/GetProductByIdUseCase.kt b/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/domain/GetProductByIdUseCase.kt
deleted file mode 100644
index 49360110..00000000
--- a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/domain/GetProductByIdUseCase.kt
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.algokelvin.app.domain
-
-import com.algokelvin.app.base.UseCase
-import com.algokelvin.app.model.Resource
-import com.algokelvin.app.model.mapper.mapToUiModel
-import com.algokelvin.app.model.repository.ProductRepository
-import com.algokelvin.app.model.uimodel.ProductUIModel
-import kotlinx.coroutines.CoroutineDispatcher
-import kotlinx.coroutines.flow.Flow
-import kotlinx.coroutines.flow.map
-
-class GetProductByIdUseCase(
- private val repository: ProductRepository,
- dispatcher: CoroutineDispatcher
-): UseCase(dispatcher) {
-
- override fun execute(param: Int): Flow> {
- return repository.productBy(param).map {
- Resource.success(it.mapToUiModel())
- }
- }
-
-}
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/domain/GetProductsUseCase.kt b/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/domain/GetProductsUseCase.kt
deleted file mode 100644
index 0b321b7d..00000000
--- a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/domain/GetProductsUseCase.kt
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.algokelvin.app.domain
-
-import com.algokelvin.app.base.UseCase
-import com.algokelvin.app.model.Resource
-import com.algokelvin.app.model.mapper.mapToUiModel
-import com.algokelvin.app.model.repository.ProductRepository
-import com.algokelvin.app.model.uimodel.ProductsUIModel
-import kotlinx.coroutines.CoroutineDispatcher
-import kotlinx.coroutines.flow.Flow
-import kotlinx.coroutines.flow.map
-
-class GetProductsUseCase (
- private val repository: ProductRepository,
- dispatcher: CoroutineDispatcher
-) : UseCase(dispatcher) {
-
- override fun execute(param: Unit): Flow> {
- return repository.products().map {
- when(it.status) {
- Resource.Status.SUCCESS -> Resource.success(it.data.mapToUiModel())
- else -> Resource.error(it.message ?: "")
- }
- }
- }
-
-}
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/NetworkBoundResource.kt b/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/NetworkBoundResource.kt
deleted file mode 100644
index 281c1a5b..00000000
--- a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/NetworkBoundResource.kt
+++ /dev/null
@@ -1,44 +0,0 @@
-package com.algokelvin.app.model
-
-import kotlinx.coroutines.flow.*
-
-/*
-* This is the strategy util to make a data request
-* supported offline-mode using Flow.
-* */
-class NetworkBoundResource(
- val query: () -> Flow, // first, getting the data from local db
- val fetch: suspend () -> T, // then, fetch the data from network
- val saveFetchResult: (T) -> Unit, // after getting the data from network, save it into local db
- val onFetchFailed: (Throwable) -> Unit = {}, // handling fetch failed if any
- val isShouldFetch: (T) -> Boolean = { _ -> true } // is it need to fetch to network or not (default: true)
-) {
-
- fun asFlow(): Flow> = flow {
- val flow = query()
- .onStart { emit(Resource.loading(null)) }
- .flatMapConcat { data ->
- if (isShouldFetch(data)) {
- emit(Resource.loading(data))
-
- try {
- saveFetchResult(fetch())
- query().map {
- Resource.success(it)
- }
- } catch (throwable: Throwable) {
- onFetchFailed(throwable)
- query().map {
- Resource.error(throwable.message?: "", null)
- }
- }
- } else {
- query().map {
- Resource.success(it)
- }
- }
- }
-
- emitAll(flow)
- }
-}
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/Resource.kt b/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/Resource.kt
deleted file mode 100644
index 3c659e14..00000000
--- a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/Resource.kt
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.algokelvin.app.model
-
-data class Resource(val status: Status, val data: T?, val message: String?) {
-
- enum class Status { SUCCESS, ERROR, LOADING }
-
- companion object {
- fun success(data: T): Resource {
- return Resource(Status.SUCCESS, data, null)
- }
-
- fun error(message: String, data: T? = null): Resource {
- return Resource(Status.ERROR, data, message)
- }
-
- fun loading(data: T? = null): Resource {
- return Resource(Status.LOADING, data, null)
- }
- }
-
-}
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/datasource/local/ProductDao.kt b/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/datasource/local/ProductDao.kt
deleted file mode 100644
index dfc22797..00000000
--- a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/datasource/local/ProductDao.kt
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.algokelvin.app.model.datasource.local
-
-import androidx.room.Dao
-import androidx.room.Insert
-import androidx.room.OnConflictStrategy
-import androidx.room.Query
-import com.algokelvin.app.model.entity.Product
-import kotlinx.coroutines.flow.Flow
-
-@Dao
-interface ProductDao {
- @Query("SELECT * FROM product")
- fun products(): Flow>
-
- @JvmSuppressWildcards
- @Insert(onConflict = OnConflictStrategy.REPLACE)
- fun insertAll(products: List)
-
- @Insert
- fun insert(product: Product)
-
- @Query("SELECT * FROM product WHERE id=:id")
- fun productBy(id: Int): Flow
-}
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/datasource/local/ProductDatabase.kt b/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/datasource/local/ProductDatabase.kt
deleted file mode 100644
index ae5c4c64..00000000
--- a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/datasource/local/ProductDatabase.kt
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.algokelvin.app.model.datasource.local
-
-import android.content.Context
-import androidx.room.Database
-import androidx.room.Room
-import androidx.room.RoomDatabase
-import com.algokelvin.app.model.entity.Product
-
-@Database(entities = [Product::class], version = 1)
-abstract class ProductDatabase: RoomDatabase() {
- abstract fun productDao(): ProductDao
-
- companion object {
- private const val DB_NAME = "product_data"
- @Volatile private var INSTANCE: ProductDatabase? = null
-
- fun instance(context: Context): ProductDatabase {
- return INSTANCE?: synchronized(this) {
- Room.databaseBuilder(
- context.applicationContext,
- ProductDatabase::class.java,
- DB_NAME
- ).fallbackToDestructiveMigration()
- .build()
- .also { INSTANCE = it }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/datasource/remote/ProductServices.kt b/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/datasource/remote/ProductServices.kt
deleted file mode 100644
index 128bac2a..00000000
--- a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/datasource/remote/ProductServices.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.algokelvin.app.model.datasource.remote
-
-import com.algokelvin.app.model.entity.Product
-
-interface ProductServices {
- fun products(): List
- fun productBy(id: Int): Product
-}
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/datasource/remote/RemoteProductFactory.kt b/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/datasource/remote/RemoteProductFactory.kt
deleted file mode 100644
index 8b5cfd4a..00000000
--- a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/datasource/remote/RemoteProductFactory.kt
+++ /dev/null
@@ -1,22 +0,0 @@
-package com.algokelvin.app.model.datasource.remote
-
-import com.algokelvin.app.model.entity.Product
-
-class RemoteProductFactory: ProductServices {
-
- private val products = listOf(
- Product(id = 1, name = "iPhone", price = 1000),
- Product(id = 2, name = "Android", price = 2000),
- Product(id = 3, name = "Huawei", price = 3000),
- Product(id = 4, name = "Xiaomi", price = 4000),
- Product(id = 5, name = "Samsung", price = 5000),
- )
-
- override fun products(): List {
- return products
- }
-
- override fun productBy(id: Int): Product {
- return products.first { it.id == id }
- }
-}
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/entity/Product.kt b/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/entity/Product.kt
deleted file mode 100644
index 7c8e1915..00000000
--- a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/entity/Product.kt
+++ /dev/null
@@ -1,18 +0,0 @@
-package com.algokelvin.app.model.entity
-
-import androidx.room.ColumnInfo
-import androidx.room.Entity
-import androidx.room.PrimaryKey
-
-@Entity(tableName = "product")
-data class Product (
- @PrimaryKey(autoGenerate = true)
- @ColumnInfo(name = "id")
- val id: Int = 0,
-
- @ColumnInfo(name = "name")
- val name: String = "",
-
- @ColumnInfo(name = "price")
- val price: Int = 0
-)
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/mapper/Mapper.kt b/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/mapper/Mapper.kt
deleted file mode 100644
index d6f98b2c..00000000
--- a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/mapper/Mapper.kt
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.algokelvin.app.model.mapper
-
-import com.algokelvin.app.model.entity.Product
-import com.algokelvin.app.model.uimodel.ProductUIModel
-import com.algokelvin.app.model.uimodel.ProductsUIModel
-
-fun List?.mapToUiModel() = ProductsUIModel(
- data = this?.map {
- it.mapToUiModel()
- }?: listOf()
-)
-
-fun Product?.mapToUiModel() = ProductUIModel(
- id = this?.id?: 0,
- name = this?.name?: "",
- price = this?.price?: 0
-)
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/repository/ProductRepository.kt b/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/repository/ProductRepository.kt
deleted file mode 100644
index 3f0fe42d..00000000
--- a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/repository/ProductRepository.kt
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.algokelvin.app.model.repository
-
-import com.algokelvin.app.model.Resource
-import com.algokelvin.app.model.entity.Product
-import kotlinx.coroutines.flow.Flow
-
-interface ProductRepository {
- fun products(): Flow>>
- fun productBy(id: Int): Flow
-}
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/repository/ProductRepositoryImpl.kt b/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/repository/ProductRepositoryImpl.kt
deleted file mode 100644
index 20053a06..00000000
--- a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/repository/ProductRepositoryImpl.kt
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.algokelvin.app.model.repository
-
-import com.algokelvin.app.model.NetworkBoundResource
-import com.algokelvin.app.model.Resource
-import com.algokelvin.app.model.datasource.local.ProductDao
-import com.algokelvin.app.model.datasource.remote.ProductServices
-import com.algokelvin.app.model.entity.Product
-import kotlinx.coroutines.flow.Flow
-
-class ProductRepositoryImpl(
- private val localSource: ProductDao,
- private val remoteSource: ProductServices
-): ProductRepository {
-
- override fun products(): Flow>> {
- return NetworkBoundResource(
- query = { localSource.products() },
- fetch = { remoteSource.products() },
- saveFetchResult = { localSource.insertAll(it) }
- ).asFlow()
- }
-
- override fun productBy(id: Int): Flow {
- return localSource.productBy(id)
- }
-
-}
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/uimodel/ProductUIModel.kt b/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/uimodel/ProductUIModel.kt
deleted file mode 100644
index 3c1ce12c..00000000
--- a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/uimodel/ProductUIModel.kt
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.algokelvin.app.model.uimodel
-
-import android.os.Parcelable
-import kotlinx.parcelize.Parcelize
-
-@Parcelize
-data class ProductUIModel(
- var id: Int = 0,
- var name: String = "",
- var price: Int = 0
-) : Parcelable
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/uimodel/ProductsUIModel.kt b/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/uimodel/ProductsUIModel.kt
deleted file mode 100644
index 68596e5e..00000000
--- a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/model/uimodel/ProductsUIModel.kt
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.algokelvin.app.model.uimodel
-
-import android.os.Parcelable
-import kotlinx.parcelize.Parcelize
-
-@Parcelize
-data class ProductsUIModel(var data: List = emptyList()) : Parcelable
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/ui/adapter/ProductAdapter.kt b/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/ui/adapter/ProductAdapter.kt
deleted file mode 100644
index 8a1cbf09..00000000
--- a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/ui/adapter/ProductAdapter.kt
+++ /dev/null
@@ -1,63 +0,0 @@
-package com.algokelvin.app.ui.adapter
-
-import android.view.LayoutInflater
-import android.view.ViewGroup
-import androidx.recyclerview.widget.RecyclerView
-import com.algokelvin.app.databinding.ItemProductBinding
-import com.algokelvin.app.model.uimodel.ProductUIModel
-import com.algokelvin.app.model.uimodel.ProductsUIModel
-
-class ProductAdapter(
- private val items: MutableList = mutableListOf(),
- private val onItemClicked: (ProductUIModel) -> Unit
-): RecyclerView.Adapter() {
-
- override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ProductViewHolder {
- return ProductViewHolder.create(parent, onItemClicked)
- }
-
- override fun onBindViewHolder(holder: ProductViewHolder, position: Int) {
- holder.bind(items[position])
- }
-
- override fun getItemCount() = items.size
-
- fun addAll(products: ProductsUIModel) {
- items.clear()
- items.addAll(products.data)
- notifyDataSetChanged()
- }
-
- class ProductViewHolder constructor(
- private val binding: ItemProductBinding,
- private val onItemClicked: (ProductUIModel) -> Unit
- ): RecyclerView.ViewHolder(binding.root) {
-
- fun bind(model: ProductUIModel) {
- binding.txtName.text = model.name
-
- itemView.setOnClickListener {
- onItemClicked(model)
- }
- }
-
- companion object {
- fun create(
- container: ViewGroup,
- onItemClicked: (ProductUIModel) -> Unit
- ): ProductViewHolder {
- val inflate = LayoutInflater.from(container.context)
- return ProductViewHolder(
- ItemProductBinding.inflate(
- inflate,
- container,
- false
- ),
- onItemClicked
- )
- }
- }
-
- }
-
-}
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/ui/detail/ProductDetailBottomSheet.kt b/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/ui/detail/ProductDetailBottomSheet.kt
deleted file mode 100644
index e9d0c3f6..00000000
--- a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/ui/detail/ProductDetailBottomSheet.kt
+++ /dev/null
@@ -1,58 +0,0 @@
-package com.algokelvin.app.ui.detail
-
-import android.os.Bundle
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import androidx.fragment.app.FragmentManager
-import com.algokelvin.app.databinding.DialogProductDetailBinding
-import com.algokelvin.app.model.uimodel.ProductUIModel
-import com.google.android.material.bottomsheet.BottomSheetDialogFragment
-
-class ProductDetailBottomSheet : BottomSheetDialogFragment() {
- private var _binding: DialogProductDetailBinding? = null
- private val binding: DialogProductDetailBinding get() = _binding!!
-
- override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
- _binding = DialogProductDetailBinding.inflate(inflater, container, false)
- return binding.root
- }
-
- override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
- super.onViewCreated(view, savedInstanceState)
- initView()
- }
-
- override fun onDestroyView() {
- super.onDestroyView()
- _binding = null
- }
-
- private fun initView() {
- arguments?.let {
- val data = it.getParcelable(KEY_PRODUCT_DETAIL)?: return
-
- binding.txtName.text = data.name
- binding.txtPrice.text = priceIdr(data.price)
- }
- }
-
- private fun priceIdr(price: Int): String {
- return "Rp.$price,-"
- }
-
- companion object {
- private val TAG = ProductDetailBottomSheet::class.java.name
-
- private const val KEY_PRODUCT_DETAIL = "product_detail"
-
- fun show(fm: FragmentManager, product: ProductUIModel) {
- val sheet = ProductDetailBottomSheet()
- sheet.arguments = Bundle().apply {
- putParcelable(KEY_PRODUCT_DETAIL, product)
- }
- sheet.show(fm, TAG)
- }
- }
-
-}
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/ui/main/MainActivity.kt b/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/ui/main/MainActivity.kt
deleted file mode 100644
index c8f0c91e..00000000
--- a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/ui/main/MainActivity.kt
+++ /dev/null
@@ -1,62 +0,0 @@
-package com.algokelvin.app.ui.main
-
-import android.os.Bundle
-import androidx.lifecycle.ViewModelProvider
-import com.algokelvin.app.base.BaseActivity
-import com.algokelvin.app.databinding.ActivityMainBinding
-import com.algokelvin.app.model.Resource
-import com.algokelvin.app.model.uimodel.ProductUIModel
-import com.algokelvin.app.ui.adapter.ProductAdapter
-import com.algokelvin.app.ui.detail.ProductDetailBottomSheet
-
-class MainActivity : BaseActivity() {
- private lateinit var binding: ActivityMainBinding
-
- private val productAdapter by lazy { ProductAdapter(onItemClicked = ::onItemProductClicked) }
- private val mainViewModelFactory by lazy { MainViewModelFactory(applicationContext) }
- private val mainViewModel by lazy {
- ViewModelProvider(this, mainViewModelFactory)[MainViewModel::class.java]
- }
-
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- binding = ActivityMainBinding.inflate(layoutInflater)
- setContentView(binding.root)
-
- initView()
- getAllProducts()
- getDetailProductById()
- }
-
- private fun initView() {
- binding.listProduct.adapter = productAdapter
- }
-
- private fun getAllProducts() {
- mainViewModel.products.observe(this, {
- when(it.status) {
- Resource.Status.SUCCESS -> productAdapter.addAll(it.data!!)
- Resource.Status.LOADING -> toast("Getting the list of product")
- Resource.Status.ERROR -> {}
- }
- })
- }
-
- private fun getDetailProductById() {
- mainViewModel.productById.observe(this, {
- when(it.status) {
- Resource.Status.SUCCESS -> it.data?.let { product -> showProductDetailSheet(product) }
- Resource.Status.LOADING -> toast("Getting the product detail info")
- Resource.Status.ERROR -> {}
- }
- })
- }
-
- private fun showProductDetailSheet(product: ProductUIModel) {
- ProductDetailBottomSheet.show(fm = supportFragmentManager, product = product)
- }
-
- private fun onItemProductClicked(product: ProductUIModel) {
- mainViewModel.productId(product.id)
- }
-}
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/ui/main/MainViewModel.kt b/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/ui/main/MainViewModel.kt
deleted file mode 100644
index cda97e4d..00000000
--- a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/ui/main/MainViewModel.kt
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.algokelvin.app.ui.main
-
-import androidx.lifecycle.*
-import com.algokelvin.app.domain.*
-
-class MainViewModel(
- private val getProductById: GetProductByIdUseCase,
- getProducts: GetProductsUseCase
-): ViewModel() {
-
- private val _productId = MutableLiveData()
- val products = getProducts(Unit).asLiveData()
- val productById = _productId.switchMap { id ->
- getProductById(id).asLiveData()
- }
-
- fun productId(id: Int) {
- _productId.value = id
- }
-
-}
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/ui/main/MainViewModelFactory.kt b/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/ui/main/MainViewModelFactory.kt
deleted file mode 100644
index 613fc0b3..00000000
--- a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/ui/main/MainViewModelFactory.kt
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.algokelvin.app.ui.main
-
-import android.content.Context
-import androidx.lifecycle.ViewModel
-import androidx.lifecycle.ViewModelProvider
-import com.algokelvin.app.di.DependencyFactory
-import java.lang.IllegalArgumentException
-
-class MainViewModelFactory(private val context: Context): ViewModelProvider.Factory {
- override fun create(modelClass: Class): T {
- return if (modelClass.isAssignableFrom(MainViewModel::class.java)) {
- DependencyFactory.buildMainViewModel(context) as T
- } else {
- throw IllegalArgumentException("ViewModel not found")
- }
- }
-}
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/ui/uimodel/ProductUIModel.kt b/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/ui/uimodel/ProductUIModel.kt
deleted file mode 100644
index 8acb5fd6..00000000
--- a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/ui/uimodel/ProductUIModel.kt
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.algokelvin.app.ui.uimodel
-
-import android.os.Parcelable
-import kotlinx.parcelize.Parcelize
-
-@Parcelize
-data class ProductUIModel(
- var id: Int = 0,
- var name: String = "",
- var price: Int = 0
-) : Parcelable
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/ui/uimodel/ProductsUIModel.kt b/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/ui/uimodel/ProductsUIModel.kt
deleted file mode 100644
index 0a7833d6..00000000
--- a/CleanArchitectureMVVM/app/src/main/java/com/algokelvin/app/ui/uimodel/ProductsUIModel.kt
+++ /dev/null
@@ -1,9 +0,0 @@
-package com.algokelvin.app.ui.uimodel
-
-import android.os.Parcelable
-import kotlinx.parcelize.Parcelize
-
-@Parcelize
-data class ProductsUIModel(
- var data: List = emptyList()
-) : Parcelable
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/res/drawable/ic_launcher_background.xml b/CleanArchitectureMVVM/app/src/main/res/drawable/ic_launcher_background.xml
deleted file mode 100644
index 07d5da9c..00000000
--- a/CleanArchitectureMVVM/app/src/main/res/drawable/ic_launcher_background.xml
+++ /dev/null
@@ -1,170 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/CleanArchitectureMVVM/app/src/main/res/layout/activity_main.xml b/CleanArchitectureMVVM/app/src/main/res/layout/activity_main.xml
deleted file mode 100644
index 8249276f..00000000
--- a/CleanArchitectureMVVM/app/src/main/res/layout/activity_main.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/res/layout/dialog_product_detail.xml b/CleanArchitectureMVVM/app/src/main/res/layout/dialog_product_detail.xml
deleted file mode 100644
index a75d798a..00000000
--- a/CleanArchitectureMVVM/app/src/main/res/layout/dialog_product_detail.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/res/layout/item_product.xml b/CleanArchitectureMVVM/app/src/main/res/layout/item_product.xml
deleted file mode 100644
index 6fe794f7..00000000
--- a/CleanArchitectureMVVM/app/src/main/res/layout/item_product.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/CleanArchitectureMVVM/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
deleted file mode 100644
index eca70cfe..00000000
--- a/CleanArchitectureMVVM/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/CleanArchitectureMVVM/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
deleted file mode 100644
index eca70cfe..00000000
--- a/CleanArchitectureMVVM/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/res/mipmap-hdpi/ic_launcher.png b/CleanArchitectureMVVM/app/src/main/res/mipmap-hdpi/ic_launcher.png
deleted file mode 100644
index a571e600..00000000
Binary files a/CleanArchitectureMVVM/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ
diff --git a/CleanArchitectureMVVM/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/CleanArchitectureMVVM/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
deleted file mode 100644
index 61da551c..00000000
Binary files a/CleanArchitectureMVVM/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and /dev/null differ
diff --git a/CleanArchitectureMVVM/app/src/main/res/mipmap-mdpi/ic_launcher.png b/CleanArchitectureMVVM/app/src/main/res/mipmap-mdpi/ic_launcher.png
deleted file mode 100644
index c41dd285..00000000
Binary files a/CleanArchitectureMVVM/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ
diff --git a/CleanArchitectureMVVM/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/CleanArchitectureMVVM/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
deleted file mode 100644
index db5080a7..00000000
Binary files a/CleanArchitectureMVVM/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and /dev/null differ
diff --git a/CleanArchitectureMVVM/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/CleanArchitectureMVVM/app/src/main/res/mipmap-xhdpi/ic_launcher.png
deleted file mode 100644
index 6dba46da..00000000
Binary files a/CleanArchitectureMVVM/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ
diff --git a/CleanArchitectureMVVM/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/CleanArchitectureMVVM/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
deleted file mode 100644
index da31a871..00000000
Binary files a/CleanArchitectureMVVM/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/CleanArchitectureMVVM/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/CleanArchitectureMVVM/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
deleted file mode 100644
index 15ac6817..00000000
Binary files a/CleanArchitectureMVVM/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ
diff --git a/CleanArchitectureMVVM/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/CleanArchitectureMVVM/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
deleted file mode 100644
index b216f2d3..00000000
Binary files a/CleanArchitectureMVVM/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/CleanArchitectureMVVM/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/CleanArchitectureMVVM/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
deleted file mode 100644
index f25a4197..00000000
Binary files a/CleanArchitectureMVVM/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ
diff --git a/CleanArchitectureMVVM/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/CleanArchitectureMVVM/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
deleted file mode 100644
index e96783cc..00000000
Binary files a/CleanArchitectureMVVM/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/CleanArchitectureMVVM/app/src/main/res/values-night/themes.xml b/CleanArchitectureMVVM/app/src/main/res/values-night/themes.xml
deleted file mode 100644
index a6c0e208..00000000
--- a/CleanArchitectureMVVM/app/src/main/res/values-night/themes.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/res/values/colors.xml b/CleanArchitectureMVVM/app/src/main/res/values/colors.xml
deleted file mode 100644
index f8c6127d..00000000
--- a/CleanArchitectureMVVM/app/src/main/res/values/colors.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
- #FFBB86FC
- #FF6200EE
- #FF3700B3
- #FF03DAC5
- #FF018786
- #FF000000
- #FFFFFFFF
-
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/res/values/strings.xml b/CleanArchitectureMVVM/app/src/main/res/values/strings.xml
deleted file mode 100644
index c378d60e..00000000
--- a/CleanArchitectureMVVM/app/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- MVVM_CleanArch_App
-
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/app/src/main/res/values/themes.xml b/CleanArchitectureMVVM/app/src/main/res/values/themes.xml
deleted file mode 100644
index 38fe1bdf..00000000
--- a/CleanArchitectureMVVM/app/src/main/res/values/themes.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/build.gradle b/CleanArchitectureMVVM/build.gradle
deleted file mode 100644
index 602817e6..00000000
--- a/CleanArchitectureMVVM/build.gradle
+++ /dev/null
@@ -1,30 +0,0 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
-buildscript {
- ext {
- kotlin_version = "1.4.32"
- roomVersion = "2.3.0"
- }
- repositories {
- google()
- mavenCentral()
- }
- dependencies {
- classpath "com.android.tools.build:gradle:4.2.0"
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
-
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
- }
-}
-
-allprojects {
- repositories {
- google()
- mavenCentral()
- //jcenter() // Warning: this repository is going to shut down soon
- }
-}
-
-task clean(type: Delete) {
- delete rootProject.buildDir
-}
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/gradle.properties b/CleanArchitectureMVVM/gradle.properties
deleted file mode 100644
index 25217527..00000000
--- a/CleanArchitectureMVVM/gradle.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-# Project-wide Gradle settings.
-# IDE (e.g. Android Studio) users:
-# Gradle settings configured through the IDE *will override*
-# any settings specified in this file.
-# For more details on how to configure your build environment visit
-# http://www.gradle.org/docs/current/userguide/build_environment.html
-# Specifies the JVM arguments used for the daemon process.
-# The setting is particularly useful for tweaking memory settings.
-org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
-# When configured, Gradle will run in incubating parallel mode.
-# This option should only be used with decoupled projects. More details, visit
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
-# org.gradle.parallel=true
-# AndroidX package structure to make it clearer which packages are bundled with the
-# Android operating system, and which are packaged with your app"s APK
-# https://developer.android.com/topic/libraries/support-library/androidx-rn
-android.useAndroidX=true
-# Kotlin code style for this project: "official" or "obsolete":
-kotlin.code.style=official
\ No newline at end of file
diff --git a/CleanArchitectureMVVM/gradle/wrapper/gradle-wrapper.jar b/CleanArchitectureMVVM/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index f6b961fd..00000000
Binary files a/CleanArchitectureMVVM/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/CleanArchitectureMVVM/gradle/wrapper/gradle-wrapper.properties b/CleanArchitectureMVVM/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 7a15355f..00000000
--- a/CleanArchitectureMVVM/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Mon Oct 18 20:24:53 WIB 2021
-distributionBase=GRADLE_USER_HOME
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
-distributionPath=wrapper/dists
-zipStorePath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
diff --git a/CleanArchitectureMVVM/gradlew b/CleanArchitectureMVVM/gradlew
deleted file mode 100644
index cccdd3d5..00000000
--- a/CleanArchitectureMVVM/gradlew
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/usr/bin/env sh
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn () {
- echo "$*"
-}
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=$((i+1))
- done
- case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=$(save "$@")
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-
-# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
-if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
- cd "$(dirname "$0")"
-fi
-
-exec "$JAVACMD" "$@"
diff --git a/CleanArchitectureMVVM/gradlew.bat b/CleanArchitectureMVVM/gradlew.bat
deleted file mode 100644
index f9553162..00000000
--- a/CleanArchitectureMVVM/gradlew.bat
+++ /dev/null
@@ -1,84 +0,0 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/CleanArchitectureMVVM/settings.gradle b/CleanArchitectureMVVM/settings.gradle
deleted file mode 100644
index 9ad6d48c..00000000
--- a/CleanArchitectureMVVM/settings.gradle
+++ /dev/null
@@ -1,2 +0,0 @@
-rootProject.name = "MVVM_CleanArch_App"
-include ':app'
diff --git a/BirthdayCardCompose/.gitignore b/ComposeTextImage/.gitignore
similarity index 100%
rename from BirthdayCardCompose/.gitignore
rename to ComposeTextImage/.gitignore
diff --git a/ComposeTextImage/README.md b/ComposeTextImage/README.md
new file mode 100644
index 00000000..3fa6505f
--- /dev/null
+++ b/ComposeTextImage/README.md
@@ -0,0 +1,4 @@
+# Compose Text Image
+
+--- VERSION ---
+- 1.0.0 : Create APK Project
\ No newline at end of file
diff --git a/AnimationApp/app/.gitignore b/ComposeTextImage/app/.gitignore
similarity index 100%
rename from AnimationApp/app/.gitignore
rename to ComposeTextImage/app/.gitignore
diff --git a/ComposeTextImage/app/build.gradle b/ComposeTextImage/app/build.gradle
new file mode 100644
index 00000000..2b2f7505
--- /dev/null
+++ b/ComposeTextImage/app/build.gradle
@@ -0,0 +1,66 @@
+plugins {
+ alias(libs.plugins.android.application)
+ alias(libs.plugins.jetbrains.kotlin.android)
+}
+
+android {
+ namespace 'com.algokelvin.imagetext'
+ compileSdk 35
+
+ defaultConfig {
+ applicationId "com.algokelvin.imagetext"
+ minSdk 24
+ targetSdk 35
+ versionCode 1
+ versionName "1.0.0"
+
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ vectorDrawables {
+ useSupportLibrary true
+ }
+ }
+
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+ }
+ }
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
+ kotlinOptions {
+ jvmTarget = '1.8'
+ }
+ buildFeatures {
+ compose true
+ viewBinding true
+ }
+ composeOptions {
+ kotlinCompilerExtensionVersion '1.5.1'
+ }
+ packaging {
+ resources {
+ excludes += '/META-INF/{AL2.0,LGPL2.1}'
+ }
+ }
+}
+
+dependencies {
+ implementation libs.androidx.core.ktx
+ implementation libs.androidx.lifecycle.runtime.ktx
+ implementation libs.androidx.activity.compose
+ implementation platform(libs.androidx.compose.bom)
+ implementation libs.androidx.ui
+ implementation libs.androidx.ui.graphics
+ implementation libs.androidx.ui.tooling.preview
+ implementation libs.androidx.material3
+ testImplementation libs.junit
+ androidTestImplementation libs.androidx.junit
+ androidTestImplementation libs.androidx.espresso.core
+ androidTestImplementation platform(libs.androidx.compose.bom)
+ androidTestImplementation libs.androidx.ui.test.junit4
+ debugImplementation libs.androidx.ui.tooling
+ debugImplementation libs.androidx.ui.test.manifest
+}
\ No newline at end of file
diff --git a/AnimationApp/app/proguard-rules.pro b/ComposeTextImage/app/proguard-rules.pro
similarity index 100%
rename from AnimationApp/app/proguard-rules.pro
rename to ComposeTextImage/app/proguard-rules.pro
diff --git a/ImageText/app/src/androidTest/java/com/algokelvin/imagetext/ExampleInstrumentedTest.kt b/ComposeTextImage/app/src/androidTest/java/com/algokelvin/imagetext/ExampleInstrumentedTest.kt
similarity index 100%
rename from ImageText/app/src/androidTest/java/com/algokelvin/imagetext/ExampleInstrumentedTest.kt
rename to ComposeTextImage/app/src/androidTest/java/com/algokelvin/imagetext/ExampleInstrumentedTest.kt
diff --git a/ImageTextCompose/app/src/main/AndroidManifest.xml b/ComposeTextImage/app/src/main/AndroidManifest.xml
similarity index 100%
rename from ImageTextCompose/app/src/main/AndroidManifest.xml
rename to ComposeTextImage/app/src/main/AndroidManifest.xml
diff --git a/ComposeTextImage/app/src/main/ic_launcher-playstore.png b/ComposeTextImage/app/src/main/ic_launcher-playstore.png
new file mode 100644
index 00000000..afeecb3b
Binary files /dev/null and b/ComposeTextImage/app/src/main/ic_launcher-playstore.png differ
diff --git a/ImageTextCompose/app/src/main/java/com/algokelvin/imagetext/MainActivity.kt b/ComposeTextImage/app/src/main/java/com/algokelvin/imagetext/MainActivity.kt
similarity index 100%
rename from ImageTextCompose/app/src/main/java/com/algokelvin/imagetext/MainActivity.kt
rename to ComposeTextImage/app/src/main/java/com/algokelvin/imagetext/MainActivity.kt
diff --git a/ImageTextCompose/app/src/main/java/com/algokelvin/imagetext/ui/theme/Color.kt b/ComposeTextImage/app/src/main/java/com/algokelvin/imagetext/ui/theme/Color.kt
similarity index 100%
rename from ImageTextCompose/app/src/main/java/com/algokelvin/imagetext/ui/theme/Color.kt
rename to ComposeTextImage/app/src/main/java/com/algokelvin/imagetext/ui/theme/Color.kt
diff --git a/ImageTextCompose/app/src/main/java/com/algokelvin/imagetext/ui/theme/Theme.kt b/ComposeTextImage/app/src/main/java/com/algokelvin/imagetext/ui/theme/Theme.kt
similarity index 100%
rename from ImageTextCompose/app/src/main/java/com/algokelvin/imagetext/ui/theme/Theme.kt
rename to ComposeTextImage/app/src/main/java/com/algokelvin/imagetext/ui/theme/Theme.kt
diff --git a/ImageTextCompose/app/src/main/java/com/algokelvin/imagetext/ui/theme/Type.kt b/ComposeTextImage/app/src/main/java/com/algokelvin/imagetext/ui/theme/Type.kt
similarity index 100%
rename from ImageTextCompose/app/src/main/java/com/algokelvin/imagetext/ui/theme/Type.kt
rename to ComposeTextImage/app/src/main/java/com/algokelvin/imagetext/ui/theme/Type.kt
diff --git a/ImageTextCompose/app/src/main/res/drawable/ic_compose.png b/ComposeTextImage/app/src/main/res/drawable/ic_compose.png
similarity index 100%
rename from ImageTextCompose/app/src/main/res/drawable/ic_compose.png
rename to ComposeTextImage/app/src/main/res/drawable/ic_compose.png
diff --git a/ComposeTextImage/app/src/main/res/drawable/ic_launcher_background.xml b/ComposeTextImage/app/src/main/res/drawable/ic_launcher_background.xml
new file mode 100644
index 00000000..ca3826a4
--- /dev/null
+++ b/ComposeTextImage/app/src/main/res/drawable/ic_launcher_background.xml
@@ -0,0 +1,74 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/BirthdayCardCompose/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/ComposeTextImage/app/src/main/res/drawable/ic_launcher_foreground.xml
similarity index 100%
rename from BirthdayCardCompose/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
rename to ComposeTextImage/app/src/main/res/drawable/ic_launcher_foreground.xml
diff --git a/ImageTextCompose/app/src/main/res/layout/activity_main.xml b/ComposeTextImage/app/src/main/res/layout/activity_main.xml
similarity index 100%
rename from ImageTextCompose/app/src/main/res/layout/activity_main.xml
rename to ComposeTextImage/app/src/main/res/layout/activity_main.xml
diff --git a/ComposeTextImage/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/ComposeTextImage/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 00000000..c4a603d4
--- /dev/null
+++ b/ComposeTextImage/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/ComposeTextImage/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/ComposeTextImage/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
new file mode 100644
index 00000000..c4a603d4
--- /dev/null
+++ b/ComposeTextImage/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/ComposeTextImage/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/ComposeTextImage/app/src/main/res/mipmap-hdpi/ic_launcher.webp
new file mode 100644
index 00000000..1f4c0d01
Binary files /dev/null and b/ComposeTextImage/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ
diff --git a/ComposeTextImage/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp b/ComposeTextImage/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..7b289835
Binary files /dev/null and b/ComposeTextImage/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp differ
diff --git a/ComposeTextImage/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/ComposeTextImage/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
new file mode 100644
index 00000000..1a6ccc46
Binary files /dev/null and b/ComposeTextImage/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ
diff --git a/ComposeTextImage/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/ComposeTextImage/app/src/main/res/mipmap-mdpi/ic_launcher.webp
new file mode 100644
index 00000000..559e666e
Binary files /dev/null and b/ComposeTextImage/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ
diff --git a/ComposeTextImage/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp b/ComposeTextImage/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..cd0a7975
Binary files /dev/null and b/ComposeTextImage/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp differ
diff --git a/ComposeTextImage/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/ComposeTextImage/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
new file mode 100644
index 00000000..617fd9ea
Binary files /dev/null and b/ComposeTextImage/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ
diff --git a/ComposeTextImage/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/ComposeTextImage/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
new file mode 100644
index 00000000..5efb6422
Binary files /dev/null and b/ComposeTextImage/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ
diff --git a/ComposeTextImage/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp b/ComposeTextImage/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..bcae5e61
Binary files /dev/null and b/ComposeTextImage/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp differ
diff --git a/ComposeTextImage/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/ComposeTextImage/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
new file mode 100644
index 00000000..0cb98685
Binary files /dev/null and b/ComposeTextImage/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ
diff --git a/ComposeTextImage/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/ComposeTextImage/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
new file mode 100644
index 00000000..ee8d549c
Binary files /dev/null and b/ComposeTextImage/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ
diff --git a/ComposeTextImage/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp b/ComposeTextImage/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..f8f8d033
Binary files /dev/null and b/ComposeTextImage/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp differ
diff --git a/ComposeTextImage/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/ComposeTextImage/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
new file mode 100644
index 00000000..ef80d15c
Binary files /dev/null and b/ComposeTextImage/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ
diff --git a/ComposeTextImage/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/ComposeTextImage/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
new file mode 100644
index 00000000..b4e0005b
Binary files /dev/null and b/ComposeTextImage/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ
diff --git a/ComposeTextImage/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp b/ComposeTextImage/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..fed1a6c4
Binary files /dev/null and b/ComposeTextImage/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp differ
diff --git a/ComposeTextImage/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/ComposeTextImage/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
new file mode 100644
index 00000000..31b5df0a
Binary files /dev/null and b/ComposeTextImage/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ
diff --git a/AnimationApp/app/src/main/res/values/colors.xml b/ComposeTextImage/app/src/main/res/values/colors.xml
similarity index 100%
rename from AnimationApp/app/src/main/res/values/colors.xml
rename to ComposeTextImage/app/src/main/res/values/colors.xml
diff --git a/ImageTextCompose/app/src/main/res/values/strings.xml b/ComposeTextImage/app/src/main/res/values/strings.xml
similarity index 100%
rename from ImageTextCompose/app/src/main/res/values/strings.xml
rename to ComposeTextImage/app/src/main/res/values/strings.xml
diff --git a/ImageTextCompose/app/src/main/res/values/themes.xml b/ComposeTextImage/app/src/main/res/values/themes.xml
similarity index 100%
rename from ImageTextCompose/app/src/main/res/values/themes.xml
rename to ComposeTextImage/app/src/main/res/values/themes.xml
diff --git a/BirthdayCardCompose/app/src/main/res/xml/backup_rules.xml b/ComposeTextImage/app/src/main/res/xml/backup_rules.xml
similarity index 100%
rename from BirthdayCardCompose/app/src/main/res/xml/backup_rules.xml
rename to ComposeTextImage/app/src/main/res/xml/backup_rules.xml
diff --git a/CalculatorCompose/app/src/main/res/xml/data_extraction_rules.xml b/ComposeTextImage/app/src/main/res/xml/data_extraction_rules.xml
similarity index 100%
rename from CalculatorCompose/app/src/main/res/xml/data_extraction_rules.xml
rename to ComposeTextImage/app/src/main/res/xml/data_extraction_rules.xml
diff --git a/ImageText/app/src/test/java/com/algokelvin/imagetext/ExampleUnitTest.kt b/ComposeTextImage/app/src/test/java/com/algokelvin/imagetext/ExampleUnitTest.kt
similarity index 100%
rename from ImageText/app/src/test/java/com/algokelvin/imagetext/ExampleUnitTest.kt
rename to ComposeTextImage/app/src/test/java/com/algokelvin/imagetext/ExampleUnitTest.kt
diff --git a/CalculatorCompose/build.gradle b/ComposeTextImage/build.gradle
similarity index 100%
rename from CalculatorCompose/build.gradle
rename to ComposeTextImage/build.gradle
diff --git a/ECommerce/gradle.properties b/ComposeTextImage/gradle.properties
similarity index 100%
rename from ECommerce/gradle.properties
rename to ComposeTextImage/gradle.properties
diff --git a/ComposeTextImage/gradle/libs.versions.toml b/ComposeTextImage/gradle/libs.versions.toml
new file mode 100644
index 00000000..c0e28329
--- /dev/null
+++ b/ComposeTextImage/gradle/libs.versions.toml
@@ -0,0 +1,31 @@
+[versions]
+agp = "8.10.1"
+kotlin = "1.9.0"
+coreKtx = "1.15.0"
+junit = "4.13.2"
+junitVersion = "1.2.1"
+espressoCore = "3.6.1"
+lifecycleRuntimeKtx = "2.8.7"
+activityCompose = "1.10.1"
+composeBom = "2024.04.01"
+
+[libraries]
+androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
+junit = { group = "junit", name = "junit", version.ref = "junit" }
+androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
+androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
+androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" }
+androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" }
+androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" }
+androidx-ui = { group = "androidx.compose.ui", name = "ui" }
+androidx-ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" }
+androidx-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
+androidx-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" }
+androidx-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" }
+androidx-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }
+androidx-material3 = { group = "androidx.compose.material3", name = "material3" }
+
+[plugins]
+android-application = { id = "com.android.application", version.ref = "agp" }
+jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
+
diff --git a/CalculatorCompose/gradle/wrapper/gradle-wrapper.jar b/ComposeTextImage/gradle/wrapper/gradle-wrapper.jar
similarity index 100%
rename from CalculatorCompose/gradle/wrapper/gradle-wrapper.jar
rename to ComposeTextImage/gradle/wrapper/gradle-wrapper.jar
diff --git a/ComposeTextImage/gradle/wrapper/gradle-wrapper.properties b/ComposeTextImage/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 00000000..eed34ba2
--- /dev/null
+++ b/ComposeTextImage/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Tue Mar 11 15:45:16 WIB 2025
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/CalculatorCompose/gradlew b/ComposeTextImage/gradlew
similarity index 100%
rename from CalculatorCompose/gradlew
rename to ComposeTextImage/gradlew
diff --git a/CalculatorCompose/gradlew.bat b/ComposeTextImage/gradlew.bat
similarity index 100%
rename from CalculatorCompose/gradlew.bat
rename to ComposeTextImage/gradlew.bat
diff --git a/ImageText/settings.gradle b/ComposeTextImage/settings.gradle
similarity index 100%
rename from ImageText/settings.gradle
rename to ComposeTextImage/settings.gradle
diff --git a/ConnectHealthApp/.idea/workspace.xml b/ConnectHealthApp/.idea/workspace.xml
new file mode 100644
index 00000000..8f263305
--- /dev/null
+++ b/ConnectHealthApp/.idea/workspace.xml
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1757152979077
+
+
+ 1757152979077
+
+
+
+
\ No newline at end of file
diff --git a/CountNumberCompose/README.md b/CountNumberCompose/README.md
deleted file mode 100644
index 5c182ee5..00000000
--- a/CountNumberCompose/README.md
+++ /dev/null
@@ -1,37 +0,0 @@
-## Count Number Compose
-
-|  |  |  |
-|:---------------------------------------------------------:|:---------------------------------------------------------:|:---------------------------------------------------------:|
-| Gambar 1: Page Count 1 | Gambar 2: Page Count 2 | Gambar 3: Page Count 3 |
-
-## Implementation
-- Jetpack Compose
-
-## Environment
-- **Android Gradle**: 8.5.0
-- **Plugins Version**: 8.7
-- **Gradle Version**: 8.0
-- **Java JDK**: 17
-- **Kotlin Version**: 1.9.0
-- **Min SDK**: 21
-- **Target SDK**: 34
-
-## Contributors
-Thanks all contributors for build this repository
-
-```
-Copyright [2021] [The Dictionary of Android Projects]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-```
diff --git a/CountNumberCompose/app/build.gradle b/CountNumberCompose/app/build.gradle
deleted file mode 100644
index 6fa91d26..00000000
--- a/CountNumberCompose/app/build.gradle
+++ /dev/null
@@ -1,63 +0,0 @@
-plugins {
- id 'com.android.application'
- id 'org.jetbrains.kotlin.android'
-}
-
-android {
- namespace 'algokelvin.app.countnumbercompose'
- compileSdk 32
-
- defaultConfig {
- applicationId "algokelvin.app.countnumbercompose"
- minSdk 21
- targetSdk 32
- versionCode 1
- versionName "1.0"
-
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- vectorDrawables {
- useSupportLibrary true
- }
- }
-
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- }
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- kotlinOptions {
- jvmTarget = '1.8'
- }
- buildFeatures {
- compose true
- }
- composeOptions {
- kotlinCompilerExtensionVersion '1.1.1'
- }
- packagingOptions {
- resources {
- excludes += '/META-INF/{AL2.0,LGPL2.1}'
- }
- }
-}
-
-dependencies {
- implementation 'androidx.core:core-ktx:1.7.0'
- implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
- implementation 'androidx.activity:activity-compose:1.3.1'
- implementation "androidx.compose.ui:ui:$compose_ui_version"
- implementation "androidx.compose.ui:ui-tooling-preview:$compose_ui_version"
- implementation 'androidx.compose.material:material:1.1.1'
-
- testImplementation 'junit:junit:4.13.2'
- androidTestImplementation 'androidx.test.ext:junit:1.1.3'
- androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
- androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_ui_version"
- debugImplementation "androidx.compose.ui:ui-tooling:$compose_ui_version"
- debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_ui_version"
-}
\ No newline at end of file
diff --git a/CountNumberCompose/app/src/main/AndroidManifest.xml b/CountNumberCompose/app/src/main/AndroidManifest.xml
deleted file mode 100644
index 51343a3b..00000000
--- a/CountNumberCompose/app/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/CountNumberCompose/app/src/main/java/algokelvin/app/countnumbercompose/MainActivity.kt b/CountNumberCompose/app/src/main/java/algokelvin/app/countnumbercompose/MainActivity.kt
deleted file mode 100644
index fe434510..00000000
--- a/CountNumberCompose/app/src/main/java/algokelvin/app/countnumbercompose/MainActivity.kt
+++ /dev/null
@@ -1,120 +0,0 @@
-package algokelvin.app.countnumbercompose
-
-import android.content.Context
-import android.os.Bundle
-import android.widget.Toast
-import androidx.activity.ComponentActivity
-import androidx.activity.compose.setContent
-import androidx.compose.foundation.layout.*
-import androidx.compose.foundation.text.KeyboardOptions
-import androidx.compose.material.*
-import androidx.compose.runtime.*
-import androidx.compose.ui.Modifier
-import androidx.compose.ui.graphics.Color
-import androidx.compose.ui.platform.LocalContext
-import androidx.compose.ui.text.TextStyle
-import androidx.compose.ui.text.font.FontWeight
-import androidx.compose.ui.text.input.KeyboardType
-import androidx.compose.ui.tooling.preview.Preview
-import androidx.compose.ui.unit.dp
-import androidx.compose.ui.unit.sp
-import algokelvin.app.countnumbercompose.ui.theme.EffectsDemo1Theme
-import kotlinx.coroutines.CoroutineScope
-import kotlinx.coroutines.launch
-
-class MainActivity : ComponentActivity() {
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- setContent {
- EffectsDemo1Theme {
- Surface(
- modifier = Modifier.fillMaxSize(),
- color = MaterialTheme.colors.background
- ) {
- MainScreen()
- }
- }
- }
- }
-}
-
-@Preview
-@Composable
-fun MainScreen(
- modifier: Modifier = Modifier,
- context: Context = LocalContext.current
-) {
- var round by remember { mutableStateOf(1) }
- var total by remember { mutableStateOf(0.0) }
- var input by remember { mutableStateOf("") }
-
- val scaffoldState: ScaffoldState = rememberScaffoldState()
- val coroutineScope: CoroutineScope = rememberCoroutineScope()
-
- Scaffold(scaffoldState = scaffoldState) {
- // LaunchedEffect
- LaunchedEffect(key1 = round) {
- Toast.makeText(context, context.getString(R.string.start_your_app), Toast.LENGTH_LONG).show() // Using Toast
- scaffoldState.snackbarHostState.showSnackbar( // Using scaffoldState
- message = context.getString(R.string.enjoy_this),
- duration = SnackbarDuration.Short
- )
- }
-
- Column(
- modifier = Modifier
- .fillMaxSize()
- .padding(40.dp),
- verticalArrangement = Arrangement.spacedBy(8.dp)
- ) {
- Text(
- text = context.getString(R.string.total_count, total.toString()),
- fontWeight = FontWeight.Bold,
- fontSize = 30.sp,
- color = Color.DarkGray
- )
- OutlinedTextField(
- placeholder = { Text(context.getString(R.string.enter_value)) },
- value = input,
- onValueChange = {
- input = it
- },
- textStyle = TextStyle(
- color = Color.LightGray,
- fontSize = 30.sp,
- fontWeight = FontWeight.Bold
- ),
- label = {
- Text(
- text = context.getString(R.string.new_count),
- fontSize = 30.sp
- )},
- keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Number)
- )
-
- Button(
- onClick = {
- total += input.toDouble()
- coroutineScope.launch {
- scaffoldState.snackbarHostState.showSnackbar(
- message = context.getString(R.string.count_updated),
- duration = SnackbarDuration.Short
- )
- }
- if (total > 300) {
- total = 0.0
- input = ""
- round++
- }
- }
- ) {
- Text(
- text = context.getString(R.string.count),
- fontSize = 30.sp,
- fontWeight = FontWeight.Bold
- )
- }
- }
- }
-}
-
diff --git a/CountNumberCompose/app/src/main/java/algokelvin/app/countnumbercompose/ui/theme/Color.kt b/CountNumberCompose/app/src/main/java/algokelvin/app/countnumbercompose/ui/theme/Color.kt
deleted file mode 100644
index 1dc14b6e..00000000
--- a/CountNumberCompose/app/src/main/java/algokelvin/app/countnumbercompose/ui/theme/Color.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package algokelvin.app.countnumbercompose.ui.theme
-
-import androidx.compose.ui.graphics.Color
-
-val Purple200 = Color(0xFFBB86FC)
-val Purple500 = Color(0xFF6200EE)
-val Purple700 = Color(0xFF3700B3)
-val Teal200 = Color(0xFF03DAC5)
\ No newline at end of file
diff --git a/CountNumberCompose/app/src/main/java/algokelvin/app/countnumbercompose/ui/theme/Shape.kt b/CountNumberCompose/app/src/main/java/algokelvin/app/countnumbercompose/ui/theme/Shape.kt
deleted file mode 100644
index ea2d6aa6..00000000
--- a/CountNumberCompose/app/src/main/java/algokelvin/app/countnumbercompose/ui/theme/Shape.kt
+++ /dev/null
@@ -1,11 +0,0 @@
-package algokelvin.app.countnumbercompose.ui.theme
-
-import androidx.compose.foundation.shape.RoundedCornerShape
-import androidx.compose.material.Shapes
-import androidx.compose.ui.unit.dp
-
-val Shapes = Shapes(
- small = RoundedCornerShape(4.dp),
- medium = RoundedCornerShape(4.dp),
- large = RoundedCornerShape(0.dp)
-)
\ No newline at end of file
diff --git a/CountNumberCompose/app/src/main/java/algokelvin/app/countnumbercompose/ui/theme/Theme.kt b/CountNumberCompose/app/src/main/java/algokelvin/app/countnumbercompose/ui/theme/Theme.kt
deleted file mode 100644
index 906e596d..00000000
--- a/CountNumberCompose/app/src/main/java/algokelvin/app/countnumbercompose/ui/theme/Theme.kt
+++ /dev/null
@@ -1,44 +0,0 @@
-package algokelvin.app.countnumbercompose.ui.theme
-
-import androidx.compose.foundation.isSystemInDarkTheme
-import androidx.compose.material.MaterialTheme
-import androidx.compose.material.darkColors
-import androidx.compose.material.lightColors
-import androidx.compose.runtime.Composable
-
-private val DarkColorPalette = darkColors(
- primary = Purple200,
- primaryVariant = Purple700,
- secondary = Teal200
-)
-
-private val LightColorPalette = lightColors(
- primary = Purple500,
- primaryVariant = Purple700,
- secondary = Teal200
-
- /* Other default colors to override
- background = Color.White,
- surface = Color.White,
- onPrimary = Color.White,
- onSecondary = Color.Black,
- onBackground = Color.Black,
- onSurface = Color.Black,
- */
-)
-
-@Composable
-fun EffectsDemo1Theme(darkTheme: Boolean = isSystemInDarkTheme(), content: @Composable () -> Unit) {
- val colors = if (darkTheme) {
- DarkColorPalette
- } else {
- LightColorPalette
- }
-
- MaterialTheme(
- colors = colors,
- typography = Typography,
- shapes = Shapes,
- content = content
- )
-}
\ No newline at end of file
diff --git a/CountNumberCompose/app/src/main/java/algokelvin/app/countnumbercompose/ui/theme/Type.kt b/CountNumberCompose/app/src/main/java/algokelvin/app/countnumbercompose/ui/theme/Type.kt
deleted file mode 100644
index d9d69452..00000000
--- a/CountNumberCompose/app/src/main/java/algokelvin/app/countnumbercompose/ui/theme/Type.kt
+++ /dev/null
@@ -1,28 +0,0 @@
-package algokelvin.app.countnumbercompose.ui.theme
-
-import androidx.compose.material.Typography
-import androidx.compose.ui.text.TextStyle
-import androidx.compose.ui.text.font.FontFamily
-import androidx.compose.ui.text.font.FontWeight
-import androidx.compose.ui.unit.sp
-
-// Set of Material typography styles to start with
-val Typography = Typography(
- body1 = TextStyle(
- fontFamily = FontFamily.Default,
- fontWeight = FontWeight.Normal,
- fontSize = 16.sp
- )
- /* Other default text styles to override
- button = TextStyle(
- fontFamily = FontFamily.Default,
- fontWeight = FontWeight.W500,
- fontSize = 14.sp
- ),
- caption = TextStyle(
- fontFamily = FontFamily.Default,
- fontWeight = FontWeight.Normal,
- fontSize = 12.sp
- )
- */
-)
\ No newline at end of file
diff --git a/CountNumberCompose/app/src/main/res/drawable/ic_launcher_background.xml b/CountNumberCompose/app/src/main/res/drawable/ic_launcher_background.xml
deleted file mode 100644
index 07d5da9c..00000000
--- a/CountNumberCompose/app/src/main/res/drawable/ic_launcher_background.xml
+++ /dev/null
@@ -1,170 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/CountNumberCompose/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/CountNumberCompose/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
deleted file mode 100644
index eca70cfe..00000000
--- a/CountNumberCompose/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/CountNumberCompose/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/CountNumberCompose/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
deleted file mode 100644
index eca70cfe..00000000
--- a/CountNumberCompose/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/CountNumberCompose/app/src/main/res/values/colors.xml b/CountNumberCompose/app/src/main/res/values/colors.xml
deleted file mode 100644
index f8c6127d..00000000
--- a/CountNumberCompose/app/src/main/res/values/colors.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
- #FFBB86FC
- #FF6200EE
- #FF3700B3
- #FF03DAC5
- #FF018786
- #FF000000
- #FFFFFFFF
-
\ No newline at end of file
diff --git a/CountNumberCompose/app/src/main/res/values/strings.xml b/CountNumberCompose/app/src/main/res/values/strings.xml
deleted file mode 100644
index f3283997..00000000
--- a/CountNumberCompose/app/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
- EffectsDemo1
- Start Your App
- Enjoy This
- Enter value here
- New count
- Count Updated
- Count
- Total is %s
-
\ No newline at end of file
diff --git a/CountNumberCompose/app/src/main/res/values/themes.xml b/CountNumberCompose/app/src/main/res/values/themes.xml
deleted file mode 100644
index 78e632f3..00000000
--- a/CountNumberCompose/app/src/main/res/values/themes.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/CountNumberCompose/build.gradle b/CountNumberCompose/build.gradle
deleted file mode 100644
index 551dfef3..00000000
--- a/CountNumberCompose/build.gradle
+++ /dev/null
@@ -1,11 +0,0 @@
-buildscript {
- ext {
- compose_ui_version = '1.1.1'
- agp_version = '8.5.0'
- }
-}// Top-level build file where you can add configuration options common to all sub-projects/modules.
-plugins {
- id 'com.android.application' version '8.5.0' apply false
- id 'com.android.library' version '7.3.1' apply false
- id 'org.jetbrains.kotlin.android' version '1.6.10' apply false
-}
\ No newline at end of file
diff --git a/CountNumberCompose/documentation/SS_CountNumberCompose_01.jpg b/CountNumberCompose/documentation/SS_CountNumberCompose_01.jpg
deleted file mode 100644
index b94e12d2..00000000
Binary files a/CountNumberCompose/documentation/SS_CountNumberCompose_01.jpg and /dev/null differ
diff --git a/CountNumberCompose/documentation/SS_CountNumberCompose_02.jpg b/CountNumberCompose/documentation/SS_CountNumberCompose_02.jpg
deleted file mode 100644
index 6107d77b..00000000
Binary files a/CountNumberCompose/documentation/SS_CountNumberCompose_02.jpg and /dev/null differ
diff --git a/CountNumberCompose/documentation/SS_CountNumberCompose_03.jpg b/CountNumberCompose/documentation/SS_CountNumberCompose_03.jpg
deleted file mode 100644
index 43d95772..00000000
Binary files a/CountNumberCompose/documentation/SS_CountNumberCompose_03.jpg and /dev/null differ
diff --git a/CountNumberCompose/gradle.properties b/CountNumberCompose/gradle.properties
deleted file mode 100644
index 3c5031eb..00000000
--- a/CountNumberCompose/gradle.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-# Project-wide Gradle settings.
-# IDE (e.g. Android Studio) users:
-# Gradle settings configured through the IDE *will override*
-# any settings specified in this file.
-# For more details on how to configure your build environment visit
-# http://www.gradle.org/docs/current/userguide/build_environment.html
-# Specifies the JVM arguments used for the daemon process.
-# The setting is particularly useful for tweaking memory settings.
-org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
-# When configured, Gradle will run in incubating parallel mode.
-# This option should only be used with decoupled projects. More details, visit
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
-# org.gradle.parallel=true
-# AndroidX package structure to make it clearer which packages are bundled with the
-# Android operating system, and which are packaged with your app's APK
-# https://developer.android.com/topic/libraries/support-library/androidx-rn
-android.useAndroidX=true
-# Kotlin code style for this project: "official" or "obsolete":
-kotlin.code.style=official
-# Enables namespacing of each library's R class so that its R class includes only the
-# resources declared in the library itself and none from the library's dependencies,
-# thereby reducing the size of the R class for that library
-android.nonTransitiveRClass=true
\ No newline at end of file
diff --git a/CountNumberCompose/gradle/wrapper/gradle-wrapper.properties b/CountNumberCompose/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 3c2d0b41..00000000
--- a/CountNumberCompose/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Sun Feb 23 14:21:04 WIB 2025
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
diff --git a/CountNumberCompose/settings.gradle b/CountNumberCompose/settings.gradle
deleted file mode 100644
index a613e19b..00000000
--- a/CountNumberCompose/settings.gradle
+++ /dev/null
@@ -1,16 +0,0 @@
-pluginManagement {
- repositories {
- gradlePluginPortal()
- google()
- mavenCentral()
- }
-}
-dependencyResolutionManagement {
- repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
- repositories {
- google()
- mavenCentral()
- }
-}
-rootProject.name = "EffectsDemo1"
-include ':app'
diff --git a/DesignUIToast/README.md b/DesignUIToast/README.md
deleted file mode 100644
index 920cff84..00000000
--- a/DesignUIToast/README.md
+++ /dev/null
@@ -1,37 +0,0 @@
-## Design UI Toast
-
-|  |
-|:-------------------------------------------------:|
-| Gambar 1: Page Count 1 |
-
-## Implementation
-- Kotlin Android Extensions
-
-## Environment
-- **Android Gradle**: 8.5.0
-- **Plugins Version**: 8.7
-- **Gradle Version**: 8.0
-- **Java JDK**: 17
-- **Kotlin Version**: 1.9.0
-- **Min SDK**: 21
-- **Target SDK**: 34
-
-## Contributors
-Thanks all contributors for build this repository
-
-```
-Copyright [2021] [The Dictionary of Android Projects]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-```
diff --git a/DesignUIToast/app/build.gradle b/DesignUIToast/app/build.gradle
deleted file mode 100644
index 30348039..00000000
--- a/DesignUIToast/app/build.gradle
+++ /dev/null
@@ -1,42 +0,0 @@
-plugins {
- id 'com.android.application'
- id 'kotlin-android'
- id 'kotlin-android-extensions'
-}
-
-android {
- compileSdkVersion 30
- buildToolsVersion "30.0.3"
-
- defaultConfig {
- applicationId "com.algokelvin.toastui"
- minSdkVersion 16
- 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
- }
- kotlinOptions {
- jvmTarget = '1.8'
- }
-}
-
-dependencies {
- implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
- implementation 'androidx.core:core-ktx:1.3.2'
- implementation 'androidx.appcompat:appcompat:1.2.0'
- implementation 'com.google.android.material:material:1.3.0'
- implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
-}
\ No newline at end of file
diff --git a/DesignUIToast/app/src/main/AndroidManifest.xml b/DesignUIToast/app/src/main/AndroidManifest.xml
deleted file mode 100644
index 9cccf7c9..00000000
--- a/DesignUIToast/app/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/DesignUIToast/app/src/main/java/com/algokelvin/toastui/MainActivity.kt b/DesignUIToast/app/src/main/java/com/algokelvin/toastui/MainActivity.kt
deleted file mode 100644
index 5070cc68..00000000
--- a/DesignUIToast/app/src/main/java/com/algokelvin/toastui/MainActivity.kt
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.algokelvin.toastui
-
-import android.os.Bundle
-import android.widget.Toast
-import androidx.appcompat.app.AppCompatActivity
-import com.google.android.material.snackbar.Snackbar
-import kotlinx.android.synthetic.main.activity_main.*
-
-class MainActivity : AppCompatActivity() {
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- setContentView(R.layout.activity_main)
-
- btnToast.setOnClickListener { showWithToast() }
- btnSnackBar.setOnClickListener { showWithSnackBar() }
- }
-
- private fun showWithToast() {
- Toast.makeText(this, "Show with Toast", Toast.LENGTH_LONG).show()
- }
-
- private fun showWithSnackBar() {
- Snackbar.make(coordinatorLayout, "Show with SnackBar", Snackbar.LENGTH_LONG)
- .setAction("Action", null).show()
- }
-
-}
\ No newline at end of file
diff --git a/DesignUIToast/app/src/main/res/drawable/ic_launcher_background.xml b/DesignUIToast/app/src/main/res/drawable/ic_launcher_background.xml
deleted file mode 100644
index 07d5da9c..00000000
--- a/DesignUIToast/app/src/main/res/drawable/ic_launcher_background.xml
+++ /dev/null
@@ -1,170 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/DesignUIToast/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/DesignUIToast/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
deleted file mode 100644
index eca70cfe..00000000
--- a/DesignUIToast/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/DesignUIToast/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/DesignUIToast/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
deleted file mode 100644
index eca70cfe..00000000
--- a/DesignUIToast/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/DesignUIToast/app/src/main/res/mipmap-hdpi/ic_launcher.png b/DesignUIToast/app/src/main/res/mipmap-hdpi/ic_launcher.png
deleted file mode 100644
index a571e600..00000000
Binary files a/DesignUIToast/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ
diff --git a/DesignUIToast/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/DesignUIToast/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
deleted file mode 100644
index 61da551c..00000000
Binary files a/DesignUIToast/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and /dev/null differ
diff --git a/DesignUIToast/app/src/main/res/mipmap-mdpi/ic_launcher.png b/DesignUIToast/app/src/main/res/mipmap-mdpi/ic_launcher.png
deleted file mode 100644
index c41dd285..00000000
Binary files a/DesignUIToast/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ
diff --git a/DesignUIToast/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/DesignUIToast/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
deleted file mode 100644
index db5080a7..00000000
Binary files a/DesignUIToast/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and /dev/null differ
diff --git a/DesignUIToast/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/DesignUIToast/app/src/main/res/mipmap-xhdpi/ic_launcher.png
deleted file mode 100644
index 6dba46da..00000000
Binary files a/DesignUIToast/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ
diff --git a/DesignUIToast/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/DesignUIToast/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
deleted file mode 100644
index da31a871..00000000
Binary files a/DesignUIToast/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/DesignUIToast/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/DesignUIToast/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
deleted file mode 100644
index 15ac6817..00000000
Binary files a/DesignUIToast/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ
diff --git a/DesignUIToast/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/DesignUIToast/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
deleted file mode 100644
index b216f2d3..00000000
Binary files a/DesignUIToast/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/DesignUIToast/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/DesignUIToast/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
deleted file mode 100644
index f25a4197..00000000
Binary files a/DesignUIToast/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ
diff --git a/DesignUIToast/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/DesignUIToast/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
deleted file mode 100644
index e96783cc..00000000
Binary files a/DesignUIToast/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/DesignUIToast/app/src/main/res/values-night/themes.xml b/DesignUIToast/app/src/main/res/values-night/themes.xml
deleted file mode 100644
index 477872c2..00000000
--- a/DesignUIToast/app/src/main/res/values-night/themes.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/DesignUIToast/app/src/main/res/values/colors.xml b/DesignUIToast/app/src/main/res/values/colors.xml
deleted file mode 100644
index f8c6127d..00000000
--- a/DesignUIToast/app/src/main/res/values/colors.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
- #FFBB86FC
- #FF6200EE
- #FF3700B3
- #FF03DAC5
- #FF018786
- #FF000000
- #FFFFFFFF
-
\ No newline at end of file
diff --git a/DesignUIToast/app/src/main/res/values/strings.xml b/DesignUIToast/app/src/main/res/values/strings.xml
deleted file mode 100644
index 29b728bc..00000000
--- a/DesignUIToast/app/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
- ToastUI
- Toast
- SnackBar
-
\ No newline at end of file
diff --git a/DesignUIToast/app/src/main/res/values/themes.xml b/DesignUIToast/app/src/main/res/values/themes.xml
deleted file mode 100644
index e30aad5d..00000000
--- a/DesignUIToast/app/src/main/res/values/themes.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/DesignUIToast/build.gradle b/DesignUIToast/build.gradle
deleted file mode 100644
index 024b1f11..00000000
--- a/DesignUIToast/build.gradle
+++ /dev/null
@@ -1,29 +0,0 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
-buildscript {
- ext {
- agp_version = '8.5.0'
- }
- ext.kotlin_version = "1.3.72"
- repositories {
- google()
- jcenter()
- }
- dependencies {
- classpath "com.android.tools.build:gradle:$agp_version"
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
-
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
- }
-}
-
-allprojects {
- repositories {
- google()
- jcenter()
- }
-}
-
-task clean(type: Delete) {
- delete rootProject.buildDir
-}
\ No newline at end of file
diff --git a/DesignUIToast/documentation/SS_DesignUIToast.gif b/DesignUIToast/documentation/SS_DesignUIToast.gif
deleted file mode 100644
index 3e9c12d2..00000000
Binary files a/DesignUIToast/documentation/SS_DesignUIToast.gif and /dev/null differ
diff --git a/DesignUIToast/gradle.properties b/DesignUIToast/gradle.properties
deleted file mode 100644
index 98bed167..00000000
--- a/DesignUIToast/gradle.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-# Project-wide Gradle settings.
-# IDE (e.g. Android Studio) users:
-# Gradle settings configured through the IDE *will override*
-# any settings specified in this file.
-# For more details on how to configure your build environment visit
-# http://www.gradle.org/docs/current/userguide/build_environment.html
-# Specifies the JVM arguments used for the daemon process.
-# The setting is particularly useful for tweaking memory settings.
-org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
-# When configured, Gradle will run in incubating parallel mode.
-# This option should only be used with decoupled projects. More details, visit
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
-# org.gradle.parallel=true
-# AndroidX package structure to make it clearer which packages are bundled with the
-# Android operating system, and which are packaged with your app"s APK
-# https://developer.android.com/topic/libraries/support-library/androidx-rn
-android.useAndroidX=true
-# Automatically convert third-party libraries to use AndroidX
-android.enableJetifier=true
-# Kotlin code style for this project: "official" or "obsolete":
-kotlin.code.style=official
\ No newline at end of file
diff --git a/DesignUIToast/gradle/wrapper/gradle-wrapper.jar b/DesignUIToast/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index f6b961fd..00000000
Binary files a/DesignUIToast/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/DesignUIToast/gradle/wrapper/gradle-wrapper.properties b/DesignUIToast/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 283ca013..00000000
--- a/DesignUIToast/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Sun Feb 23 16:22:43 WIB 2025
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
diff --git a/DesignUIToast/gradlew b/DesignUIToast/gradlew
deleted file mode 100644
index cccdd3d5..00000000
--- a/DesignUIToast/gradlew
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/usr/bin/env sh
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn () {
- echo "$*"
-}
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=$((i+1))
- done
- case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=$(save "$@")
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-
-# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
-if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
- cd "$(dirname "$0")"
-fi
-
-exec "$JAVACMD" "$@"
diff --git a/DesignUIToast/gradlew.bat b/DesignUIToast/gradlew.bat
deleted file mode 100644
index f9553162..00000000
--- a/DesignUIToast/gradlew.bat
+++ /dev/null
@@ -1,84 +0,0 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/DesignUIToast/settings.gradle b/DesignUIToast/settings.gradle
deleted file mode 100644
index 466d2651..00000000
--- a/DesignUIToast/settings.gradle
+++ /dev/null
@@ -1,2 +0,0 @@
-include ':app'
-rootProject.name = "ToastUI"
\ No newline at end of file
diff --git a/ECommerce/app/build.gradle.kts b/ECommerce/app/build.gradle.kts
deleted file mode 100644
index 348c88fd..00000000
--- a/ECommerce/app/build.gradle.kts
+++ /dev/null
@@ -1,90 +0,0 @@
-plugins {
- alias(libs.plugins.android.application)
- alias(libs.plugins.jetbrains.kotlin.android)
- id ("kotlin-kapt")
- id ("kotlin-parcelize")
-}
-
-android {
- namespace = "com.algokelvin.shoppingyuk"
- compileSdk = 34
-
- defaultConfig {
- applicationId = "com.algokelvin.shoppingyuk"
- minSdk = 30
- targetSdk = 34
- versionCode = 1
- versionName = "1.0"
-
- testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
-
- buildConfigField("String", "BASE_URL", "\"https://fakestoreapi.com/\"")
- }
-
- buildTypes {
- release {
- isMinifyEnabled = false
- proguardFiles(
- getDefaultProguardFile("proguard-android-optimize.txt"),
- "proguard-rules.pro"
- )
- }
- }
- compileOptions {
- sourceCompatibility = JavaVersion.VERSION_1_8
- targetCompatibility = JavaVersion.VERSION_1_8
- }
- kotlinOptions {
- jvmTarget = "1.8"
- }
- buildFeatures {
- dataBinding = true
- buildConfig = true
- }
-}
-
-dependencies {
- implementation(libs.androidx.core.ktx)
- implementation(libs.androidx.appcompat)
- implementation(libs.material)
- implementation(libs.androidx.activity)
- implementation(libs.androidx.constraintlayout)
-
- val lifecycle_version = "2.8.6"
- val room_version = "2.6.1"
-
- // ViewModel
- implementation(libs.androidx.lifecycle.viewmodel.ktx)
- // LiveData
- implementation(libs.androidx.lifecycle.livedata.ktx)
- // Saved state module for ViewModel
- implementation(libs.androidx.lifecycle.viewmodel.savedstate)
- // Annotation processor
- kapt(libs.androidx.lifecycle.compiler)
-
- implementation(libs.androidx.room.runtime)
- implementation(libs.androidx.room.ktx)
-
- // To use Kotlin annotation processing tool (kapt)
- kapt(libs.androidx.room.compiler)
-
- implementation(libs.kotlinx.coroutines.core)
- implementation(libs.kotlinx.coroutines.android)
-
- implementation(libs.dagger)
- kapt(libs.dagger.compiler)
-
- implementation(libs.retrofit)
- implementation(libs.converter.gson)
- implementation(libs.logging.interceptor)
-
- implementation(libs.glide)
-
- implementation(libs.kotlinx.coroutines.android)
-
- implementation(libs.androidx.security.crypto)
-
- testImplementation(libs.junit)
- androidTestImplementation(libs.androidx.junit)
- androidTestImplementation(libs.androidx.espresso.core)
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/androidTest/java/com/algokelvin/shoppingyuk/ExampleInstrumentedTest.kt b/ECommerce/app/src/androidTest/java/com/algokelvin/shoppingyuk/ExampleInstrumentedTest.kt
deleted file mode 100644
index 6e69658d..00000000
--- a/ECommerce/app/src/androidTest/java/com/algokelvin/shoppingyuk/ExampleInstrumentedTest.kt
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.algokelvin.shoppingyuk
-
-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.algokelvin.movieapp", appContext.packageName)
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/AndroidManifest.xml b/ECommerce/app/src/main/AndroidManifest.xml
deleted file mode 100644
index 4d383b36..00000000
--- a/ECommerce/app/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ECommerce/app/src/main/ic_shopping_yuk-playstore.png b/ECommerce/app/src/main/ic_shopping_yuk-playstore.png
deleted file mode 100644
index 413b0480..00000000
Binary files a/ECommerce/app/src/main/ic_shopping_yuk-playstore.png and /dev/null differ
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/api/ProductApiService.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/api/ProductApiService.kt
deleted file mode 100644
index a761a66c..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/api/ProductApiService.kt
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.algokelvin.shoppingyuk.data.api
-
-import com.algokelvin.shoppingyuk.data.model.cart.Cart
-import com.algokelvin.shoppingyuk.data.model.product.Product
-import com.algokelvin.shoppingyuk.data.model.user.Login
-import com.algokelvin.shoppingyuk.data.model.user.Token
-import com.algokelvin.shoppingyuk.data.model.user.User
-import retrofit2.Response
-import retrofit2.http.Body
-import retrofit2.http.GET
-import retrofit2.http.POST
-import retrofit2.http.Path
-
-interface ProductApiService {
- @GET("products")
- suspend fun getProductsList(): Response>
-
- @GET("products/{id}")
- suspend fun getProductDetailList(@Path("id") id: String): Response
-
- @GET("carts/user/{id}")
- suspend fun getCartByIdUser(@Path("id") id: String): Response>
-
- @POST("auth/login")
- suspend fun login(@Body login: Login): Response
-
- @GET("users")
- suspend fun getAllUsers(): Response>
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/api/ResponseResults.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/api/ResponseResults.kt
deleted file mode 100644
index 8e7cef51..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/api/ResponseResults.kt
+++ /dev/null
@@ -1,3 +0,0 @@
-package com.algokelvin.shoppingyuk.data.api
-
-data class ResponseResults(val data: T?, val errorMessage: String? = null)
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/db/CartDao.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/db/CartDao.kt
deleted file mode 100644
index 12088dc1..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/db/CartDao.kt
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.algokelvin.shoppingyuk.data.db
-
-import androidx.room.Dao
-import androidx.room.Insert
-import androidx.room.OnConflictStrategy
-import androidx.room.Query
-import com.algokelvin.shoppingyuk.data.model.cart.CartDB
-
-@Dao
-interface CartDao {
- @Insert(onConflict = OnConflictStrategy.REPLACE)
- suspend fun addProductInCart(cartDB: CartDB)
-
- @Query("SELECT * FROM cart_data WHERE cart_user_id = :userId")
- suspend fun getCart(userId: Int): List
-
- @Query("UPDATE cart_data SET cart_count = :count WHERE cart_user_id = :userId AND cart_product_id = :productId")
- suspend fun updateCountProductInCart(userId: Int, productId: Int, count: Int)
-
- @Query("DELETE FROM cart_data WHERE cart_user_id = :userId AND cart_product_id = :productId")
- suspend fun deleteProductInCart(userId: Int, productId: Int)
-
- @Query("DELETE FROM cart_data WHERE cart_user_id = :userId")
- suspend fun deleteProductForCheckout(userId: Int)
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/db/ProductDB.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/db/ProductDB.kt
deleted file mode 100644
index bf5846cb..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/db/ProductDB.kt
+++ /dev/null
@@ -1,18 +0,0 @@
-package com.algokelvin.shoppingyuk.data.db
-
-import androidx.room.Database
-import androidx.room.RoomDatabase
-import com.algokelvin.shoppingyuk.data.model.cart.CartDB
-import com.algokelvin.shoppingyuk.data.model.product.Product
-import com.algokelvin.shoppingyuk.data.model.user.User
-
-@Database(
- entities = [Product::class, User::class, CartDB::class],
- version = 4,
- exportSchema = false
-)
-abstract class ProductDB: RoomDatabase() {
- abstract fun productDao(): ProductDao
- abstract fun userDao(): UserDao
- abstract fun cartDao(): CartDao
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/db/ProductDao.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/db/ProductDao.kt
deleted file mode 100644
index 2e3a82c0..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/db/ProductDao.kt
+++ /dev/null
@@ -1,22 +0,0 @@
-package com.algokelvin.shoppingyuk.data.db
-
-import androidx.room.Dao
-import androidx.room.Insert
-import androidx.room.OnConflictStrategy
-import androidx.room.Query
-import com.algokelvin.shoppingyuk.data.model.product.Product
-
-@Dao
-interface ProductDao {
- @Insert(onConflict = OnConflictStrategy.REPLACE)
- suspend fun saveProducts(products: List)
-
- @Query("DELETE FROM products_data")
- suspend fun deleteAllProducts()
-
- @Query("SELECT * FROM products_data")
- suspend fun getAllProducts(): List
-
- @Query("SELECT * FROM products_data WHERE id = :id")
- suspend fun getProductById(id: Int): Product
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/db/UserDao.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/db/UserDao.kt
deleted file mode 100644
index 1c2e6be5..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/db/UserDao.kt
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.algokelvin.shoppingyuk.data.db
-
-import androidx.room.Dao
-import androidx.room.Insert
-import androidx.room.OnConflictStrategy
-import androidx.room.Query
-import com.algokelvin.shoppingyuk.data.model.user.User
-
-@Dao
-interface UserDao {
- @Insert(onConflict = OnConflictStrategy.REPLACE)
- suspend fun saveUser(user: User)
-
- @Query("SELECT * FROM users_data WHERE id = :id")
- suspend fun getUser(id: Int): User
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/model/cart/Cart.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/model/cart/Cart.kt
deleted file mode 100644
index bff6bf6b..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/model/cart/Cart.kt
+++ /dev/null
@@ -1,22 +0,0 @@
-package com.algokelvin.shoppingyuk.data.model.cart
-
-import com.google.gson.annotations.SerializedName
-
-data class ProductCart(
- @SerializedName("productId")
- val productId: Int,
-
- @SerializedName("quantity")
- val quantity: Int,
-)
-
-data class Cart(
- @SerializedName("id")
- val id: Int,
-
- @SerializedName("userId")
- val userId: Int,
-
- @SerializedName("products")
- val products: ArrayList,
-)
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/model/cart/CartDB.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/model/cart/CartDB.kt
deleted file mode 100644
index c8731a6c..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/model/cart/CartDB.kt
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.algokelvin.shoppingyuk.data.model.cart
-
-import androidx.room.ColumnInfo
-import androidx.room.Entity
-import androidx.room.PrimaryKey
-
-@Entity(tableName = "cart_data")
-data class CartDB (
- @PrimaryKey(autoGenerate = true)
- val id: Int = 0,
-
- @ColumnInfo("cart_user_id")
- val userId: Int,
-
- @ColumnInfo("cart_product_id")
- val productId: Int,
-
- @ColumnInfo(name = "cart_product_title")
- val productTitle: String?,
-
- @ColumnInfo(name = "cart_product_price")
- val productPrice: Double?,
-
- @ColumnInfo(name = "cart_product_image")
- val productImage: String?,
-
- @ColumnInfo("cart_count")
- val count: Int
-)
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/model/product/Product.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/model/product/Product.kt
deleted file mode 100644
index e2cbd9b2..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/model/product/Product.kt
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.algokelvin.shoppingyuk.data.model.product
-
-import androidx.room.ColumnInfo
-import androidx.room.Embedded
-import androidx.room.Entity
-import androidx.room.PrimaryKey
-import com.google.gson.annotations.SerializedName
-
-@Entity(tableName = "products_data")
-data class Product (
- @PrimaryKey
- @SerializedName("id")
- val id: Int,
-
- @ColumnInfo(name = "product_title")
- @SerializedName("title")
- val title: String?,
-
- @ColumnInfo(name = "product_price")
- @SerializedName("price")
- val price: Double?,
-
- @ColumnInfo(name = "product_description")
- @SerializedName("description")
- val description: String?,
-
- @ColumnInfo(name = "product_category")
- @SerializedName("category")
- val category: String?,
-
- @ColumnInfo(name = "product_image")
- @SerializedName("image")
- val image: String?,
-
- @SerializedName("rating")
- @Embedded(prefix = "product_")
- val rating: Rating?
-)
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/model/product/Rating.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/model/product/Rating.kt
deleted file mode 100644
index 4177c4ff..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/model/product/Rating.kt
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.algokelvin.shoppingyuk.data.model.product
-
-import androidx.room.ColumnInfo
-import com.google.gson.annotations.SerializedName
-
-data class Rating(
- @SerializedName("rate")
- @ColumnInfo("rate")
- val rate: Double?,
-
- @SerializedName("count")
- @ColumnInfo("count")
- val count: Int?,
-)
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/model/user/Login.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/model/user/Login.kt
deleted file mode 100644
index 626d0d9b..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/model/user/Login.kt
+++ /dev/null
@@ -1,6 +0,0 @@
-package com.algokelvin.shoppingyuk.data.model.user
-
-data class Login(
- val username: String,
- val password: String
-)
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/model/user/Token.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/model/user/Token.kt
deleted file mode 100644
index a15b4af3..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/model/user/Token.kt
+++ /dev/null
@@ -1,3 +0,0 @@
-package com.algokelvin.shoppingyuk.data.model.user
-
-data class Token(val token: String)
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/model/user/User.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/model/user/User.kt
deleted file mode 100644
index 512f09c5..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/model/user/User.kt
+++ /dev/null
@@ -1,48 +0,0 @@
-package com.algokelvin.shoppingyuk.data.model.user
-
-import android.os.Parcelable
-import androidx.room.ColumnInfo
-import androidx.room.Embedded
-import androidx.room.Entity
-import androidx.room.PrimaryKey
-import com.google.gson.annotations.SerializedName
-import kotlinx.parcelize.Parcelize
-
-@Parcelize
-data class NamePerson(
- @SerializedName("firstname")
- @ColumnInfo("firstname")
- val firstName: String,
-
- @SerializedName("lastname")
- @ColumnInfo("lastname")
- val lastName: String,
-): Parcelable
-
-@Entity(tableName = "users_data")
-@Parcelize
-data class User(
- @SerializedName("id")
- @PrimaryKey
- val id: Int,
-
- @SerializedName("email")
- @ColumnInfo("user_email")
- val email: String,
-
- @SerializedName("username")
- @ColumnInfo("user_username")
- val username: String,
-
- @SerializedName("password")
- @ColumnInfo("user_password")
- val password: String,
-
- @SerializedName("name")
- @Embedded(prefix = "user_")
- val name: NamePerson,
-
- @SerializedName("phone")
- @ColumnInfo("user_phone")
- val phone: String,
-): Parcelable
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/cart/CartRepositoryImpl.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/cart/CartRepositoryImpl.kt
deleted file mode 100644
index 02a368c9..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/cart/CartRepositoryImpl.kt
+++ /dev/null
@@ -1,72 +0,0 @@
-package com.algokelvin.shoppingyuk.data.repository.cart
-
-import com.algokelvin.shoppingyuk.data.api.ResponseResults
-import com.algokelvin.shoppingyuk.data.model.cart.CartDB
-import com.algokelvin.shoppingyuk.data.repository.cart.datasource.CartLocalDataSource
-import com.algokelvin.shoppingyuk.domain.repository.CartRepository
-
-class CartRepositoryImpl(
- private val localCart: CartLocalDataSource,
-): CartRepository {
- override suspend fun addProductInCart(cartDB: CartDB): String = addProductInCartDB(cartDB)
-
- override suspend fun getCartByUserId(userId: Int): ResponseResults> = getCartInDB(userId)
-
- override suspend fun updateCountProductInCart(
- userId: Int,
- productId: Int,
- count: Int
- ): String = updateCountProduct(userId, productId, count)
-
- override suspend fun deleteProductInCart(
- userId: Int,
- productId: Int
- ): String = deleteProduct(userId, productId)
-
- override suspend fun deleteProductForCheckout(userId: Int): String = deleteForCheckout(userId)
-
- private suspend fun addProductInCartDB(cartDB: CartDB): String {
- try {
- localCart.addProductInCart(cartDB)
- return "Success Add to Cart"
- } catch (e: Exception) {
- return "Failed Add to Cart - ${e.message}"
- }
- }
-
- private suspend fun getCartInDB(userId: Int): ResponseResults> {
- try {
- val listCart = localCart.getCart(userId)
- return ResponseResults(listCart, null)
- } catch (e: Exception) {
- return ResponseResults(null, "Failed to Show Cart - ${e.message}")
- }
- }
-
- private suspend fun updateCountProduct(userId: Int, productId: Int, count: Int): String {
- try {
- localCart.updateCountProductInCart(userId, productId, count)
- return "Success Update Count Product"
- } catch (e: Exception) {
- return "Failed Update Count Product"
- }
- }
-
- private suspend fun deleteProduct(userId: Int, productId: Int): String {
- try {
- localCart.deleteProductInCart(userId, productId)
- return "Success Delete Product In Cart"
- } catch (e: Exception) {
- return "Failed Delete Product In Cart"
- }
- }
-
- private suspend fun deleteForCheckout(userId: Int): String {
- try {
- localCart.deleteAllForCheckout(userId)
- return "Success Confirm Your Shopping"
- } catch (e: Exception) {
- return "Failed Confirm Your Shopping"
- }
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/cart/datasource/CartLocalDataSource.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/cart/datasource/CartLocalDataSource.kt
deleted file mode 100644
index e52ff426..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/cart/datasource/CartLocalDataSource.kt
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.algokelvin.shoppingyuk.data.repository.cart.datasource
-
-import com.algokelvin.shoppingyuk.data.model.cart.CartDB
-
-interface CartLocalDataSource {
- suspend fun getCart(userId: Int): List
- suspend fun addProductInCart(cartDB: CartDB)
- suspend fun updateCountProductInCart(userId: Int, productId: Int, count: Int)
- suspend fun deleteProductInCart(userId: Int, productId: Int)
- suspend fun deleteAllForCheckout(userId: Int)
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/cart/datasource/CartRemoteDataSource.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/cart/datasource/CartRemoteDataSource.kt
deleted file mode 100644
index 20603ab3..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/cart/datasource/CartRemoteDataSource.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.algokelvin.shoppingyuk.data.repository.cart.datasource
-
-import com.algokelvin.shoppingyuk.data.model.cart.Cart
-import retrofit2.Response
-
-interface CartRemoteDataSource {
- suspend fun getCartByUserid(id: String): Response>
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/cart/datasourceImpl/CartLocalDataSourceImpl.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/cart/datasourceImpl/CartLocalDataSourceImpl.kt
deleted file mode 100644
index 28556560..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/cart/datasourceImpl/CartLocalDataSourceImpl.kt
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.algokelvin.shoppingyuk.data.repository.cart.datasourceImpl
-
-import com.algokelvin.shoppingyuk.data.db.CartDao
-import com.algokelvin.shoppingyuk.data.model.cart.CartDB
-import com.algokelvin.shoppingyuk.data.repository.cart.datasource.CartLocalDataSource
-import kotlinx.coroutines.CoroutineScope
-import kotlinx.coroutines.Dispatchers
-import kotlinx.coroutines.launch
-
-class CartLocalDataSourceImpl(
- private val cartDao: CartDao,
-): CartLocalDataSource {
-
- override suspend fun getCart(userId: Int): List = cartDao.getCart(userId)
-
- override suspend fun addProductInCart(cartDB: CartDB) {
- CoroutineScope(Dispatchers.IO).launch {
- cartDao.addProductInCart(cartDB)
- }
- }
-
- override suspend fun updateCountProductInCart(userId: Int, productId: Int, count: Int) {
- CoroutineScope(Dispatchers.IO).launch {
- cartDao.updateCountProductInCart(userId, productId, count)
- }
- }
-
- override suspend fun deleteProductInCart(userId: Int, productId: Int) {
- CoroutineScope(Dispatchers.IO).launch {
- cartDao.deleteProductInCart(userId, productId)
- }
- }
-
- override suspend fun deleteAllForCheckout(userId: Int) {
- CoroutineScope(Dispatchers.IO).launch {
- cartDao.deleteProductForCheckout(userId)
- }
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/cart/datasourceImpl/CartRemoteDataSourceImpl.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/cart/datasourceImpl/CartRemoteDataSourceImpl.kt
deleted file mode 100644
index 13f2cae0..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/cart/datasourceImpl/CartRemoteDataSourceImpl.kt
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.algokelvin.shoppingyuk.data.repository.cart.datasourceImpl
-
-import com.algokelvin.shoppingyuk.data.api.ProductApiService
-import com.algokelvin.shoppingyuk.data.model.cart.Cart
-import com.algokelvin.shoppingyuk.data.repository.cart.datasource.CartRemoteDataSource
-import retrofit2.Response
-
-class CartRemoteDataSourceImpl(
- private val service: ProductApiService,
-): CartRemoteDataSource {
- override suspend fun getCartByUserid(id: String): Response> = service.getCartByIdUser(id)
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/login/LoginRepositoryImpl.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/login/LoginRepositoryImpl.kt
deleted file mode 100644
index 2579bfab..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/login/LoginRepositoryImpl.kt
+++ /dev/null
@@ -1,86 +0,0 @@
-package com.algokelvin.shoppingyuk.data.repository.login
-
-import com.algokelvin.shoppingyuk.data.api.ResponseResults
-import com.algokelvin.shoppingyuk.data.model.user.Login
-import com.algokelvin.shoppingyuk.data.model.user.Token
-import com.algokelvin.shoppingyuk.data.model.user.User
-import com.algokelvin.shoppingyuk.data.repository.login.datasource.LoginLocalDataSource
-import com.algokelvin.shoppingyuk.data.repository.login.datasource.LoginRemoteDataSource
-import com.algokelvin.shoppingyuk.domain.repository.LoginRepository
-
-class LoginRepositoryImpl(
- private val remote: LoginRemoteDataSource,
- private val local: LoginLocalDataSource,
-): LoginRepository {
- override suspend fun login(login: Login): ResponseResults = loginProcess(login)
-
- override suspend fun getUser(login: Login): ResponseResults = getProfileUser(login)
-
- override suspend fun getUserFromDB(id: Int): User = getProfileFromDB(id)
-
- private suspend fun loginProcess(login: Login): ResponseResults {
- val token: Token?
-
- try {
- val response = remote.login(login)
- if (response.isSuccessful) {
- val body = response.body()
- if (body != null) {
- token = body
- return ResponseResults(token)
- } else {
- return ResponseResults(null, "Value Body is NULL")
- }
- } else {
- val errorMessage = response.errorBody()?.string() ?: "Unknown Error"
- return ResponseResults(null, errorMessage)
- }
- } catch (e: Exception) {
- return ResponseResults(null, e.message)
- }
- }
-
- private suspend fun getProfileUser(login: Login): ResponseResults {
- val user: User?
-
- try {
- val response = remote.getAllUser()
- if (response.isSuccessful) {
- val body = response.body()
- if (body != null) {
- user = body.find { it.username == login.username && it.password == login.password }
- user?.let { saveProfile(it) }
- return ResponseResults(user)
- } else {
- return ResponseResults(null, "Value Body is NULL")
- }
- } else {
- val errorMessage = response.errorBody()?.string() ?: "Unknown Error"
- return ResponseResults(null, errorMessage)
- }
- } catch (e: Exception) {
- return ResponseResults(null, e.message)
- }
- }
-
- private suspend fun saveProfile(user: User) {
- try {
- local.saveUserToDB(user)
- } catch (e: Exception) {
- //Log.i("ALGOKELVIN_DEBUG", e.message.toString())
- }
- }
-
- private suspend fun getProfileFromDB(id: Int): User {
- lateinit var user: User
-
- try {
- user = local.getUserFromDB(id)
- } catch (e: Exception) {
- //Log.i("ALGOKELVIN_DEBUG", e.message.toString())
- }
-
- return user
- }
-
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/login/datasource/LoginLocalDataSource.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/login/datasource/LoginLocalDataSource.kt
deleted file mode 100644
index 45aea5a4..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/login/datasource/LoginLocalDataSource.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.algokelvin.shoppingyuk.data.repository.login.datasource
-
-import com.algokelvin.shoppingyuk.data.model.user.User
-
-interface LoginLocalDataSource {
- suspend fun saveUserToDB(user: User)
- suspend fun getUserFromDB(id: Int): User
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/login/datasource/LoginRemoteDataSource.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/login/datasource/LoginRemoteDataSource.kt
deleted file mode 100644
index 8c330294..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/login/datasource/LoginRemoteDataSource.kt
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.algokelvin.shoppingyuk.data.repository.login.datasource
-
-import com.algokelvin.shoppingyuk.data.model.user.Login
-import com.algokelvin.shoppingyuk.data.model.user.Token
-import com.algokelvin.shoppingyuk.data.model.user.User
-import retrofit2.Response
-
-interface LoginRemoteDataSource {
- suspend fun login(login: Login): Response
- suspend fun getAllUser(): Response>
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/login/datasourceImpl/LoginLocalDataSourceImpl.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/login/datasourceImpl/LoginLocalDataSourceImpl.kt
deleted file mode 100644
index c7bb4958..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/login/datasourceImpl/LoginLocalDataSourceImpl.kt
+++ /dev/null
@@ -1,18 +0,0 @@
-package com.algokelvin.shoppingyuk.data.repository.login.datasourceImpl
-
-import com.algokelvin.shoppingyuk.data.db.UserDao
-import com.algokelvin.shoppingyuk.data.model.user.User
-import com.algokelvin.shoppingyuk.data.repository.login.datasource.LoginLocalDataSource
-import kotlinx.coroutines.CoroutineScope
-import kotlinx.coroutines.Dispatchers
-import kotlinx.coroutines.launch
-
-class LoginLocalDataSourceImpl(private val userDao: UserDao): LoginLocalDataSource {
- override suspend fun saveUserToDB(user: User) {
- CoroutineScope(Dispatchers.IO).launch {
- userDao.saveUser(user)
- }
- }
-
- override suspend fun getUserFromDB(id: Int): User = userDao.getUser(id)
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/login/datasourceImpl/LoginRemoteDataSourceImpl.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/login/datasourceImpl/LoginRemoteDataSourceImpl.kt
deleted file mode 100644
index 5176a295..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/login/datasourceImpl/LoginRemoteDataSourceImpl.kt
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.algokelvin.shoppingyuk.data.repository.login.datasourceImpl
-
-import com.algokelvin.shoppingyuk.data.api.ProductApiService
-import com.algokelvin.shoppingyuk.data.model.user.Login
-import com.algokelvin.shoppingyuk.data.model.user.Token
-import com.algokelvin.shoppingyuk.data.model.user.User
-import com.algokelvin.shoppingyuk.data.repository.login.datasource.LoginRemoteDataSource
-import retrofit2.Response
-
-class LoginRemoteDataSourceImpl(
- private val productApiService: ProductApiService
-): LoginRemoteDataSource {
- override suspend fun login(login: Login): Response = productApiService.login(login)
- override suspend fun getAllUser(): Response> = productApiService.getAllUsers()
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/product/ProductRepositoryImpl.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/product/ProductRepositoryImpl.kt
deleted file mode 100644
index 11f0c228..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/product/ProductRepositoryImpl.kt
+++ /dev/null
@@ -1,80 +0,0 @@
-package com.algokelvin.shoppingyuk.data.repository.product
-
-import com.algokelvin.shoppingyuk.data.model.product.Product
-import com.algokelvin.shoppingyuk.data.repository.product.datasource.ProductCacheDataSource
-import com.algokelvin.shoppingyuk.data.repository.product.datasource.ProductLocalDataSource
-import com.algokelvin.shoppingyuk.data.repository.product.datasource.ProductRemoteDataSource
-import com.algokelvin.shoppingyuk.domain.repository.ProductRepository
-
-class ProductRepositoryImpl(
- private val remote: ProductRemoteDataSource,
- private val local: ProductLocalDataSource,
- private val cache: ProductCacheDataSource,
-): ProductRepository {
-
- override suspend fun getProducts(): List = getProductsFromCache()
-
- override suspend fun updateProducts(): List {
- val newListOfProducts = getProductsFromAPI()
- local.clearAll()
- local.saveProductsToDB(newListOfProducts)
- cache.saveProductsToCache(newListOfProducts)
- return newListOfProducts
- }
-
- private suspend fun getProductsFromAPI(): List {
- lateinit var productList: ArrayList
-
- try {
- val response = remote.getProducts()
- val body = response.body()
- if (body != null) {
- productList = body
- }
- } catch (e: Exception) {
- //Log.i("ALGOKELVIN", e.message.toString())
- }
-
- return productList
- }
-
- private suspend fun getProductsFromDB(): List {
- lateinit var productList: List
-
- try {
- productList = local.getProductsFromDB()
- } catch (e: Exception) {
- //Log.i("ALGOKELVIN", e.message.toString())
- }
-
- if (productList.isNotEmpty()) {
- return productList
- } else {
- productList = getProductsFromAPI()
- local.saveProductsToDB(productList)
- }
-
- return productList
- }
-
- private suspend fun getProductsFromCache(): List {
- lateinit var productList: List
-
- try {
- productList = cache.getProductsFromCache()
- } catch (e: Exception) {
- //Log.i("ALGOKELVIN", e.message.toString())
- }
-
- if (productList.isNotEmpty()) {
- return productList
- } else {
- productList = getProductsFromDB()
- cache.saveProductsToCache(productList)
- }
-
- return productList
- }
-
-
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/product/datasource/ProductCacheDataSource.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/product/datasource/ProductCacheDataSource.kt
deleted file mode 100644
index e9087215..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/product/datasource/ProductCacheDataSource.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.algokelvin.shoppingyuk.data.repository.product.datasource
-
-import com.algokelvin.shoppingyuk.data.model.product.Product
-
-interface ProductCacheDataSource {
- suspend fun getProductsFromCache(): List
- suspend fun saveProductsToCache(products: List)
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/product/datasource/ProductLocalDataSource.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/product/datasource/ProductLocalDataSource.kt
deleted file mode 100644
index 6064c2d7..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/product/datasource/ProductLocalDataSource.kt
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.algokelvin.shoppingyuk.data.repository.product.datasource
-
-import com.algokelvin.shoppingyuk.data.model.product.Product
-
-interface ProductLocalDataSource {
- suspend fun getProductsFromDB(): List
- suspend fun getProductByIdFromDB(id: Int): Product
- suspend fun saveProductsToDB(products: List)
- suspend fun clearAll()
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/product/datasource/ProductRemoteDataSource.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/product/datasource/ProductRemoteDataSource.kt
deleted file mode 100644
index 0afc8a4f..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/product/datasource/ProductRemoteDataSource.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.algokelvin.shoppingyuk.data.repository.product.datasource
-
-import com.algokelvin.shoppingyuk.data.model.product.Product
-import retrofit2.Response
-
-interface ProductRemoteDataSource {
- suspend fun getProducts(): Response>
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/product/datasourceImpl/ProductCacheDataSourceImpl.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/product/datasourceImpl/ProductCacheDataSourceImpl.kt
deleted file mode 100644
index 86d88c5a..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/product/datasourceImpl/ProductCacheDataSourceImpl.kt
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.algokelvin.shoppingyuk.data.repository.product.datasourceImpl
-
-import com.algokelvin.shoppingyuk.data.model.product.Product
-import com.algokelvin.shoppingyuk.data.repository.product.datasource.ProductCacheDataSource
-
-class ProductCacheDataSourceImpl: ProductCacheDataSource {
- private var productList = ArrayList()
-
- override suspend fun getProductsFromCache(): List {
- return productList
- }
-
- override suspend fun saveProductsToCache(products: List) {
- productList.clear()
- productList = ArrayList(products)
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/product/datasourceImpl/ProductLocalDataSourceImpl.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/product/datasourceImpl/ProductLocalDataSourceImpl.kt
deleted file mode 100644
index cb2f0c94..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/product/datasourceImpl/ProductLocalDataSourceImpl.kt
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.algokelvin.shoppingyuk.data.repository.product.datasourceImpl
-
-import com.algokelvin.shoppingyuk.data.db.ProductDao
-import com.algokelvin.shoppingyuk.data.model.product.Product
-import com.algokelvin.shoppingyuk.data.repository.product.datasource.ProductLocalDataSource
-import kotlinx.coroutines.CoroutineScope
-import kotlinx.coroutines.Dispatchers
-import kotlinx.coroutines.launch
-
-class ProductLocalDataSourceImpl(private val productDao: ProductDao): ProductLocalDataSource {
- override suspend fun getProductsFromDB(): List = productDao.getAllProducts()
- override suspend fun getProductByIdFromDB(id: Int): Product = productDao.getProductById(id)
-
- override suspend fun saveProductsToDB(products: List) {
- CoroutineScope(Dispatchers.IO).launch {
- productDao.saveProducts(products)
- }
- }
-
- override suspend fun clearAll() {
- CoroutineScope(Dispatchers.IO).launch {
- productDao.deleteAllProducts()
- }
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/product/datasourceImpl/ProductRemoteDataSourceImpl.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/product/datasourceImpl/ProductRemoteDataSourceImpl.kt
deleted file mode 100644
index 037b7853..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/product/datasourceImpl/ProductRemoteDataSourceImpl.kt
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.algokelvin.shoppingyuk.data.repository.product.datasourceImpl
-
-import com.algokelvin.shoppingyuk.data.api.ProductApiService
-import com.algokelvin.shoppingyuk.data.model.product.Product
-import com.algokelvin.shoppingyuk.data.repository.product.datasource.ProductRemoteDataSource
-import retrofit2.Response
-
-class ProductRemoteDataSourceImpl(
- private val service: ProductApiService,
-): ProductRemoteDataSource {
- override suspend fun getProducts(): Response> = service.getProductsList()
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/productCategory/ProductCategoryRepositoryImpl.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/productCategory/ProductCategoryRepositoryImpl.kt
deleted file mode 100644
index 87162f26..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/productCategory/ProductCategoryRepositoryImpl.kt
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.algokelvin.shoppingyuk.data.repository.productCategory
-
-import com.algokelvin.shoppingyuk.data.model.product.Product
-import com.algokelvin.shoppingyuk.data.repository.productCategory.datasource.ProductCategoryRemoteDataSource
-import com.algokelvin.shoppingyuk.domain.repository.ProductCategoryRepository
-
-class ProductCategoryRepositoryImpl(
- private val remote: ProductCategoryRemoteDataSource
-): ProductCategoryRepository {
-
- override suspend fun getProductsSortByCategory(): List = getProductsFromAPI()
-
- private suspend fun getProductsFromAPI(): List {
- lateinit var productList: ArrayList
-
- try {
- val response = remote.getProductsSortByCategory()
- val body = response.body()
- if (body != null) {
- productList = body
- }
- } catch (e: Exception) {
- //Log.i("ALGOKELVIN", e.message.toString())
- }
-
- return productList.sortedBy { it.category }
- }
-
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/productCategory/datasource/ProductCategoryRemoteDataSource.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/productCategory/datasource/ProductCategoryRemoteDataSource.kt
deleted file mode 100644
index d5a40ed9..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/productCategory/datasource/ProductCategoryRemoteDataSource.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.algokelvin.shoppingyuk.data.repository.productCategory.datasource
-
-import com.algokelvin.shoppingyuk.data.model.product.Product
-import retrofit2.Response
-
-interface ProductCategoryRemoteDataSource {
- suspend fun getProductsSortByCategory(): Response>
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/productCategory/datasourceImpl/ProductCategoryRemoteDataSourceImpl.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/productCategory/datasourceImpl/ProductCategoryRemoteDataSourceImpl.kt
deleted file mode 100644
index 2085444d..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/productCategory/datasourceImpl/ProductCategoryRemoteDataSourceImpl.kt
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.algokelvin.shoppingyuk.data.repository.productCategory.datasourceImpl
-
-import com.algokelvin.shoppingyuk.data.api.ProductApiService
-import com.algokelvin.shoppingyuk.data.model.product.Product
-import com.algokelvin.shoppingyuk.data.repository.productCategory.datasource.ProductCategoryRemoteDataSource
-import retrofit2.Response
-
-class ProductCategoryRemoteDataSourceImpl(
- private val service: ProductApiService,
-): ProductCategoryRemoteDataSource {
- override suspend fun getProductsSortByCategory(): Response> = service.getProductsList()
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/productDetail/ProductDetailRepositoryImpl.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/productDetail/ProductDetailRepositoryImpl.kt
deleted file mode 100644
index 5c63056e..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/productDetail/ProductDetailRepositoryImpl.kt
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.algokelvin.shoppingyuk.data.repository.productDetail
-
-import com.algokelvin.shoppingyuk.data.model.product.Product
-import com.algokelvin.shoppingyuk.data.repository.productDetail.datasource.ProductDetailRemoteDataSource
-import com.algokelvin.shoppingyuk.domain.repository.ProductDetailRepository
-
-class ProductDetailRepositoryImpl(
- private val remote: ProductDetailRemoteDataSource,
-): ProductDetailRepository {
-
- override suspend fun getProductDetail(id: String): Product = getProductDetailFromAPI(id)
-
- private suspend fun getProductDetailFromAPI(id: String): Product {
- lateinit var product: Product
-
- try {
- val response = remote.getProductDetail(id)
- val body = response.body()
- if (body != null) {
- product = body
- }
- } catch (e: Exception) {
- //Log.i("ALGOKELVIN", e.message.toString())
- }
-
- return product
- }
-
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/productDetail/datasource/ProductDetailRemoteDataSource.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/productDetail/datasource/ProductDetailRemoteDataSource.kt
deleted file mode 100644
index 00127749..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/productDetail/datasource/ProductDetailRemoteDataSource.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.algokelvin.shoppingyuk.data.repository.productDetail.datasource
-
-import com.algokelvin.shoppingyuk.data.model.product.Product
-import retrofit2.Response
-
-interface ProductDetailRemoteDataSource {
- suspend fun getProductDetail(id: String): Response
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/productDetail/datasourceImpl/ProductDetailRemoteDataSourceImpl.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/productDetail/datasourceImpl/ProductDetailRemoteDataSourceImpl.kt
deleted file mode 100644
index 43799baa..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/data/repository/productDetail/datasourceImpl/ProductDetailRemoteDataSourceImpl.kt
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.algokelvin.shoppingyuk.data.repository.productDetail.datasourceImpl
-
-import com.algokelvin.shoppingyuk.data.api.ProductApiService
-import com.algokelvin.shoppingyuk.data.model.product.Product
-import com.algokelvin.shoppingyuk.data.repository.productDetail.datasource.ProductDetailRemoteDataSource
-import retrofit2.Response
-
-class ProductDetailRemoteDataSourceImpl(
- private val service: ProductApiService
-): ProductDetailRemoteDataSource {
- override suspend fun getProductDetail(id: String): Response = service.getProductDetailList(id)
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/repository/CartRepository.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/repository/CartRepository.kt
deleted file mode 100644
index f588238f..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/repository/CartRepository.kt
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.algokelvin.shoppingyuk.domain.repository
-
-import com.algokelvin.shoppingyuk.data.api.ResponseResults
-import com.algokelvin.shoppingyuk.data.model.cart.CartDB
-
-interface CartRepository {
- suspend fun addProductInCart(cartDB: CartDB): String
- suspend fun getCartByUserId(userId: Int): ResponseResults>
- suspend fun updateCountProductInCart(userId: Int, productId: Int, count: Int): String
- suspend fun deleteProductInCart(userId: Int, productId: Int): String
- suspend fun deleteProductForCheckout(userId: Int): String
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/repository/LoginRepository.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/repository/LoginRepository.kt
deleted file mode 100644
index 123fb9ce..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/repository/LoginRepository.kt
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.algokelvin.shoppingyuk.domain.repository
-
-import com.algokelvin.shoppingyuk.data.api.ResponseResults
-import com.algokelvin.shoppingyuk.data.model.user.Login
-import com.algokelvin.shoppingyuk.data.model.user.Token
-import com.algokelvin.shoppingyuk.data.model.user.User
-
-interface LoginRepository {
- suspend fun login(login: Login): ResponseResults
- suspend fun getUser(login: Login): ResponseResults
- suspend fun getUserFromDB(id: Int): User
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/repository/ProductCategoryRepository.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/repository/ProductCategoryRepository.kt
deleted file mode 100644
index d93c2340..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/repository/ProductCategoryRepository.kt
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.algokelvin.shoppingyuk.domain.repository
-
-import com.algokelvin.shoppingyuk.data.model.product.Product
-
-interface ProductCategoryRepository {
- suspend fun getProductsSortByCategory(): List
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/repository/ProductDetailRepository.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/repository/ProductDetailRepository.kt
deleted file mode 100644
index f66a0fd2..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/repository/ProductDetailRepository.kt
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.algokelvin.shoppingyuk.domain.repository
-
-import com.algokelvin.shoppingyuk.data.model.product.Product
-
-interface ProductDetailRepository {
- suspend fun getProductDetail(id: String): Product?
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/repository/ProductRepository.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/repository/ProductRepository.kt
deleted file mode 100644
index 2b7ac113..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/repository/ProductRepository.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.algokelvin.shoppingyuk.domain.repository
-
-import com.algokelvin.shoppingyuk.data.model.product.Product
-
-interface ProductRepository {
- suspend fun getProducts(): List?
- suspend fun updateProducts(): List?
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/usecase/AddProductToCartUseCase.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/usecase/AddProductToCartUseCase.kt
deleted file mode 100644
index 7fe9ecdb..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/usecase/AddProductToCartUseCase.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.algokelvin.shoppingyuk.domain.usecase
-
-import com.algokelvin.shoppingyuk.data.model.cart.CartDB
-import com.algokelvin.shoppingyuk.domain.repository.CartRepository
-
-class AddProductToCartUseCase(private val cartRepository: CartRepository) {
- suspend fun execute(cartDB: CartDB): String = cartRepository.addProductInCart(cartDB)
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/usecase/CheckoutUseCase.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/usecase/CheckoutUseCase.kt
deleted file mode 100644
index bfa0e9fe..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/usecase/CheckoutUseCase.kt
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.algokelvin.shoppingyuk.domain.usecase
-
-import com.algokelvin.shoppingyuk.domain.repository.CartRepository
-
-class CheckoutUseCase(private val cartRepository: CartRepository) {
- suspend fun execute(userId: Int): String = cartRepository.deleteProductForCheckout(userId)
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/usecase/DeleteProductInCartUseCase.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/usecase/DeleteProductInCartUseCase.kt
deleted file mode 100644
index d204340a..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/usecase/DeleteProductInCartUseCase.kt
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.algokelvin.shoppingyuk.domain.usecase
-
-import com.algokelvin.shoppingyuk.domain.repository.CartRepository
-
-class DeleteProductInCartUseCase(private val cartRepository: CartRepository) {
- suspend fun execute(
- userId: Int,
- productInt: Int,
- ): String = cartRepository.deleteProductInCart(userId, productInt)
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/usecase/GetCartByUserIdUseCase.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/usecase/GetCartByUserIdUseCase.kt
deleted file mode 100644
index 76dd0b69..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/usecase/GetCartByUserIdUseCase.kt
+++ /dev/null
@@ -1,9 +0,0 @@
-package com.algokelvin.shoppingyuk.domain.usecase
-
-import com.algokelvin.shoppingyuk.data.api.ResponseResults
-import com.algokelvin.shoppingyuk.data.model.cart.CartDB
-import com.algokelvin.shoppingyuk.domain.repository.CartRepository
-
-class GetCartByUserIdUseCase(private val cartRepository: CartRepository) {
- suspend fun execute(userId: Int): ResponseResults> = cartRepository.getCartByUserId(userId)
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/usecase/GetProductDetailUseCase.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/usecase/GetProductDetailUseCase.kt
deleted file mode 100644
index c4757b28..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/usecase/GetProductDetailUseCase.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.algokelvin.shoppingyuk.domain.usecase
-
-import com.algokelvin.shoppingyuk.data.model.product.Product
-import com.algokelvin.shoppingyuk.domain.repository.ProductDetailRepository
-
-class GetProductDetailUseCase(private val productDetailRepository: ProductDetailRepository) {
- suspend fun execute(id: String): Product? = productDetailRepository.getProductDetail(id)
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/usecase/GetProductsCategoryUseCase.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/usecase/GetProductsCategoryUseCase.kt
deleted file mode 100644
index 2699bd3c..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/usecase/GetProductsCategoryUseCase.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.algokelvin.shoppingyuk.domain.usecase
-
-import com.algokelvin.shoppingyuk.data.model.product.Product
-import com.algokelvin.shoppingyuk.domain.repository.ProductCategoryRepository
-
-class GetProductsCategoryUseCase(private val productCategoryRepository: ProductCategoryRepository) {
- suspend fun execute(): List = productCategoryRepository.getProductsSortByCategory()
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/usecase/GetProductsUseCase.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/usecase/GetProductsUseCase.kt
deleted file mode 100644
index 4b48ab28..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/usecase/GetProductsUseCase.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.algokelvin.shoppingyuk.domain.usecase
-
-import com.algokelvin.shoppingyuk.data.model.product.Product
-import com.algokelvin.shoppingyuk.domain.repository.ProductRepository
-
-class GetProductsUseCase(private val productRepository: ProductRepository) {
- suspend fun execute(): List? = productRepository.getProducts()
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/usecase/GetProfileFromDBUseCase.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/usecase/GetProfileFromDBUseCase.kt
deleted file mode 100644
index 0c4f1865..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/usecase/GetProfileFromDBUseCase.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.algokelvin.shoppingyuk.domain.usecase
-
-import com.algokelvin.shoppingyuk.data.model.user.User
-import com.algokelvin.shoppingyuk.domain.repository.LoginRepository
-
-class GetProfileFromDBUseCase(private val loginRepository: LoginRepository) {
- suspend fun execute(id: Int): User = loginRepository.getUserFromDB(id)
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/usecase/GetProfileUseCase.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/usecase/GetProfileUseCase.kt
deleted file mode 100644
index 887f48ae..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/usecase/GetProfileUseCase.kt
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.algokelvin.shoppingyuk.domain.usecase
-
-import com.algokelvin.shoppingyuk.data.api.ResponseResults
-import com.algokelvin.shoppingyuk.data.model.user.Login
-import com.algokelvin.shoppingyuk.data.model.user.User
-import com.algokelvin.shoppingyuk.domain.repository.LoginRepository
-
-class GetProfileUseCase(private val loginRepository: LoginRepository) {
- suspend fun execute(login: Login): ResponseResults = loginRepository.getUser(login)
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/usecase/LoginUseCase.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/usecase/LoginUseCase.kt
deleted file mode 100644
index af9a734a..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/usecase/LoginUseCase.kt
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.algokelvin.shoppingyuk.domain.usecase
-
-import com.algokelvin.shoppingyuk.data.api.ResponseResults
-import com.algokelvin.shoppingyuk.data.model.user.Login
-import com.algokelvin.shoppingyuk.data.model.user.Token
-import com.algokelvin.shoppingyuk.domain.repository.LoginRepository
-
-class LoginUseCase(private val loginRepository: LoginRepository) {
- suspend fun execute(login: Login): ResponseResults = loginRepository.login(login)
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/usecase/UpdateCountProductInCartUseCase.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/usecase/UpdateCountProductInCartUseCase.kt
deleted file mode 100644
index 8bf05495..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/domain/usecase/UpdateCountProductInCartUseCase.kt
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.algokelvin.shoppingyuk.domain.usecase
-
-import com.algokelvin.shoppingyuk.domain.repository.CartRepository
-
-class UpdateCountProductInCartUseCase(private val cartRepository: CartRepository) {
- suspend fun execute(
- userId: Int,
- productInt: Int,
- count: Int
- ): String = cartRepository.updateCountProductInCart(userId, productInt, count)
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/App.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/App.kt
deleted file mode 100644
index 518c0157..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/App.kt
+++ /dev/null
@@ -1,58 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation
-
-import android.app.Application
-import com.algokelvin.shoppingyuk.BuildConfig
-import com.algokelvin.shoppingyuk.presentation.di.Injector
-import com.algokelvin.shoppingyuk.presentation.di.cart.CartSubComponent
-import com.algokelvin.shoppingyuk.presentation.di.checkout.CheckoutSubComponent
-import com.algokelvin.shoppingyuk.presentation.di.core.AppComponent
-import com.algokelvin.shoppingyuk.presentation.di.core.AppModule
-import com.algokelvin.shoppingyuk.presentation.di.core.DaggerAppComponent
-import com.algokelvin.shoppingyuk.presentation.di.core.NetModule
-import com.algokelvin.shoppingyuk.presentation.di.core.RemoteDataModule
-import com.algokelvin.shoppingyuk.presentation.di.home.HomeSubComponent
-import com.algokelvin.shoppingyuk.presentation.di.login.LoginSubComponent
-import com.algokelvin.shoppingyuk.presentation.di.product.ProductCategorySubComponent
-import com.algokelvin.shoppingyuk.presentation.di.product.ProductDetailSubComponent
-import com.algokelvin.shoppingyuk.presentation.di.product.ProductSubComponent
-
-class App: Application(), Injector {
- private lateinit var appComponent:AppComponent
-
- override fun onCreate() {
- super.onCreate()
- appComponent = DaggerAppComponent.builder()
- .appModule(AppModule(applicationContext))
- .netModule(NetModule(BuildConfig.BASE_URL))
- .remoteDataModule(RemoteDataModule())
- .build()
- }
-
- override fun createMovieSubComponent(): ProductSubComponent {
- return appComponent.movieSubComponent().create()
- }
-
- override fun createProductDetailSubComponent(): ProductDetailSubComponent {
- return appComponent.productDetailSubComponent().create()
- }
-
- override fun createLoginSubComponent(): LoginSubComponent {
- return appComponent.loginSubComponent().create()
- }
-
- override fun createProductCategorySubComponent(): ProductCategorySubComponent {
- return appComponent.productCategorySubComponent().create()
- }
-
- override fun createHomeSubComponent(): HomeSubComponent {
- return appComponent.homeSubComponent().create()
- }
-
- override fun createCartSubComponent(): CartSubComponent {
- return appComponent.cartSubComponent().create()
- }
-
- override fun createCheckoutSubComponent(): CheckoutSubComponent {
- return appComponent.checkoutSubComponent().create()
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/cart/CartActivity.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/cart/CartActivity.kt
deleted file mode 100644
index 41cd373e..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/cart/CartActivity.kt
+++ /dev/null
@@ -1,115 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.cart
-
-import android.content.Intent
-import android.os.Bundle
-import android.view.View
-import android.widget.Toast
-import androidx.appcompat.app.AppCompatActivity
-import androidx.databinding.DataBindingUtil
-import androidx.lifecycle.ViewModelProvider
-import androidx.recyclerview.widget.LinearLayoutManager
-import com.algokelvin.shoppingyuk.R
-import com.algokelvin.shoppingyuk.data.model.cart.CartDB
-import com.algokelvin.shoppingyuk.databinding.ActivityCartBinding
-import com.algokelvin.shoppingyuk.databinding.ItemCartLayoutBinding
-import com.algokelvin.shoppingyuk.presentation.checkout.CheckoutActivity
-import com.algokelvin.shoppingyuk.presentation.di.Injector
-import com.algokelvin.shoppingyuk.presentation.onclick.OnClickItemCart
-import com.algokelvin.shoppingyuk.utils.EncryptLocal
-import javax.inject.Inject
-
-class CartActivity : AppCompatActivity(), OnClickItemCart {
- @Inject
- lateinit var factory: CartViewModelFactory
-
- private lateinit var cartViewModel: CartViewModel
- private lateinit var binding: ActivityCartBinding
- private lateinit var adapter: CartAdapter
-
- private var profileId: Int? = 0
-
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- binding = DataBindingUtil.setContentView(this, R.layout.activity_cart)
-
- (application as Injector).createCartSubComponent()
- .inject(this)
- cartViewModel = ViewModelProvider(this, factory)[CartViewModel::class]
-
- profileId = EncryptLocal.getIdProfile(this)
-
- initListCart()
-
- binding.btnCheckout.setOnClickListener {
- val intentToCheckout = Intent(this, CheckoutActivity::class.java)
- startActivity(intentToCheckout)
- }
- }
-
- private fun initListCart() {
- binding.rvCart.layoutManager = LinearLayoutManager(this)
- adapter = CartAdapter(this)
- binding.rvCart.adapter = adapter
- getListCart()
- }
-
- override fun onClickIncrease(bindingItem: ItemCartLayoutBinding, cartDB: CartDB) {
- val countNow = cartDB.count + 1
- bindingItem.itemCart.text = countNow.toString()
- cartDB.apply {
- updateListCart(userId, productId, countNow)
- getListCart()
- }
- }
-
- override fun onClickDecrease(bindingItem: ItemCartLayoutBinding, cartDB: CartDB) {
- val countNow = cartDB.count - 1
- bindingItem.itemCart.text = countNow.toString()
- cartDB.apply {
- updateListCart(userId, productId, countNow)
- getListCart()
- }
- }
-
- override fun onClickDelete(cartDB: CartDB) {
- cartDB.apply {
- deleteProductInCart(userId, productId)
- getListCart()
- }
- }
-
- private fun getListCart() {
- profileId?.let { id ->
- cartViewModel.getCartByUserId(id).observe(this) { cart ->
- if (cart != null) {
- cart.data?.let { listCart ->
- if (listCart.isNotEmpty()) {
- binding.messageEmptyCart.visibility = View.GONE
- binding.btnCheckout.isEnabled = true
-
- adapter.setList(listCart)
- adapter.notifyDataSetChanged()
- } else {
- binding.messageEmptyCart.visibility = View.VISIBLE
- binding.btnCheckout.isEnabled = false
- }
- }
- } else {
- Toast.makeText(this, "No data cart", Toast.LENGTH_LONG).show()
- }
- }
- }
- }
-
- private fun updateListCart(userId: Int, productId: Int, count: Int) {
- cartViewModel.updateCountProduct(userId, productId, count).observe(this) {
- Toast.makeText(this, it.toString(), Toast.LENGTH_LONG).show()
- }
- }
-
- private fun deleteProductInCart(userId: Int, productId: Int) {
- cartViewModel.deleteProduct(userId, productId). observe(this) {
- Toast.makeText(this, it.toString(), Toast.LENGTH_LONG).show()
- }
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/cart/CartAdapter.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/cart/CartAdapter.kt
deleted file mode 100644
index 8dd8628b..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/cart/CartAdapter.kt
+++ /dev/null
@@ -1,68 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.cart
-
-import android.view.LayoutInflater
-import android.view.ViewGroup
-import androidx.databinding.DataBindingUtil
-import androidx.recyclerview.widget.RecyclerView
-import com.algokelvin.shoppingyuk.R
-import com.algokelvin.shoppingyuk.data.model.cart.CartDB
-import com.algokelvin.shoppingyuk.databinding.ItemCartLayoutBinding
-import com.algokelvin.shoppingyuk.presentation.onclick.OnClickItemCart
-import com.bumptech.glide.Glide
-
-
-class CartAdapter(
- private val onClickItemCart: OnClickItemCart
-):RecyclerView.Adapter() {
- private val cartList = ArrayList()
-
- fun setList(cart:List){
- cartList.clear()
- cartList.addAll(cart)
- }
-
- override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): CartViewHolder {
- val layoutInflater = LayoutInflater.from(parent.context)
- val binding : ItemCartLayoutBinding = DataBindingUtil.inflate(
- layoutInflater,
- R.layout.item_cart_layout,
- parent,
- false
- )
- return CartViewHolder(binding, onClickItemCart)
- }
-
- override fun getItemCount(): Int {
- return cartList.size
- }
-
- override fun onBindViewHolder(holder: CartViewHolder, position: Int) {
- holder.bind(cartList[position])
- }
-}
-
-
-
-class CartViewHolder(
- private val binding: ItemCartLayoutBinding,
- private val onClickItemCart: OnClickItemCart,
-): RecyclerView.ViewHolder(binding.root) {
-
- fun bind(cartDB: CartDB){
- binding.nameCart.text = cartDB.productTitle
- binding.itemCart.text = cartDB.count.toString()
- Glide.with(binding.imgCart.context)
- .load(cartDB.productImage)
- .into(binding.imgCart)
-
- binding.imgIncrease.setOnClickListener {
- onClickItemCart.onClickIncrease(binding, cartDB)
- }
- binding.imgDecrease.setOnClickListener {
- onClickItemCart.onClickDecrease(binding, cartDB)
- }
- binding.imgDeleteItem.setOnClickListener {
- onClickItemCart.onClickDelete(cartDB)
- }
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/cart/CartViewModel.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/cart/CartViewModel.kt
deleted file mode 100644
index 21df1590..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/cart/CartViewModel.kt
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.cart
-
-import androidx.lifecycle.ViewModel
-import androidx.lifecycle.liveData
-import com.algokelvin.shoppingyuk.domain.usecase.DeleteProductInCartUseCase
-import com.algokelvin.shoppingyuk.domain.usecase.GetCartByUserIdUseCase
-import com.algokelvin.shoppingyuk.domain.usecase.UpdateCountProductInCartUseCase
-
-class CartViewModel(
- private val getCartByUserIdUseCase: GetCartByUserIdUseCase,
- private val updateCountProductInCartUseCase: UpdateCountProductInCartUseCase,
- private val deleteProductInCartUseCase: DeleteProductInCartUseCase,
-): ViewModel() {
- fun getCartByUserId(userId: Int) = liveData {
- val listCart = getCartByUserIdUseCase.execute(userId)
- emit(listCart)
- }
- fun updateCountProduct(userId: Int, productInt: Int, count: Int) = liveData {
- val statusUpdateCountProduct = updateCountProductInCartUseCase
- .execute(userId, productInt, count)
- emit(statusUpdateCountProduct)
- }
- fun deleteProduct(userId: Int, productInt: Int) = liveData {
- val statusDeleteProduct = deleteProductInCartUseCase.execute(userId, productInt)
- emit(statusDeleteProduct)
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/cart/CartViewModelFactory.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/cart/CartViewModelFactory.kt
deleted file mode 100644
index 09aa019b..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/cart/CartViewModelFactory.kt
+++ /dev/null
@@ -1,22 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.cart
-
-import androidx.lifecycle.ViewModel
-import androidx.lifecycle.ViewModelProvider
-import com.algokelvin.shoppingyuk.domain.usecase.DeleteProductInCartUseCase
-import com.algokelvin.shoppingyuk.domain.usecase.GetCartByUserIdUseCase
-import com.algokelvin.shoppingyuk.domain.usecase.UpdateCountProductInCartUseCase
-
-@Suppress("UNCHECKED_CAST")
-class CartViewModelFactory(
- private val getCartByUserIdUseCase: GetCartByUserIdUseCase,
- private val updateCountProductInCartUseCase: UpdateCountProductInCartUseCase,
- private val deleteProductInCartUseCase: DeleteProductInCartUseCase,
-): ViewModelProvider.Factory {
- override fun create(modelClass: Class): T {
- return CartViewModel(
- getCartByUserIdUseCase,
- updateCountProductInCartUseCase,
- deleteProductInCartUseCase
- ) as T
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/checkout/CheckoutActivity.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/checkout/CheckoutActivity.kt
deleted file mode 100644
index e3dea310..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/checkout/CheckoutActivity.kt
+++ /dev/null
@@ -1,93 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.checkout
-
-import android.content.Intent
-import android.os.Bundle
-import android.os.Handler
-import android.widget.Toast
-import androidx.appcompat.app.AppCompatActivity
-import androidx.databinding.DataBindingUtil
-import androidx.lifecycle.ViewModelProvider
-import androidx.recyclerview.widget.LinearLayoutManager
-import com.algokelvin.shoppingyuk.R
-import com.algokelvin.shoppingyuk.data.model.cart.CartDB
-import com.algokelvin.shoppingyuk.databinding.ActivityCheckoutBinding
-import com.algokelvin.shoppingyuk.presentation.di.Injector
-import com.algokelvin.shoppingyuk.presentation.home.HomeActivity
-import com.algokelvin.shoppingyuk.utils.EncryptLocal
-import javax.inject.Inject
-
-class CheckoutActivity : AppCompatActivity() {
- @Inject
- lateinit var factory: CheckoutViewModelFactory
-
- private lateinit var binding: ActivityCheckoutBinding
- private lateinit var checkoutViewModel: CheckoutViewModel
- private lateinit var adapter: CheckoutAdapter
-
- private var profileId: Int? = 0
-
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- binding = DataBindingUtil.setContentView(this, R.layout.activity_checkout)
-
- (application as Injector).createCheckoutSubComponent()
- .inject(this)
- checkoutViewModel = ViewModelProvider(this, factory)[CheckoutViewModel::class]
-
- profileId = EncryptLocal.getIdProfile(this)
-
- initCheckout()
-
- binding.btnConfirm.setOnClickListener {
- confirmCheckout()
- }
- }
-
- private fun confirmCheckout() {
- binding.btnConfirm.setBackgroundColor(resources.getColor(R.color.green_00ff00))
- binding.btnConfirm.text = getString(R.string.done)
-
- profileId?.let { id ->
- checkoutViewModel.confirmCheckout(id).observe(this) {
- Toast.makeText(this, it, Toast.LENGTH_LONG).show()
- Handler().postDelayed({
- val intentToHome = Intent(this, HomeActivity::class.java)
- startActivity(intentToHome)
- finishAffinity()
- }, 5000)
- }
- }
- }
-
- private fun initCheckout() {
- binding.rvShopping.layoutManager = LinearLayoutManager(this)
- adapter = CheckoutAdapter()
- binding.rvShopping.adapter = adapter
- getListCheckout()
- }
-
- private fun getListCheckout() {
- profileId?.let { id ->
- checkoutViewModel.getCartByUserId(id).observe(this) { checkout ->
- if (checkout != null) {
- checkout.data?.let { listCart ->
- getTotalAllPrice(listCart)
- adapter.setList(listCart)
- adapter.notifyDataSetChanged()
- }
- } else {
- Toast.makeText(this, "No data checkout", Toast.LENGTH_LONG).show()
- }
- }
- }
- }
-
- private fun getTotalAllPrice(list: List) {
- var totalAll = 0.0f
- for (price in list) {
- val total = price.count.toFloat() * price.productPrice?.toFloat()!!
- totalAll += total
- }
- binding.totalAllPrice.text = getString(R.string.total_all_price, totalAll.toString())
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/checkout/CheckoutAdapter.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/checkout/CheckoutAdapter.kt
deleted file mode 100644
index 79a7a165..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/checkout/CheckoutAdapter.kt
+++ /dev/null
@@ -1,61 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.checkout
-
-import android.view.LayoutInflater
-import android.view.ViewGroup
-import androidx.databinding.DataBindingUtil
-import androidx.recyclerview.widget.RecyclerView
-import com.algokelvin.shoppingyuk.R
-import com.algokelvin.shoppingyuk.data.model.cart.CartDB
-import com.algokelvin.shoppingyuk.databinding.ItemShoppingLayoutBinding
-import com.bumptech.glide.Glide
-
-
-class CheckoutAdapter: RecyclerView.Adapter() {
- private val cartList = ArrayList()
-
- fun setList(cart:List){
- cartList.clear()
- cartList.addAll(cart)
- }
-
- override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): CheckoutViewHolder {
- val layoutInflater = LayoutInflater.from(parent.context)
- val binding : ItemShoppingLayoutBinding = DataBindingUtil.inflate(
- layoutInflater,
- R.layout.item_shopping_layout,
- parent,
- false
- )
- return CheckoutViewHolder(binding)
- }
-
- override fun getItemCount(): Int {
- return cartList.size
- }
-
- override fun onBindViewHolder(holder: CheckoutViewHolder, position: Int) {
- holder.bind(cartList[position])
- }
-}
-
-
-
-class CheckoutViewHolder(
- private val binding: ItemShoppingLayoutBinding,
-): RecyclerView.ViewHolder(binding.root) {
-
- fun bind(cartDB: CartDB){
- val count = cartDB.count
- val price = cartDB.productPrice
- val total = count.toFloat() * price!!
-
- binding.nameShop.text = cartDB.productTitle
- binding.itemShop.text = itemView.context.getString(R.string.items_product, cartDB.count.toString())
- binding.priceShop.text = total.toString()
-
- Glide.with(binding.imgShop.context)
- .load(cartDB.productImage)
- .into(binding.imgShop)
-
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/checkout/CheckoutViewModel.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/checkout/CheckoutViewModel.kt
deleted file mode 100644
index a409465e..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/checkout/CheckoutViewModel.kt
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.checkout
-
-import androidx.lifecycle.ViewModel
-import androidx.lifecycle.liveData
-import com.algokelvin.shoppingyuk.domain.usecase.CheckoutUseCase
-import com.algokelvin.shoppingyuk.domain.usecase.GetCartByUserIdUseCase
-
-class CheckoutViewModel(
- private val getCartByUserIdUseCase: GetCartByUserIdUseCase,
- private val checkoutUseCase: CheckoutUseCase,
-): ViewModel() {
- fun getCartByUserId(userId: Int) = liveData {
- val listCart = getCartByUserIdUseCase.execute(userId)
- emit(listCart)
- }
- fun confirmCheckout(userId: Int) = liveData {
- val statusConfirm = checkoutUseCase.execute(userId)
- emit(statusConfirm)
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/checkout/CheckoutViewModelFactory.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/checkout/CheckoutViewModelFactory.kt
deleted file mode 100644
index 8b6c2d7e..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/checkout/CheckoutViewModelFactory.kt
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.checkout
-
-import androidx.lifecycle.ViewModel
-import androidx.lifecycle.ViewModelProvider
-import com.algokelvin.shoppingyuk.domain.usecase.CheckoutUseCase
-import com.algokelvin.shoppingyuk.domain.usecase.GetCartByUserIdUseCase
-
-@Suppress("UNCHECKED_CAST")
-class CheckoutViewModelFactory(
- private val getCartByUserIdUseCase: GetCartByUserIdUseCase,
- private val checkoutUseCase: CheckoutUseCase,
-): ViewModelProvider.Factory {
- override fun create(modelClass: Class): T {
- return CheckoutViewModel(
- getCartByUserIdUseCase,
- checkoutUseCase
- ) as T
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/Injector.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/Injector.kt
deleted file mode 100644
index 31a65e30..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/Injector.kt
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.di
-
-import com.algokelvin.shoppingyuk.presentation.di.cart.CartSubComponent
-import com.algokelvin.shoppingyuk.presentation.di.checkout.CheckoutSubComponent
-import com.algokelvin.shoppingyuk.presentation.di.home.HomeSubComponent
-import com.algokelvin.shoppingyuk.presentation.di.login.LoginSubComponent
-import com.algokelvin.shoppingyuk.presentation.di.product.ProductCategorySubComponent
-import com.algokelvin.shoppingyuk.presentation.di.product.ProductDetailSubComponent
-import com.algokelvin.shoppingyuk.presentation.di.product.ProductSubComponent
-
-interface Injector {
- fun createMovieSubComponent(): ProductSubComponent
- fun createProductDetailSubComponent(): ProductDetailSubComponent
- fun createLoginSubComponent(): LoginSubComponent
- fun createProductCategorySubComponent(): ProductCategorySubComponent
- fun createHomeSubComponent(): HomeSubComponent
- fun createCartSubComponent(): CartSubComponent
- fun createCheckoutSubComponent(): CheckoutSubComponent
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/cart/CartModule.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/cart/CartModule.kt
deleted file mode 100644
index 7523513f..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/cart/CartModule.kt
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.di.cart
-
-import com.algokelvin.shoppingyuk.domain.usecase.DeleteProductInCartUseCase
-import com.algokelvin.shoppingyuk.domain.usecase.GetCartByUserIdUseCase
-import com.algokelvin.shoppingyuk.domain.usecase.UpdateCountProductInCartUseCase
-import com.algokelvin.shoppingyuk.presentation.cart.CartViewModelFactory
-import dagger.Module
-import dagger.Provides
-
-@Module
-class CartModule {
- @CartScope
- @Provides
- fun provideCartViewModelFactory(
- getCartByUserIdUseCase: GetCartByUserIdUseCase,
- updateCountProductInCartUseCase: UpdateCountProductInCartUseCase,
- deleteProductInCartUseCase: DeleteProductInCartUseCase,
- ): CartViewModelFactory = CartViewModelFactory(
- getCartByUserIdUseCase,
- updateCountProductInCartUseCase,
- deleteProductInCartUseCase
- )
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/cart/CartScope.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/cart/CartScope.kt
deleted file mode 100644
index 6d25a205..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/cart/CartScope.kt
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.di.cart
-
-import javax.inject.Scope
-
-@Scope
-@Retention(AnnotationRetention.RUNTIME)
-annotation class CartScope
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/cart/CartSubComponent.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/cart/CartSubComponent.kt
deleted file mode 100644
index 4732a690..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/cart/CartSubComponent.kt
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.di.cart
-
-import com.algokelvin.shoppingyuk.presentation.cart.CartActivity
-import dagger.Subcomponent
-
-@CartScope
-@Subcomponent(modules = [CartModule::class])
-interface CartSubComponent {
- fun inject(cartActivity: CartActivity)
-
- @Subcomponent.Factory
- interface Factory {
- fun create(): CartSubComponent
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/checkout/CheckoutModule.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/checkout/CheckoutModule.kt
deleted file mode 100644
index 1d42f604..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/checkout/CheckoutModule.kt
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.di.checkout
-
-import com.algokelvin.shoppingyuk.domain.usecase.CheckoutUseCase
-import com.algokelvin.shoppingyuk.domain.usecase.GetCartByUserIdUseCase
-import com.algokelvin.shoppingyuk.presentation.checkout.CheckoutViewModelFactory
-import dagger.Module
-import dagger.Provides
-
-@Module
-class CheckoutModule {
- @CheckoutScope
- @Provides
- fun provideCheckoutViewModelFactory(
- getCartByUserIdUseCase: GetCartByUserIdUseCase,
- checkoutUseCase: CheckoutUseCase,
- ): CheckoutViewModelFactory = CheckoutViewModelFactory(
- getCartByUserIdUseCase,
- checkoutUseCase
- )
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/checkout/CheckoutScope.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/checkout/CheckoutScope.kt
deleted file mode 100644
index b11f78cd..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/checkout/CheckoutScope.kt
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.di.checkout
-
-import javax.inject.Scope
-
-@Scope
-@Retention(AnnotationRetention.RUNTIME)
-annotation class CheckoutScope
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/checkout/CheckoutSubComponent.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/checkout/CheckoutSubComponent.kt
deleted file mode 100644
index faa061b8..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/checkout/CheckoutSubComponent.kt
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.di.checkout
-
-import com.algokelvin.shoppingyuk.presentation.checkout.CheckoutActivity
-import dagger.Subcomponent
-
-@CheckoutScope
-@Subcomponent(modules = [CheckoutModule::class])
-interface CheckoutSubComponent {
- fun inject(checkoutActivity: CheckoutActivity)
-
- @Subcomponent.Factory
- interface Factory {
- fun create(): CheckoutSubComponent
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/core/AppComponent.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/core/AppComponent.kt
deleted file mode 100644
index 39165852..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/core/AppComponent.kt
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.di.core
-
-import com.algokelvin.shoppingyuk.presentation.di.cart.CartSubComponent
-import com.algokelvin.shoppingyuk.presentation.di.checkout.CheckoutSubComponent
-import com.algokelvin.shoppingyuk.presentation.di.home.HomeSubComponent
-import com.algokelvin.shoppingyuk.presentation.di.login.LoginSubComponent
-import com.algokelvin.shoppingyuk.presentation.di.product.ProductCategorySubComponent
-import com.algokelvin.shoppingyuk.presentation.di.product.ProductDetailSubComponent
-import com.algokelvin.shoppingyuk.presentation.di.product.ProductSubComponent
-import dagger.Component
-import javax.inject.Singleton
-
-@Singleton
-@Component(modules = [
- AppModule::class,
- NetModule::class,
- DatabaseModule::class,
- UseCaseModule::class,
- RepositoryModule::class,
- RemoteDataModule::class,
- LocalDataModule::class,
- CacheDataModule::class
-])
-interface AppComponent {
- fun movieSubComponent(): ProductSubComponent.Factory
- fun productDetailSubComponent(): ProductDetailSubComponent.Factory
- fun loginSubComponent(): LoginSubComponent.Factory
- fun productCategorySubComponent(): ProductCategorySubComponent.Factory
- fun homeSubComponent(): HomeSubComponent.Factory
- fun cartSubComponent(): CartSubComponent.Factory
- fun checkoutSubComponent(): CheckoutSubComponent.Factory
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/core/AppModule.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/core/AppModule.kt
deleted file mode 100644
index 5afd683d..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/core/AppModule.kt
+++ /dev/null
@@ -1,30 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.di.core
-
-import android.content.Context
-import com.algokelvin.shoppingyuk.presentation.di.cart.CartSubComponent
-import com.algokelvin.shoppingyuk.presentation.di.checkout.CheckoutSubComponent
-import com.algokelvin.shoppingyuk.presentation.di.home.HomeSubComponent
-import com.algokelvin.shoppingyuk.presentation.di.login.LoginSubComponent
-import com.algokelvin.shoppingyuk.presentation.di.product.ProductCategorySubComponent
-import com.algokelvin.shoppingyuk.presentation.di.product.ProductDetailSubComponent
-import com.algokelvin.shoppingyuk.presentation.di.product.ProductSubComponent
-import dagger.Module
-import dagger.Provides
-import javax.inject.Singleton
-
-@Module(subcomponents = [
- ProductSubComponent::class,
- ProductDetailSubComponent::class,
- LoginSubComponent::class,
- ProductCategorySubComponent::class,
- HomeSubComponent::class,
- CartSubComponent::class,
- CheckoutSubComponent::class,
-])
-class AppModule(private val context: Context) {
- @Singleton
- @Provides
- fun provideApplicationContext(): Context {
- return context.applicationContext
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/core/CacheDataModule.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/core/CacheDataModule.kt
deleted file mode 100644
index 0a9f6e1e..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/core/CacheDataModule.kt
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.di.core
-
-import com.algokelvin.shoppingyuk.data.repository.product.datasource.ProductCacheDataSource
-import com.algokelvin.shoppingyuk.data.repository.product.datasourceImpl.ProductCacheDataSourceImpl
-import dagger.Module
-import dagger.Provides
-import javax.inject.Singleton
-
-@Module
-class CacheDataModule {
- @Singleton
- @Provides
- fun provideProductCacheDataModule(): ProductCacheDataSource {
- return ProductCacheDataSourceImpl()
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/core/DatabaseModule.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/core/DatabaseModule.kt
deleted file mode 100644
index 99ee1b8c..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/core/DatabaseModule.kt
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.di.core
-
-import android.content.Context
-import androidx.room.Room
-import com.algokelvin.shoppingyuk.data.db.CartDao
-import com.algokelvin.shoppingyuk.data.db.ProductDB
-import com.algokelvin.shoppingyuk.data.db.ProductDao
-import com.algokelvin.shoppingyuk.data.db.UserDao
-import dagger.Module
-import dagger.Provides
-import javax.inject.Singleton
-
-@Module
-class DatabaseModule {
- @Singleton
- @Provides
- fun provideProductDatabase(context: Context): ProductDB {
- return Room.databaseBuilder(context, ProductDB::class.java, "fakeproductdb")
- .build()
- }
-
- @Singleton
- @Provides
- fun provideProductDao(productDB: ProductDB): ProductDao {
- return productDB.productDao()
- }
-
- @Singleton
- @Provides
- fun provideUserDao(productDB: ProductDB): UserDao {
- return productDB.userDao()
- }
-
- @Singleton
- @Provides
- fun provideCartDao(productDB: ProductDB): CartDao {
- return productDB.cartDao()
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/core/LocalDataModule.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/core/LocalDataModule.kt
deleted file mode 100644
index a75396b1..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/core/LocalDataModule.kt
+++ /dev/null
@@ -1,35 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.di.core
-
-import com.algokelvin.shoppingyuk.data.db.CartDao
-import com.algokelvin.shoppingyuk.data.db.ProductDao
-import com.algokelvin.shoppingyuk.data.db.UserDao
-import com.algokelvin.shoppingyuk.data.repository.cart.datasource.CartLocalDataSource
-import com.algokelvin.shoppingyuk.data.repository.cart.datasourceImpl.CartLocalDataSourceImpl
-import com.algokelvin.shoppingyuk.data.repository.login.datasource.LoginLocalDataSource
-import com.algokelvin.shoppingyuk.data.repository.login.datasourceImpl.LoginLocalDataSourceImpl
-import com.algokelvin.shoppingyuk.data.repository.product.datasource.ProductLocalDataSource
-import com.algokelvin.shoppingyuk.data.repository.product.datasourceImpl.ProductLocalDataSourceImpl
-import dagger.Module
-import dagger.Provides
-import javax.inject.Singleton
-
-@Module
-class LocalDataModule {
- @Singleton
- @Provides
- fun provideMovieLocalDataModule(productDao: ProductDao): ProductLocalDataSource {
- return ProductLocalDataSourceImpl(productDao)
- }
-
- @Singleton
- @Provides
- fun provideLoginLocalDataModule(userDao: UserDao): LoginLocalDataSource {
- return LoginLocalDataSourceImpl(userDao)
- }
-
- @Singleton
- @Provides
- fun provideCartLocalDataModule(cartDao: CartDao): CartLocalDataSource {
- return CartLocalDataSourceImpl(cartDao)
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/core/NetModule.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/core/NetModule.kt
deleted file mode 100644
index 4361ae1b..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/core/NetModule.kt
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.di.core
-
-import com.algokelvin.shoppingyuk.data.api.ProductApiService
-import dagger.Module
-import dagger.Provides
-import retrofit2.Retrofit
-import retrofit2.converter.gson.GsonConverterFactory
-import javax.inject.Singleton
-
-@Module
-class NetModule(private val baseUrl: String) {
- @Singleton
- @Provides
- fun provideRetrofit(): Retrofit {
- return Retrofit.Builder()
- .addConverterFactory(GsonConverterFactory.create())
- .baseUrl(baseUrl)
- .build()
- }
-
- @Singleton
- @Provides
- fun provideProductApiService(retrofit: Retrofit): ProductApiService {
- return retrofit.create(ProductApiService::class.java)
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/core/RemoteDataModule.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/core/RemoteDataModule.kt
deleted file mode 100644
index 81ebf7b2..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/core/RemoteDataModule.kt
+++ /dev/null
@@ -1,49 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.di.core
-
-import com.algokelvin.shoppingyuk.data.api.ProductApiService
-import com.algokelvin.shoppingyuk.data.repository.cart.datasource.CartRemoteDataSource
-import com.algokelvin.shoppingyuk.data.repository.cart.datasourceImpl.CartRemoteDataSourceImpl
-import com.algokelvin.shoppingyuk.data.repository.login.datasource.LoginRemoteDataSource
-import com.algokelvin.shoppingyuk.data.repository.login.datasourceImpl.LoginRemoteDataSourceImpl
-import com.algokelvin.shoppingyuk.data.repository.product.datasource.ProductRemoteDataSource
-import com.algokelvin.shoppingyuk.data.repository.product.datasourceImpl.ProductRemoteDataSourceImpl
-import com.algokelvin.shoppingyuk.data.repository.productCategory.datasource.ProductCategoryRemoteDataSource
-import com.algokelvin.shoppingyuk.data.repository.productCategory.datasourceImpl.ProductCategoryRemoteDataSourceImpl
-import com.algokelvin.shoppingyuk.data.repository.productDetail.datasource.ProductDetailRemoteDataSource
-import com.algokelvin.shoppingyuk.data.repository.productDetail.datasourceImpl.ProductDetailRemoteDataSourceImpl
-import dagger.Module
-import dagger.Provides
-import javax.inject.Singleton
-
-@Module
-class RemoteDataModule {
- @Singleton
- @Provides
- fun provideMovieRemoteDataModule(productApiService: ProductApiService): ProductRemoteDataSource {
- return ProductRemoteDataSourceImpl(productApiService)
- }
-
- @Singleton
- @Provides
- fun provideProductDetailRemoteDataModule(productApiService: ProductApiService): ProductDetailRemoteDataSource {
- return ProductDetailRemoteDataSourceImpl(productApiService)
- }
-
- @Singleton
- @Provides
- fun provideLoginRemoteDataModule(productApiService: ProductApiService): LoginRemoteDataSource {
- return LoginRemoteDataSourceImpl(productApiService)
- }
-
- @Singleton
- @Provides
- fun provideProductCategoryRemoteDataModule(productApiService: ProductApiService): ProductCategoryRemoteDataSource {
- return ProductCategoryRemoteDataSourceImpl(productApiService)
- }
-
- @Singleton
- @Provides
- fun provideCartRemoteDataModule(productApiService: ProductApiService): CartRemoteDataSource {
- return CartRemoteDataSourceImpl(productApiService)
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/core/RepositoryModule.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/core/RepositoryModule.kt
deleted file mode 100644
index 28a95b43..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/core/RepositoryModule.kt
+++ /dev/null
@@ -1,82 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.di.core
-
-import com.algokelvin.shoppingyuk.data.repository.cart.CartRepositoryImpl
-import com.algokelvin.shoppingyuk.data.repository.cart.datasource.CartLocalDataSource
-import com.algokelvin.shoppingyuk.data.repository.login.LoginRepositoryImpl
-import com.algokelvin.shoppingyuk.data.repository.login.datasource.LoginLocalDataSource
-import com.algokelvin.shoppingyuk.data.repository.login.datasource.LoginRemoteDataSource
-import com.algokelvin.shoppingyuk.data.repository.product.ProductRepositoryImpl
-import com.algokelvin.shoppingyuk.data.repository.product.datasource.ProductCacheDataSource
-import com.algokelvin.shoppingyuk.data.repository.product.datasource.ProductLocalDataSource
-import com.algokelvin.shoppingyuk.data.repository.product.datasource.ProductRemoteDataSource
-import com.algokelvin.shoppingyuk.data.repository.productCategory.ProductCategoryRepositoryImpl
-import com.algokelvin.shoppingyuk.data.repository.productCategory.datasource.ProductCategoryRemoteDataSource
-import com.algokelvin.shoppingyuk.data.repository.productDetail.ProductDetailRepositoryImpl
-import com.algokelvin.shoppingyuk.data.repository.productDetail.datasource.ProductDetailRemoteDataSource
-import com.algokelvin.shoppingyuk.domain.repository.CartRepository
-import com.algokelvin.shoppingyuk.domain.repository.LoginRepository
-import com.algokelvin.shoppingyuk.domain.repository.ProductCategoryRepository
-import com.algokelvin.shoppingyuk.domain.repository.ProductDetailRepository
-import com.algokelvin.shoppingyuk.domain.repository.ProductRepository
-import dagger.Module
-import dagger.Provides
-import javax.inject.Singleton
-
-@Module
-class RepositoryModule {
- @Provides
- @Singleton
- fun provideMovieRepository(
- productRemoteDataSource: ProductRemoteDataSource,
- productLocalDataSource: ProductLocalDataSource,
- productCacheDataSource: ProductCacheDataSource,
- ): ProductRepository {
- return ProductRepositoryImpl(
- productRemoteDataSource,
- productLocalDataSource,
- productCacheDataSource
- )
- }
-
- @Provides
- @Singleton
- fun provideProductDetailRepository(
- productDetailRemoteDataSource: ProductDetailRemoteDataSource
- ): ProductDetailRepository {
- return ProductDetailRepositoryImpl(
- productDetailRemoteDataSource
- )
- }
-
- @Provides
- @Singleton
- fun provideLoginRepository(
- loginRemoteDataSource: LoginRemoteDataSource,
- loginLocalDataSource: LoginLocalDataSource,
- ): LoginRepository {
- return LoginRepositoryImpl(
- loginRemoteDataSource,
- loginLocalDataSource
- )
- }
-
- @Provides
- @Singleton
- fun provideProductCategory(
- productCategoryRemoteDataSource: ProductCategoryRemoteDataSource
- ): ProductCategoryRepository {
- return ProductCategoryRepositoryImpl(
- productCategoryRemoteDataSource
- )
- }
-
- @Provides
- @Singleton
- fun provideCartRepository(
- cartLocalDataSource: CartLocalDataSource
- ): CartRepository {
- return CartRepositoryImpl(
- cartLocalDataSource
- )
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/core/UseCaseModule.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/core/UseCaseModule.kt
deleted file mode 100644
index ed68d06a..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/core/UseCaseModule.kt
+++ /dev/null
@@ -1,78 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.di.core
-
-import com.algokelvin.shoppingyuk.domain.repository.CartRepository
-import com.algokelvin.shoppingyuk.domain.repository.LoginRepository
-import com.algokelvin.shoppingyuk.domain.repository.ProductCategoryRepository
-import com.algokelvin.shoppingyuk.domain.repository.ProductDetailRepository
-import com.algokelvin.shoppingyuk.domain.repository.ProductRepository
-import com.algokelvin.shoppingyuk.domain.usecase.AddProductToCartUseCase
-import com.algokelvin.shoppingyuk.domain.usecase.CheckoutUseCase
-import com.algokelvin.shoppingyuk.domain.usecase.DeleteProductInCartUseCase
-import com.algokelvin.shoppingyuk.domain.usecase.GetCartByUserIdUseCase
-import com.algokelvin.shoppingyuk.domain.usecase.GetProductDetailUseCase
-import com.algokelvin.shoppingyuk.domain.usecase.GetProductsCategoryUseCase
-import com.algokelvin.shoppingyuk.domain.usecase.GetProductsUseCase
-import com.algokelvin.shoppingyuk.domain.usecase.GetProfileFromDBUseCase
-import com.algokelvin.shoppingyuk.domain.usecase.GetProfileUseCase
-import com.algokelvin.shoppingyuk.domain.usecase.LoginUseCase
-import com.algokelvin.shoppingyuk.domain.usecase.UpdateCountProductInCartUseCase
-import dagger.Module
-import dagger.Provides
-
-@Module
-class UseCaseModule {
- @Provides
- fun provideGetMovieUseCase(productRepository: ProductRepository): GetProductsUseCase {
- return GetProductsUseCase(productRepository)
- }
-
- @Provides
- fun provideGetProductDetailUseCase(productDetailRepository: ProductDetailRepository): GetProductDetailUseCase {
- return GetProductDetailUseCase(productDetailRepository)
- }
-
- @Provides
- fun provideLoginUseCase(loginRepository: LoginRepository): LoginUseCase {
- return LoginUseCase(loginRepository)
- }
-
- @Provides
- fun provideGetProductsCategoryUseCase(productCategoryRepository: ProductCategoryRepository): GetProductsCategoryUseCase {
- return GetProductsCategoryUseCase(productCategoryRepository)
- }
-
- @Provides
- fun provideGetProfileUseCase(loginRepository: LoginRepository): GetProfileUseCase {
- return GetProfileUseCase(loginRepository)
- }
-
- @Provides
- fun provideGetProfileFromDBUseCase(loginRepository: LoginRepository): GetProfileFromDBUseCase {
- return GetProfileFromDBUseCase(loginRepository)
- }
-
- @Provides
- fun provideGetCartByUserIdUseCase(cartRepository: CartRepository): GetCartByUserIdUseCase {
- return GetCartByUserIdUseCase(cartRepository)
- }
-
- @Provides
- fun provideAddProductToCartUseCase(cartRepository: CartRepository): AddProductToCartUseCase {
- return AddProductToCartUseCase(cartRepository)
- }
-
- @Provides
- fun provideUpdateCountProductInCartUseCase(cartRepository: CartRepository): UpdateCountProductInCartUseCase {
- return UpdateCountProductInCartUseCase(cartRepository)
- }
-
- @Provides
- fun provideDeleteProductInCartUseCase(cartRepository: CartRepository): DeleteProductInCartUseCase {
- return DeleteProductInCartUseCase(cartRepository)
- }
-
- @Provides
- fun provideCheckoutUseCase(cartRepository: CartRepository): CheckoutUseCase {
- return CheckoutUseCase(cartRepository)
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/home/HomeModule.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/home/HomeModule.kt
deleted file mode 100644
index cde13da4..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/home/HomeModule.kt
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.di.home
-
-import com.algokelvin.shoppingyuk.domain.usecase.GetProfileFromDBUseCase
-import com.algokelvin.shoppingyuk.presentation.home.HomeViewModelFactory
-import dagger.Module
-import dagger.Provides
-
-@Module
-class HomeModule {
- @HomeScope
- @Provides
- fun provideHomeViewModelFactory(
- getProfileFromDBUseCase: GetProfileFromDBUseCase,
- ): HomeViewModelFactory = HomeViewModelFactory(getProfileFromDBUseCase)
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/home/HomeScope.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/home/HomeScope.kt
deleted file mode 100644
index 301582c4..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/home/HomeScope.kt
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.di.home
-
-import javax.inject.Scope
-
-@Scope
-@Retention(AnnotationRetention.RUNTIME)
-annotation class HomeScope
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/home/HomeSubComponent.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/home/HomeSubComponent.kt
deleted file mode 100644
index e5224a8e..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/home/HomeSubComponent.kt
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.di.home
-
-import com.algokelvin.shoppingyuk.presentation.home.HomeActivity
-import dagger.Subcomponent
-
-@HomeScope
-@Subcomponent(modules = [HomeModule::class])
-interface HomeSubComponent {
- fun inject(homeActivity: HomeActivity)
-
- @Subcomponent.Factory
- interface Factory {
- fun create(): HomeSubComponent
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/login/LoginModule.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/login/LoginModule.kt
deleted file mode 100644
index 10dc0682..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/login/LoginModule.kt
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.di.login
-
-import com.algokelvin.shoppingyuk.domain.usecase.GetProfileUseCase
-import com.algokelvin.shoppingyuk.domain.usecase.LoginUseCase
-import com.algokelvin.shoppingyuk.presentation.login.LoginViewModelFactory
-import dagger.Module
-import dagger.Provides
-
-@Module
-class LoginModule {
- @LoginScope
- @Provides
- fun provideLoginViewModelFactory(
- loginUseCase: LoginUseCase,
- getProfileUseCase: GetProfileUseCase,
- ): LoginViewModelFactory = LoginViewModelFactory(loginUseCase, getProfileUseCase)
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/login/LoginScope.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/login/LoginScope.kt
deleted file mode 100644
index c8b1d12f..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/login/LoginScope.kt
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.di.login
-
-import javax.inject.Scope
-
-@Scope
-@Retention(AnnotationRetention.RUNTIME)
-annotation class LoginScope
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/login/LoginSubComponent.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/login/LoginSubComponent.kt
deleted file mode 100644
index 3c8ae6e2..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/login/LoginSubComponent.kt
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.di.login
-
-import com.algokelvin.shoppingyuk.presentation.login.LoginActivity
-import dagger.Subcomponent
-
-@LoginScope
-@Subcomponent(modules = [LoginModule::class])
-interface LoginSubComponent {
- fun inject(loginActivity: LoginActivity)
-
- @Subcomponent.Factory
- interface Factory {
- fun create(): LoginSubComponent
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/product/ProductCategoryModule.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/product/ProductCategoryModule.kt
deleted file mode 100644
index d3fc72d4..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/product/ProductCategoryModule.kt
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.di.product
-
-import com.algokelvin.shoppingyuk.domain.usecase.GetProductsCategoryUseCase
-import com.algokelvin.shoppingyuk.presentation.productcategory.ProductCategoryViewModelFactory
-import dagger.Module
-import dagger.Provides
-
-@Module
-class ProductCategoryModule {
- @ProductCategoryScope
- @Provides
- fun provideProductCategoryViewModelFactory(
- getProductsCategoryUseCase: GetProductsCategoryUseCase
- ): ProductCategoryViewModelFactory = ProductCategoryViewModelFactory(getProductsCategoryUseCase)
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/product/ProductCategoryScope.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/product/ProductCategoryScope.kt
deleted file mode 100644
index 71ba8ea9..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/product/ProductCategoryScope.kt
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.di.product
-
-import javax.inject.Scope
-
-@Scope
-@Retention(AnnotationRetention.RUNTIME)
-annotation class ProductCategoryScope
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/product/ProductCategorySubComponent.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/product/ProductCategorySubComponent.kt
deleted file mode 100644
index b60831c8..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/product/ProductCategorySubComponent.kt
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.di.product
-
-import com.algokelvin.shoppingyuk.presentation.productcategory.ProductCategoryFragment
-import dagger.Subcomponent
-
-@ProductCategoryScope
-@Subcomponent(modules = [ProductCategoryModule::class])
-interface ProductCategorySubComponent {
- fun inject(productCategoryFragment: ProductCategoryFragment)
-
- @Subcomponent.Factory
- interface Factory {
- fun create(): ProductCategorySubComponent
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/product/ProductDetailModule.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/product/ProductDetailModule.kt
deleted file mode 100644
index ad73edec..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/product/ProductDetailModule.kt
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.di.product
-
-import com.algokelvin.shoppingyuk.domain.usecase.AddProductToCartUseCase
-import com.algokelvin.shoppingyuk.domain.usecase.GetProductDetailUseCase
-import com.algokelvin.shoppingyuk.presentation.productdetail.ProductDetailViewModelFactory
-import dagger.Module
-import dagger.Provides
-
-@Module
-class ProductDetailModule {
- @ProductDetailScope
- @Provides
- fun provideProductDetailViewModelFactory(
- getProductDetailUseCase: GetProductDetailUseCase,
- addProductToCartUseCase: AddProductToCartUseCase,
- ): ProductDetailViewModelFactory = ProductDetailViewModelFactory(
- getProductDetailUseCase,
- addProductToCartUseCase
- )
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/product/ProductDetailScope.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/product/ProductDetailScope.kt
deleted file mode 100644
index bd3a6b52..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/product/ProductDetailScope.kt
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.di.product
-
-import javax.inject.Scope
-
-@Scope
-@Retention(AnnotationRetention.RUNTIME)
-annotation class ProductDetailScope
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/product/ProductDetailSubComponent.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/product/ProductDetailSubComponent.kt
deleted file mode 100644
index 3d1b6b17..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/product/ProductDetailSubComponent.kt
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.di.product
-
-import com.algokelvin.shoppingyuk.presentation.productdetail.ProductDetailActivity
-import dagger.Subcomponent
-
-@ProductDetailScope
-@Subcomponent(modules = [ProductDetailModule::class])
-interface ProductDetailSubComponent {
- fun inject(productDetailActivity: ProductDetailActivity)
-
- @Subcomponent.Factory
- interface Factory {
- fun create(): ProductDetailSubComponent
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/product/ProductModule.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/product/ProductModule.kt
deleted file mode 100644
index 4ca74c17..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/product/ProductModule.kt
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.di.product
-
-import com.algokelvin.shoppingyuk.domain.usecase.GetProductsUseCase
-import com.algokelvin.shoppingyuk.presentation.product.ProductViewModelFactory
-import dagger.Module
-import dagger.Provides
-
-@Module
-class ProductModule {
- @ProductScope
- @Provides
- fun provideProductViewModelFactory(
- getProductsUseCase: GetProductsUseCase,
- ): ProductViewModelFactory = ProductViewModelFactory(getProductsUseCase)
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/product/ProductScope.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/product/ProductScope.kt
deleted file mode 100644
index eb10a8ea..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/product/ProductScope.kt
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.di.product
-
-import javax.inject.Scope
-
-@Scope
-@Retention(AnnotationRetention.RUNTIME)
-annotation class ProductScope
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/product/ProductSubComponent.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/product/ProductSubComponent.kt
deleted file mode 100644
index d402d977..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/di/product/ProductSubComponent.kt
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.di.product
-
-import com.algokelvin.shoppingyuk.presentation.product.ProductFragment
-import dagger.Subcomponent
-
-@ProductScope
-@Subcomponent(modules = [ProductModule::class])
-interface ProductSubComponent {
- fun inject(productFragment: ProductFragment)
-
- @Subcomponent.Factory
- interface Factory {
- fun create(): ProductSubComponent
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/home/HomeActivity.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/home/HomeActivity.kt
deleted file mode 100644
index 6bd68c15..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/home/HomeActivity.kt
+++ /dev/null
@@ -1,68 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.home
-
-import android.content.Intent
-import android.os.Bundle
-import androidx.appcompat.app.AppCompatActivity
-import androidx.databinding.DataBindingUtil
-import androidx.lifecycle.ViewModelProvider
-import com.algokelvin.shoppingyuk.R
-import com.algokelvin.shoppingyuk.databinding.ActivityHome2Binding
-import com.algokelvin.shoppingyuk.presentation.cart.CartActivity
-import com.algokelvin.shoppingyuk.presentation.di.Injector
-import com.algokelvin.shoppingyuk.presentation.profile.ProfileBottomSheetFragment
-import com.algokelvin.shoppingyuk.utils.EncryptLocal
-import com.google.android.material.tabs.TabLayoutMediator
-import javax.inject.Inject
-
-class HomeActivity : AppCompatActivity() {
- @Inject
- lateinit var factory: HomeViewModelFactory
-
- private lateinit var binding: ActivityHome2Binding
- private lateinit var homeViewModel: HomeViewModel
-
- private var profileId : Int? = 0
-
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- binding = DataBindingUtil.setContentView(this, R.layout.activity_home2)
-
- (application as Injector).createHomeSubComponent()
- .inject(this)
- homeViewModel = ViewModelProvider(this, factory)[HomeViewModel::class]
-
- profileId = EncryptLocal.getIdProfile(this)
-
- binding.imgProfile.setOnClickListener {
- profileId?.let { id ->
- homeViewModel.getProfileFromDB(id).observe(this) { user ->
- val profileBottomSheetFragment = ProfileBottomSheetFragment(user)
- profileBottomSheetFragment.show(
- supportFragmentManager,
- profileBottomSheetFragment.tag
- )
- }
- }
- }
-
- binding.imgCart.setOnClickListener {
- val intentToCart = Intent(this, CartActivity::class.java)
- startActivity(intentToCart)
- }
-
- initTabLayout()
- }
-
- private fun initTabLayout() {
- val adapter = ViewPagerAdapter(this)
- binding.viewPager.adapter = adapter
-
- TabLayoutMediator(binding.tabLayout, binding.viewPager) { tab, position ->
- tab.text = when(position) {
- 0 -> "Product"
- 1 -> "Category"
- else -> null
- }
- }.attach()
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/home/HomeViewModel.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/home/HomeViewModel.kt
deleted file mode 100644
index 18bae703..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/home/HomeViewModel.kt
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.home
-
-import androidx.lifecycle.ViewModel
-import androidx.lifecycle.liveData
-import com.algokelvin.shoppingyuk.domain.usecase.GetProfileFromDBUseCase
-
-class HomeViewModel(
- private val getProfileFromDBUseCase: GetProfileFromDBUseCase,
-): ViewModel() {
- fun getProfileFromDB(id: Int) = liveData {
- val profileUser = getProfileFromDBUseCase.execute(id)
- emit(profileUser)
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/home/HomeViewModelFactory.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/home/HomeViewModelFactory.kt
deleted file mode 100644
index 284fde29..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/home/HomeViewModelFactory.kt
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.home
-
-import androidx.lifecycle.ViewModel
-import androidx.lifecycle.ViewModelProvider
-import com.algokelvin.shoppingyuk.domain.usecase.GetProfileFromDBUseCase
-
-@Suppress("UNCHECKED_CAST")
-class HomeViewModelFactory(
- private val getProfileFromDBUseCase: GetProfileFromDBUseCase,
-): ViewModelProvider.Factory {
- override fun create(modelClass: Class): T {
- return HomeViewModel(getProfileFromDBUseCase) as T
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/home/ViewPagerAdapter.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/home/ViewPagerAdapter.kt
deleted file mode 100644
index 4c12e2b5..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/home/ViewPagerAdapter.kt
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.home
-
-import androidx.fragment.app.Fragment
-import androidx.fragment.app.FragmentActivity
-import androidx.viewpager2.adapter.FragmentStateAdapter
-import com.algokelvin.shoppingyuk.presentation.product.ProductFragment
-import com.algokelvin.shoppingyuk.presentation.productcategory.ProductCategoryFragment
-
-class ViewPagerAdapter(activity: FragmentActivity) : FragmentStateAdapter(activity) {
- override fun getItemCount(): Int = 2
-
- override fun createFragment(position: Int): Fragment {
- return when (position) {
- 0 -> ProductFragment()
- 1 -> ProductCategoryFragment()
- else -> throw IllegalArgumentException("Invalid tab position")
- }
- }
-}
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/login/LoginActivity.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/login/LoginActivity.kt
deleted file mode 100644
index 1beaa891..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/login/LoginActivity.kt
+++ /dev/null
@@ -1,81 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.login
-
-import android.content.Intent
-import android.os.Bundle
-import android.view.View
-import android.widget.Toast
-import androidx.appcompat.app.AppCompatActivity
-import androidx.databinding.DataBindingUtil
-import androidx.lifecycle.ViewModelProvider
-import com.algokelvin.shoppingyuk.R
-import com.algokelvin.shoppingyuk.data.model.user.Login
-import com.algokelvin.shoppingyuk.databinding.ActivityLoginBinding
-import com.algokelvin.shoppingyuk.presentation.di.Injector
-import com.algokelvin.shoppingyuk.presentation.home.HomeActivity
-import com.algokelvin.shoppingyuk.utils.EncryptLocal
-import javax.inject.Inject
-
-class LoginActivity : AppCompatActivity() {
- @Inject
- lateinit var factory: LoginViewModelFactory
-
- private lateinit var binding: ActivityLoginBinding
- private lateinit var loginViewModel: LoginViewModel
-
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- checkStatusLogin()
- }
-
- private fun checkStatusLogin() {
- val getToken = EncryptLocal.getToken(this)
- if (getToken != null) {
- Toast.makeText(this, "Anda sudah Login", Toast.LENGTH_SHORT).show()
- val intentToHome = Intent(this, HomeActivity::class.java)
- startActivity(intentToHome)
- finish()
- } else {
- binding = DataBindingUtil.setContentView(this, R.layout.activity_login)
-
- (application as Injector).createLoginSubComponent()
- .inject(this)
- loginViewModel = ViewModelProvider(this, factory)[LoginViewModel::class]
-
- initLogin()
- }
- }
-
- private fun initLogin() {
- binding.btnLogin.setOnClickListener {
- binding.materialCardView.visibility = View.GONE
- binding.layoutLoading.visibility = View.VISIBLE
-
- val username = binding.usernameData.text.toString()
- val password = binding.passwordData.text.toString()
- val login = Login(username, password)
-
- loginViewModel.login(login).observe(this) { token ->
- if (token != null) {
- if (token.errorMessage == null) {
- val tokenStr = token.data?.token
- tokenStr?.let { it1 -> EncryptLocal.saveToken(this, it1) }
- loginViewModel.getProfile(login).observe(this) { profile ->
- Toast.makeText(this, "Success Login", Toast.LENGTH_SHORT).show()
- val profileId = profile.data?.id
- profileId?.let { it1 -> EncryptLocal.saveIdProfile(this, it1) }
- val intentToHome = Intent(this, HomeActivity::class.java)
- intentToHome.putExtra("PROFILE_ID", profileId)
- startActivity(intentToHome)
- finish()
- }
- } else {
- Toast.makeText(this, token.errorMessage, Toast.LENGTH_SHORT).show()
- binding.materialCardView.visibility = View.VISIBLE
- binding.layoutLoading.visibility = View.GONE
- }
- }
- }
- }
- }
-
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/login/LoginViewModel.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/login/LoginViewModel.kt
deleted file mode 100644
index 9fb79d2e..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/login/LoginViewModel.kt
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.login
-
-import androidx.lifecycle.ViewModel
-import androidx.lifecycle.liveData
-import com.algokelvin.shoppingyuk.data.model.user.Login
-import com.algokelvin.shoppingyuk.domain.usecase.GetProfileUseCase
-import com.algokelvin.shoppingyuk.domain.usecase.LoginUseCase
-
-class LoginViewModel(
- private val loginUseCase: LoginUseCase,
- private val getProfileUseCase: GetProfileUseCase,
-): ViewModel() {
- fun login(login: Login) = liveData {
- val token = loginUseCase.execute(login)
- emit(token)
- }
- fun getProfile(login: Login) = liveData {
- val profile = getProfileUseCase.execute(login)
- emit(profile)
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/login/LoginViewModelFactory.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/login/LoginViewModelFactory.kt
deleted file mode 100644
index ef295b55..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/login/LoginViewModelFactory.kt
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.login
-
-import androidx.lifecycle.ViewModel
-import androidx.lifecycle.ViewModelProvider
-import com.algokelvin.shoppingyuk.domain.usecase.GetProfileUseCase
-import com.algokelvin.shoppingyuk.domain.usecase.LoginUseCase
-
-@Suppress("UNCHECKED_CAST")
-class LoginViewModelFactory(
- private val loginUseCase: LoginUseCase,
- private val getProfileUseCase: GetProfileUseCase,
-): ViewModelProvider.Factory {
- override fun create(modelClass: Class): T {
- return LoginViewModel(loginUseCase, getProfileUseCase) as T
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/onclick/OnClickItemCart.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/onclick/OnClickItemCart.kt
deleted file mode 100644
index 148aad95..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/onclick/OnClickItemCart.kt
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.onclick
-
-import com.algokelvin.shoppingyuk.data.model.cart.CartDB
-import com.algokelvin.shoppingyuk.databinding.ItemCartLayoutBinding
-
-interface OnClickItemCart {
- fun onClickIncrease(bindingItem: ItemCartLayoutBinding, cartDB: CartDB)
- fun onClickDecrease(bindingItem: ItemCartLayoutBinding, cartDB: CartDB)
- fun onClickDelete(cartDB: CartDB)
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/onclick/OnClickItemProduct.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/onclick/OnClickItemProduct.kt
deleted file mode 100644
index d6348040..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/onclick/OnClickItemProduct.kt
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.onclick
-
-import com.algokelvin.shoppingyuk.data.model.product.Product
-
-interface OnClickItemProduct {
- fun onClickItemProduct(product: Product)
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/product/ProductAdapter.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/product/ProductAdapter.kt
deleted file mode 100644
index 2f50979f..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/product/ProductAdapter.kt
+++ /dev/null
@@ -1,64 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.product
-
-import android.view.LayoutInflater
-import android.view.ViewGroup
-import androidx.databinding.DataBindingUtil
-import androidx.recyclerview.widget.RecyclerView
-import com.algokelvin.shoppingyuk.R
-import com.algokelvin.shoppingyuk.data.model.product.Product
-import com.algokelvin.shoppingyuk.databinding.ItemProductLayoutBinding
-import com.algokelvin.shoppingyuk.presentation.onclick.OnClickItemProduct
-import com.bumptech.glide.Glide
-
-
-class ProductAdapter(
- private val onClickItemProduct: OnClickItemProduct
-):RecyclerView.Adapter() {
- private val productList = ArrayList()
-
- fun setList(products:List){
- productList.clear()
- productList.addAll(products)
- }
-
- override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): MyViewHolder {
- val layoutInflater = LayoutInflater.from(parent.context)
- val binding : ItemProductLayoutBinding = DataBindingUtil.inflate(
- layoutInflater,
- R.layout.item_product_layout,
- parent,
- false
- )
- return MyViewHolder(binding, onClickItemProduct)
- }
-
- override fun getItemCount(): Int {
- return productList.size
- }
-
- override fun onBindViewHolder(holder: MyViewHolder, position: Int) {
- holder.bind(productList[position])
- }
-}
-
-
-
-class MyViewHolder(
- private val binding: ItemProductLayoutBinding,
- private val onClickItemProduct: OnClickItemProduct,
-): RecyclerView.ViewHolder(binding.root) {
-
- fun bind(product: Product){
- binding.titleProduct.text = product.title
- binding.categoryProduct.text = product.category
- binding.priceProduct.text = product.price.toString()
- binding.rateProduct.text = product.rating?.rate.toString()
- binding.countProduct.text = itemView.context.getString(R.string.item_sold, product.rating?.count.toString())
- Glide.with(binding.imageProduct.context)
- .load(product.image)
- .into(binding.imageProduct)
- binding.cardView.setOnClickListener {
- onClickItemProduct.onClickItemProduct(product)
- }
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/product/ProductFragment.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/product/ProductFragment.kt
deleted file mode 100644
index cfa4ce15..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/product/ProductFragment.kt
+++ /dev/null
@@ -1,110 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.product
-
-import android.content.Intent
-import android.os.Bundle
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.widget.Toast
-import androidx.databinding.DataBindingUtil
-import androidx.fragment.app.Fragment
-import androidx.lifecycle.ViewModelProvider
-import androidx.recyclerview.widget.GridLayoutManager
-import com.algokelvin.shoppingyuk.R
-import com.algokelvin.shoppingyuk.data.model.product.Product
-import com.algokelvin.shoppingyuk.databinding.ActivityProductBinding
-import com.algokelvin.shoppingyuk.presentation.di.Injector
-import com.algokelvin.shoppingyuk.presentation.onclick.OnClickItemProduct
-import com.algokelvin.shoppingyuk.presentation.productdetail.ProductDetailActivity
-import javax.inject.Inject
-
-class ProductFragment : Fragment(), OnClickItemProduct {
- @Inject
- lateinit var factory: ProductViewModelFactory
-
- private lateinit var binding: ActivityProductBinding
- private lateinit var productViewModel: ProductViewModel
- private lateinit var adapter: ProductAdapter
-
- override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
- binding = DataBindingUtil.inflate(inflater, R.layout.activity_product, container, false)
-
- (activity?.application as Injector).createMovieSubComponent()
- .inject(this)
- productViewModel = ViewModelProvider(this, factory)[ProductViewModel::class]
-
- return binding.root
- }
-
- override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
- super.onViewCreated(view, savedInstanceState)
- initRecyclerView()
-
- /*binding.imgProfile.setOnClickListener {
- val profileId = intent.getIntExtra("PROFILE_ID", 0)
- productViewModel.getProfileFromDB(profileId).observe(viewLifecycleOwner, Observer { user ->
- Toast.makeText(context, "User: "+user.username, Toast.LENGTH_SHORT).show()
- val profileBottomSheetFragment = ProfileBottomSheetFragment(user)
- profileBottomSheetFragment.show(supportFragmentManager, profileBottomSheetFragment.tag)
- })
- }*/
- }
-
- /*override fun onCreateOptionsMenu(menu: Menu?): Boolean {
- val inflater: MenuInflater = menuInflater
- inflater.inflate(R.menu.update, menu)
- return true
- }
-
- override fun onOptionsItemSelected(item: MenuItem): Boolean {
- return when (item.itemId) {
- R.id.action_update -> {
- //updateMovies()
- true
- }
- else -> super.onOptionsItemSelected(item)
- }
- }*/
-
- /*private fun updateMovies() {
- *//*binding.productProgressBar.visibility = View.VISIBLE
- val response = productViewModel.updateMovies()
- response.observe(this, Observer {
- if (it != null) {
- adapter.setList(it)
- adapter.notifyDataSetChanged()
- binding.productProgressBar.visibility = View.GONE
- } else {
- binding.productProgressBar.visibility = View.GONE
- }
- })*//*
- }*/
-
- private fun initRecyclerView(){
- binding.productRecyclerView.layoutManager = GridLayoutManager(context, 2)
- adapter = ProductAdapter(this)
- binding.productRecyclerView.adapter = adapter
- displayPopularMovies()
- }
-
- private fun displayPopularMovies(){
- binding.productProgressBar.visibility = View.VISIBLE
- val responseLiveData = productViewModel.getProducts()
- responseLiveData.observe(viewLifecycleOwner) {
- if (it != null) {
- adapter.setList(it)
- adapter.notifyDataSetChanged()
- binding.productProgressBar.visibility = View.GONE
- }else{
- binding.productProgressBar.visibility = View.GONE
- Toast.makeText(context,"No data available", Toast.LENGTH_LONG).show()
- }
- }
- }
-
- override fun onClickItemProduct(product: Product) {
- val toProductDetailPage = Intent(context, ProductDetailActivity::class.java)
- toProductDetailPage.putExtra("PRODUCT_ID", product.id)
- startActivity(toProductDetailPage)
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/product/ProductViewModel.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/product/ProductViewModel.kt
deleted file mode 100644
index 9c27a838..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/product/ProductViewModel.kt
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.product
-
-import androidx.lifecycle.ViewModel
-import androidx.lifecycle.liveData
-import com.algokelvin.shoppingyuk.domain.usecase.GetProductsUseCase
-
-class ProductViewModel(
- private val getProductsUseCase: GetProductsUseCase,
-): ViewModel() {
- fun getProducts() = liveData {
- val productList = getProductsUseCase.execute()
- emit(productList)
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/product/ProductViewModelFactory.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/product/ProductViewModelFactory.kt
deleted file mode 100644
index 89cdd464..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/product/ProductViewModelFactory.kt
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.product
-
-import androidx.lifecycle.ViewModel
-import androidx.lifecycle.ViewModelProvider
-import com.algokelvin.shoppingyuk.domain.usecase.GetProductsUseCase
-
-@Suppress("UNCHECKED_CAST")
-class ProductViewModelFactory(
- private val getProductsUseCase: GetProductsUseCase,
-): ViewModelProvider.Factory {
- override fun create(modelClass: Class): T {
- return ProductViewModel(getProductsUseCase) as T
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/productcategory/ProductCategoryFragment.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/productcategory/ProductCategoryFragment.kt
deleted file mode 100644
index 30a61714..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/productcategory/ProductCategoryFragment.kt
+++ /dev/null
@@ -1,83 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.productcategory
-
-import android.content.Intent
-import android.os.Bundle
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.widget.Toast
-import androidx.databinding.DataBindingUtil
-import androidx.fragment.app.Fragment
-import androidx.lifecycle.ViewModelProvider
-import androidx.recyclerview.widget.GridLayoutManager
-import com.algokelvin.shoppingyuk.R
-import com.algokelvin.shoppingyuk.data.model.product.Product
-import com.algokelvin.shoppingyuk.databinding.ActivityProductCategoryBinding
-import com.algokelvin.shoppingyuk.presentation.di.Injector
-import com.algokelvin.shoppingyuk.presentation.onclick.OnClickItemProduct
-import com.algokelvin.shoppingyuk.presentation.product.ProductAdapter
-import com.algokelvin.shoppingyuk.presentation.productdetail.ProductDetailActivity
-import javax.inject.Inject
-
-class ProductCategoryFragment : Fragment(), OnClickItemProduct {
- @Inject
- lateinit var factory: ProductCategoryViewModelFactory
-
- private lateinit var binding: ActivityProductCategoryBinding
- private lateinit var productCategoryViewModel: ProductCategoryViewModel
- private lateinit var adapter: ProductAdapter
-
- override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
- binding = DataBindingUtil.inflate(inflater, R.layout.activity_product_category, container, false)
-
- (activity?.application as Injector).createProductCategorySubComponent()
- .inject(this)
- productCategoryViewModel = ViewModelProvider(this, factory)[ProductCategoryViewModel::class]
-
- return binding.root
- }
-
- override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
- super.onViewCreated(view, savedInstanceState)
- initProductCategory()
- }
-
- /*override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- //binding = DataBindingUtil.setContentView(context, R.layout.activity_product_category)
-
- *//*(context as Injector).createProductCategorySubComponent()
- .inject(this)
- productCategoryViewModel = ViewModelProvider(this, factory)[ProductCategoryViewModel::class]*//*
-
- //initProductCategory()
- }*/
-
- private fun initProductCategory() {
- binding.productRecyclerView.layoutManager = GridLayoutManager(context, 2)
- adapter = ProductAdapter(this)
- binding.productRecyclerView.adapter = adapter
- displayProductsSortByCategory()
- }
-
- private fun displayProductsSortByCategory() {
- binding.productProgressBar.visibility = View.VISIBLE
- val responseLiveData = productCategoryViewModel.getProductsSortByCategory()
- responseLiveData.observe(viewLifecycleOwner) {
- if (it != null) {
- adapter.setList(it)
- adapter.notifyDataSetChanged()
- binding.productProgressBar.visibility = View.GONE
- }else{
- binding.productProgressBar.visibility = View.GONE
- Toast.makeText(context,"No data available", Toast.LENGTH_LONG).show()
- }
- }
- }
-
- override fun onClickItemProduct(product: Product) {
- val toProductDetailPage = Intent(context, ProductDetailActivity::class.java)
- toProductDetailPage.putExtra("PRODUCT_ID", product.id)
- startActivity(toProductDetailPage)
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/productcategory/ProductCategoryViewModel.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/productcategory/ProductCategoryViewModel.kt
deleted file mode 100644
index 86b85fbd..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/productcategory/ProductCategoryViewModel.kt
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.productcategory
-
-import androidx.lifecycle.ViewModel
-import androidx.lifecycle.liveData
-import com.algokelvin.shoppingyuk.domain.usecase.GetProductsCategoryUseCase
-
-class ProductCategoryViewModel(
- private val getProductsCategoryUseCase: GetProductsCategoryUseCase,
-): ViewModel() {
-
- fun getProductsSortByCategory() = liveData {
- val productsCategory = getProductsCategoryUseCase.execute()
- emit(productsCategory)
- }
-
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/productcategory/ProductCategoryViewModelFactory.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/productcategory/ProductCategoryViewModelFactory.kt
deleted file mode 100644
index 8aa81458..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/productcategory/ProductCategoryViewModelFactory.kt
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.productcategory
-
-import androidx.lifecycle.ViewModel
-import androidx.lifecycle.ViewModelProvider
-import com.algokelvin.shoppingyuk.domain.usecase.GetProductsCategoryUseCase
-
-@Suppress("UNCHECKED_CAST")
-class ProductCategoryViewModelFactory(
- private val getProductsCategoryUseCase: GetProductsCategoryUseCase,
-): ViewModelProvider.Factory {
- override fun create(modelClass: Class): T {
- return ProductCategoryViewModel(getProductsCategoryUseCase) as T
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/productdetail/ProductDetailActivity.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/productdetail/ProductDetailActivity.kt
deleted file mode 100644
index d84709d1..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/productdetail/ProductDetailActivity.kt
+++ /dev/null
@@ -1,72 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.productdetail
-
-import android.os.Bundle
-import android.widget.Toast
-import androidx.appcompat.app.AppCompatActivity
-import androidx.databinding.DataBindingUtil
-import androidx.lifecycle.ViewModelProvider
-import com.algokelvin.shoppingyuk.R
-import com.algokelvin.shoppingyuk.data.model.cart.CartDB
-import com.algokelvin.shoppingyuk.data.model.product.Product
-import com.algokelvin.shoppingyuk.databinding.ActivityProductDetailBinding
-import com.algokelvin.shoppingyuk.presentation.di.Injector
-import com.algokelvin.shoppingyuk.utils.EncryptLocal
-import com.bumptech.glide.Glide
-import javax.inject.Inject
-
-class ProductDetailActivity : AppCompatActivity() {
- @Inject
- lateinit var factory: ProductDetailViewModelFactory
-
- private lateinit var binding: ActivityProductDetailBinding
- private lateinit var productDetailViewModel: ProductDetailViewModel
-
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- binding = DataBindingUtil.setContentView(this, R.layout.activity_product_detail)
-
- (application as Injector).createProductDetailSubComponent()
- .inject(this)
- productDetailViewModel = ViewModelProvider(this, factory)[ProductDetailViewModel::class]
-
- initProductDetail()
- }
-
- private fun initProductDetail() {
- val id = intent.getIntExtra("PRODUCT_ID", 0)
- productDetailViewModel.getProductDetail(id.toString()).observe(this) {
- if (it != null) {
- val product = it
- Glide.with(binding.imageProduct.context)
- .load(product.image)
- .into(binding.imageProduct)
- binding.nameProduct.text = product.title
- binding.categoryProduct.text = product.category
- binding.priceProduct.text = getString(R.string.total_all_price, product.price.toString())
- binding.descriptionProduct.text = product.description
- addToCart(product)
- }
- }
- }
-
- private fun addToCart(product: Product) {
- binding.btnAddToCart.setOnClickListener {
- EncryptLocal.getIdProfile(this).let { profileId ->
- val cartDB = CartDB(
- userId = profileId,
- productId = product.id,
- productTitle = product.title,
- productImage = product.image,
- productPrice = product.price,
- count = 1
- )
- cartDB.let { data ->
- productDetailViewModel.addProductToCart(data).observe(this) {
- Toast.makeText(this, it, Toast.LENGTH_LONG).show()
- }
- }
- }
- }
- }
-
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/productdetail/ProductDetailViewModel.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/productdetail/ProductDetailViewModel.kt
deleted file mode 100644
index ffb2d2fa..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/productdetail/ProductDetailViewModel.kt
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.productdetail
-
-import androidx.lifecycle.ViewModel
-import androidx.lifecycle.liveData
-import com.algokelvin.shoppingyuk.data.model.cart.CartDB
-import com.algokelvin.shoppingyuk.domain.usecase.AddProductToCartUseCase
-import com.algokelvin.shoppingyuk.domain.usecase.GetProductDetailUseCase
-
-class ProductDetailViewModel(
- private val getProductDetailUseCase: GetProductDetailUseCase,
- private val addProductToCartUseCase: AddProductToCartUseCase,
-): ViewModel() {
-
- fun getProductDetail(id: String) = liveData {
- val productDetail = getProductDetailUseCase.execute(id)
- emit(productDetail)
- }
-
- fun addProductToCart(cartDB: CartDB) = liveData {
- val statusAddProductToCart = addProductToCartUseCase.execute(cartDB)
- emit(statusAddProductToCart)
- }
-
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/productdetail/ProductDetailViewModelFactory.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/productdetail/ProductDetailViewModelFactory.kt
deleted file mode 100644
index 8275e17c..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/productdetail/ProductDetailViewModelFactory.kt
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.algokelvin.shoppingyuk.presentation.productdetail
-
-import androidx.lifecycle.ViewModel
-import androidx.lifecycle.ViewModelProvider
-import com.algokelvin.shoppingyuk.domain.usecase.AddProductToCartUseCase
-import com.algokelvin.shoppingyuk.domain.usecase.GetProductDetailUseCase
-
-@Suppress("UNCHECKED_CAST")
-class ProductDetailViewModelFactory(
- private val getProductDetailUseCase: GetProductDetailUseCase,
- private val addProductToCartUseCase: AddProductToCartUseCase,
-): ViewModelProvider.Factory {
- override fun create(modelClass: Class): T {
- return ProductDetailViewModel(
- getProductDetailUseCase,
- addProductToCartUseCase,
- ) as T
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/profile/ProfileBottomSheetFragment.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/profile/ProfileBottomSheetFragment.kt
deleted file mode 100644
index 198f609f..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/presentation/profile/ProfileBottomSheetFragment.kt
+++ /dev/null
@@ -1,29 +0,0 @@
-// BottomSheetFragment.kt
-package com.algokelvin.shoppingyuk.presentation.profile
-
-import android.os.Bundle
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import androidx.databinding.DataBindingUtil
-import com.algokelvin.shoppingyuk.R
-import com.algokelvin.shoppingyuk.data.model.user.User
-import com.algokelvin.shoppingyuk.databinding.ProfilePageBottomSheetBinding
-import com.google.android.material.bottomsheet.BottomSheetDialogFragment
-
-class ProfileBottomSheetFragment(private val user: User) : BottomSheetDialogFragment() {
- private lateinit var binding: ProfilePageBottomSheetBinding
-
- override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
- binding = DataBindingUtil.inflate(inflater, R.layout.profile_page_bottom_sheet, container, false)
- return binding.root
- }
-
- override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
- super.onViewCreated(view, savedInstanceState)
- val name = user.name.firstName+" "+user.name.lastName
- binding.nameProfileUser.text = name
- binding.emailProfileUser.text = user.email
- binding.phoneProfileUser.text = user.phone
- }
-}
diff --git a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/utils/EncryptLocal.kt b/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/utils/EncryptLocal.kt
deleted file mode 100644
index 7b93ca09..00000000
--- a/ECommerce/app/src/main/java/com/algokelvin/shoppingyuk/utils/EncryptLocal.kt
+++ /dev/null
@@ -1,46 +0,0 @@
-package com.algokelvin.shoppingyuk.utils
-
-import android.content.Context
-import android.content.SharedPreferences
-import androidx.security.crypto.EncryptedSharedPreferences
-import androidx.security.crypto.MasterKeys
-
-object EncryptLocal {
- fun saveToken(context: Context, token: String) {
- val sharedPreferences = getEncryptedPrefs(context)
- with(sharedPreferences.edit()) {
- putString("user_token", token)
- apply()
- }
- }
-
- fun saveIdProfile(context: Context, id: Int) {
- val sharedPreferences = getEncryptedPrefs(context)
- with(sharedPreferences.edit()) {
- putInt("user_id", id)
- apply()
- }
- }
-
- fun getToken(context: Context): String? {
- val sharedPreferences = getEncryptedPrefs(context)
- return sharedPreferences.getString("user_token", null)
- }
-
- fun getIdProfile(context: Context): Int {
- val sharedPreferences = getEncryptedPrefs(context)
- return sharedPreferences.getInt("user_id", 0)
- }
-
- private fun getEncryptedPrefs(context: Context): SharedPreferences {
- val masterKeyAlias = MasterKeys.getOrCreate(MasterKeys.AES256_GCM_SPEC)
-
- return EncryptedSharedPreferences.create(
- "secure_prefs",
- masterKeyAlias,
- context,
- EncryptedSharedPreferences.PrefKeyEncryptionScheme.AES256_SIV,
- EncryptedSharedPreferences.PrefValueEncryptionScheme.AES256_GCM
- )
- }
-}
\ No newline at end of file
diff --git a/ECommerce/app/src/main/res/drawable/bg_item_product.xml b/ECommerce/app/src/main/res/drawable/bg_item_product.xml
deleted file mode 100644
index c80b19af..00000000
--- a/ECommerce/app/src/main/res/drawable/bg_item_product.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
- -
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ECommerce/app/src/main/res/drawable/ic_cart.xml b/ECommerce/app/src/main/res/drawable/ic_cart.xml
deleted file mode 100644
index 0fc77716..00000000
--- a/ECommerce/app/src/main/res/drawable/ic_cart.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
diff --git a/ECommerce/app/src/main/res/drawable/ic_category.xml b/ECommerce/app/src/main/res/drawable/ic_category.xml
deleted file mode 100644
index 792fc551..00000000
--- a/ECommerce/app/src/main/res/drawable/ic_category.xml
+++ /dev/null
@@ -1,210 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ECommerce/app/src/main/res/drawable/ic_decrease.xml b/ECommerce/app/src/main/res/drawable/ic_decrease.xml
deleted file mode 100644
index 7f3b4ddb..00000000
--- a/ECommerce/app/src/main/res/drawable/ic_decrease.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
diff --git a/ECommerce/app/src/main/res/drawable/ic_delete.xml b/ECommerce/app/src/main/res/drawable/ic_delete.xml
deleted file mode 100644
index d29a78a2..00000000
--- a/ECommerce/app/src/main/res/drawable/ic_delete.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
diff --git a/ECommerce/app/src/main/res/drawable/ic_dot_count.xml b/ECommerce/app/src/main/res/drawable/ic_dot_count.xml
deleted file mode 100644
index a9d5ca5e..00000000
--- a/ECommerce/app/src/main/res/drawable/ic_dot_count.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
diff --git a/ECommerce/app/src/main/res/drawable/ic_increase.xml b/ECommerce/app/src/main/res/drawable/ic_increase.xml
deleted file mode 100644
index dee8ffd3..00000000
--- a/ECommerce/app/src/main/res/drawable/ic_increase.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
diff --git a/ECommerce/app/src/main/res/drawable/ic_launcher_background.xml b/ECommerce/app/src/main/res/drawable/ic_launcher_background.xml
deleted file mode 100644
index 07d5da9c..00000000
--- a/ECommerce/app/src/main/res/drawable/ic_launcher_background.xml
+++ /dev/null
@@ -1,170 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ECommerce/app/src/main/res/drawable/ic_price.xml b/ECommerce/app/src/main/res/drawable/ic_price.xml
deleted file mode 100644
index 3848f19c..00000000
--- a/ECommerce/app/src/main/res/drawable/ic_price.xml
+++ /dev/null
@@ -1,1080 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ECommerce/app/src/main/res/drawable/ic_profile.xml b/ECommerce/app/src/main/res/drawable/ic_profile.xml
deleted file mode 100644
index 4645efda..00000000
--- a/ECommerce/app/src/main/res/drawable/ic_profile.xml
+++ /dev/null
@@ -1,195 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ECommerce/app/src/main/res/drawable/ic_rate.xml b/ECommerce/app/src/main/res/drawable/ic_rate.xml
deleted file mode 100644
index d7eba10c..00000000
--- a/ECommerce/app/src/main/res/drawable/ic_rate.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ECommerce/app/src/main/res/drawable/ic_sample_photo_user.xml b/ECommerce/app/src/main/res/drawable/ic_sample_photo_user.xml
deleted file mode 100644
index b0a426de..00000000
--- a/ECommerce/app/src/main/res/drawable/ic_sample_photo_user.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ECommerce/app/src/main/res/layout/activity_cart.xml b/ECommerce/app/src/main/res/layout/activity_cart.xml
deleted file mode 100644
index d970e114..00000000
--- a/ECommerce/app/src/main/res/layout/activity_cart.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ECommerce/app/src/main/res/layout/activity_checkout.xml b/ECommerce/app/src/main/res/layout/activity_checkout.xml
deleted file mode 100644
index 5780bb8e..00000000
--- a/ECommerce/app/src/main/res/layout/activity_checkout.xml
+++ /dev/null
@@ -1,106 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ECommerce/app/src/main/res/layout/activity_home2.xml b/ECommerce/app/src/main/res/layout/activity_home2.xml
deleted file mode 100644
index de1f51cb..00000000
--- a/ECommerce/app/src/main/res/layout/activity_home2.xml
+++ /dev/null
@@ -1,84 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ECommerce/app/src/main/res/layout/activity_login.xml b/ECommerce/app/src/main/res/layout/activity_login.xml
deleted file mode 100644
index 1805c32b..00000000
--- a/ECommerce/app/src/main/res/layout/activity_login.xml
+++ /dev/null
@@ -1,113 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ECommerce/app/src/main/res/layout/activity_product.xml b/ECommerce/app/src/main/res/layout/activity_product.xml
deleted file mode 100644
index a492aa67..00000000
--- a/ECommerce/app/src/main/res/layout/activity_product.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ECommerce/app/src/main/res/layout/activity_product_category.xml b/ECommerce/app/src/main/res/layout/activity_product_category.xml
deleted file mode 100644
index d9336d89..00000000
--- a/ECommerce/app/src/main/res/layout/activity_product_category.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ECommerce/app/src/main/res/layout/activity_product_detail.xml b/ECommerce/app/src/main/res/layout/activity_product_detail.xml
deleted file mode 100644
index 7ebbaca0..00000000
--- a/ECommerce/app/src/main/res/layout/activity_product_detail.xml
+++ /dev/null
@@ -1,177 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ECommerce/app/src/main/res/layout/item_cart_layout.xml b/ECommerce/app/src/main/res/layout/item_cart_layout.xml
deleted file mode 100644
index cfeab252..00000000
--- a/ECommerce/app/src/main/res/layout/item_cart_layout.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ECommerce/app/src/main/res/layout/item_product_layout.xml b/ECommerce/app/src/main/res/layout/item_product_layout.xml
deleted file mode 100644
index ee0e6679..00000000
--- a/ECommerce/app/src/main/res/layout/item_product_layout.xml
+++ /dev/null
@@ -1,150 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ECommerce/app/src/main/res/layout/item_shopping_layout.xml b/ECommerce/app/src/main/res/layout/item_shopping_layout.xml
deleted file mode 100644
index d4d67911..00000000
--- a/ECommerce/app/src/main/res/layout/item_shopping_layout.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ECommerce/app/src/main/res/layout/profile_page_bottom_sheet.xml b/ECommerce/app/src/main/res/layout/profile_page_bottom_sheet.xml
deleted file mode 100644
index bc7fe9a6..00000000
--- a/ECommerce/app/src/main/res/layout/profile_page_bottom_sheet.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ECommerce/app/src/main/res/mipmap-anydpi-v26/ic_shopping_yuk.xml b/ECommerce/app/src/main/res/mipmap-anydpi-v26/ic_shopping_yuk.xml
deleted file mode 100644
index 2aae6c52..00000000
--- a/ECommerce/app/src/main/res/mipmap-anydpi-v26/ic_shopping_yuk.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/ECommerce/app/src/main/res/mipmap-anydpi-v26/ic_shopping_yuk_round.xml b/ECommerce/app/src/main/res/mipmap-anydpi-v26/ic_shopping_yuk_round.xml
deleted file mode 100644
index 2aae6c52..00000000
--- a/ECommerce/app/src/main/res/mipmap-anydpi-v26/ic_shopping_yuk_round.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/ECommerce/app/src/main/res/mipmap-hdpi/ic_shopping_yuk.webp b/ECommerce/app/src/main/res/mipmap-hdpi/ic_shopping_yuk.webp
deleted file mode 100644
index f29a50c9..00000000
Binary files a/ECommerce/app/src/main/res/mipmap-hdpi/ic_shopping_yuk.webp and /dev/null differ
diff --git a/ECommerce/app/src/main/res/mipmap-hdpi/ic_shopping_yuk_foreground.webp b/ECommerce/app/src/main/res/mipmap-hdpi/ic_shopping_yuk_foreground.webp
deleted file mode 100644
index a44365ba..00000000
Binary files a/ECommerce/app/src/main/res/mipmap-hdpi/ic_shopping_yuk_foreground.webp and /dev/null differ
diff --git a/ECommerce/app/src/main/res/mipmap-hdpi/ic_shopping_yuk_round.webp b/ECommerce/app/src/main/res/mipmap-hdpi/ic_shopping_yuk_round.webp
deleted file mode 100644
index aaa68095..00000000
Binary files a/ECommerce/app/src/main/res/mipmap-hdpi/ic_shopping_yuk_round.webp and /dev/null differ
diff --git a/ECommerce/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/ECommerce/app/src/main/res/mipmap-mdpi/ic_launcher.webp
deleted file mode 100644
index 4f0f1d64..00000000
Binary files a/ECommerce/app/src/main/res/mipmap-mdpi/ic_launcher.webp and /dev/null differ
diff --git a/ECommerce/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/ECommerce/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
deleted file mode 100644
index 62b611da..00000000
Binary files a/ECommerce/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/ECommerce/app/src/main/res/mipmap-mdpi/ic_shopping_yuk.webp b/ECommerce/app/src/main/res/mipmap-mdpi/ic_shopping_yuk.webp
deleted file mode 100644
index 03a5125a..00000000
Binary files a/ECommerce/app/src/main/res/mipmap-mdpi/ic_shopping_yuk.webp and /dev/null differ
diff --git a/ECommerce/app/src/main/res/mipmap-mdpi/ic_shopping_yuk_foreground.webp b/ECommerce/app/src/main/res/mipmap-mdpi/ic_shopping_yuk_foreground.webp
deleted file mode 100644
index c95186a0..00000000
Binary files a/ECommerce/app/src/main/res/mipmap-mdpi/ic_shopping_yuk_foreground.webp and /dev/null differ
diff --git a/ECommerce/app/src/main/res/mipmap-mdpi/ic_shopping_yuk_round.webp b/ECommerce/app/src/main/res/mipmap-mdpi/ic_shopping_yuk_round.webp
deleted file mode 100644
index c0329340..00000000
Binary files a/ECommerce/app/src/main/res/mipmap-mdpi/ic_shopping_yuk_round.webp and /dev/null differ
diff --git a/ECommerce/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/ECommerce/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
deleted file mode 100644
index 948a3070..00000000
Binary files a/ECommerce/app/src/main/res/mipmap-xhdpi/ic_launcher.webp and /dev/null differ
diff --git a/ECommerce/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/ECommerce/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
deleted file mode 100644
index 1b9a6956..00000000
Binary files a/ECommerce/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/ECommerce/app/src/main/res/mipmap-xhdpi/ic_shopping_yuk.webp b/ECommerce/app/src/main/res/mipmap-xhdpi/ic_shopping_yuk.webp
deleted file mode 100644
index c4973c86..00000000
Binary files a/ECommerce/app/src/main/res/mipmap-xhdpi/ic_shopping_yuk.webp and /dev/null differ
diff --git a/ECommerce/app/src/main/res/mipmap-xhdpi/ic_shopping_yuk_foreground.webp b/ECommerce/app/src/main/res/mipmap-xhdpi/ic_shopping_yuk_foreground.webp
deleted file mode 100644
index 6c3fb295..00000000
Binary files a/ECommerce/app/src/main/res/mipmap-xhdpi/ic_shopping_yuk_foreground.webp and /dev/null differ
diff --git a/ECommerce/app/src/main/res/mipmap-xhdpi/ic_shopping_yuk_round.webp b/ECommerce/app/src/main/res/mipmap-xhdpi/ic_shopping_yuk_round.webp
deleted file mode 100644
index 59a24789..00000000
Binary files a/ECommerce/app/src/main/res/mipmap-xhdpi/ic_shopping_yuk_round.webp and /dev/null differ
diff --git a/ECommerce/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/ECommerce/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
deleted file mode 100644
index 28d4b77f..00000000
Binary files a/ECommerce/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp and /dev/null differ
diff --git a/ECommerce/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/ECommerce/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
deleted file mode 100644
index 9287f508..00000000
Binary files a/ECommerce/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/ECommerce/app/src/main/res/mipmap-xxhdpi/ic_shopping_yuk.webp b/ECommerce/app/src/main/res/mipmap-xxhdpi/ic_shopping_yuk.webp
deleted file mode 100644
index c58dea35..00000000
Binary files a/ECommerce/app/src/main/res/mipmap-xxhdpi/ic_shopping_yuk.webp and /dev/null differ
diff --git a/ECommerce/app/src/main/res/mipmap-xxhdpi/ic_shopping_yuk_foreground.webp b/ECommerce/app/src/main/res/mipmap-xxhdpi/ic_shopping_yuk_foreground.webp
deleted file mode 100644
index 7e7c3fa2..00000000
Binary files a/ECommerce/app/src/main/res/mipmap-xxhdpi/ic_shopping_yuk_foreground.webp and /dev/null differ
diff --git a/ECommerce/app/src/main/res/mipmap-xxhdpi/ic_shopping_yuk_round.webp b/ECommerce/app/src/main/res/mipmap-xxhdpi/ic_shopping_yuk_round.webp
deleted file mode 100644
index 7cd2664c..00000000
Binary files a/ECommerce/app/src/main/res/mipmap-xxhdpi/ic_shopping_yuk_round.webp and /dev/null differ
diff --git a/ECommerce/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/ECommerce/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
deleted file mode 100644
index aa7d6427..00000000
Binary files a/ECommerce/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp and /dev/null differ
diff --git a/ECommerce/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/ECommerce/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
deleted file mode 100644
index 9126ae37..00000000
Binary files a/ECommerce/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/ECommerce/app/src/main/res/mipmap-xxxhdpi/ic_shopping_yuk.webp b/ECommerce/app/src/main/res/mipmap-xxxhdpi/ic_shopping_yuk.webp
deleted file mode 100644
index 9a0f1a89..00000000
Binary files a/ECommerce/app/src/main/res/mipmap-xxxhdpi/ic_shopping_yuk.webp and /dev/null differ
diff --git a/ECommerce/app/src/main/res/mipmap-xxxhdpi/ic_shopping_yuk_foreground.webp b/ECommerce/app/src/main/res/mipmap-xxxhdpi/ic_shopping_yuk_foreground.webp
deleted file mode 100644
index 5f10af3b..00000000
Binary files a/ECommerce/app/src/main/res/mipmap-xxxhdpi/ic_shopping_yuk_foreground.webp and /dev/null differ
diff --git a/ECommerce/app/src/main/res/mipmap-xxxhdpi/ic_shopping_yuk_round.webp b/ECommerce/app/src/main/res/mipmap-xxxhdpi/ic_shopping_yuk_round.webp
deleted file mode 100644
index e16b5f37..00000000
Binary files a/ECommerce/app/src/main/res/mipmap-xxxhdpi/ic_shopping_yuk_round.webp and /dev/null differ
diff --git a/ECommerce/app/src/main/res/values-night/themes.xml b/ECommerce/app/src/main/res/values-night/themes.xml
deleted file mode 100644
index adb0b3e9..00000000
--- a/ECommerce/app/src/main/res/values-night/themes.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/ECommerce/app/src/main/res/values/colors.xml b/ECommerce/app/src/main/res/values/colors.xml
deleted file mode 100644
index bd3a6a1e..00000000
--- a/ECommerce/app/src/main/res/values/colors.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
- #FF000000
- #FFFFFFFF
- #4ea7ff
- #00ff00
-
\ No newline at end of file
diff --git a/ECommerce/app/src/main/res/values/strings.xml b/ECommerce/app/src/main/res/values/strings.xml
deleted file mode 100644
index d229f49e..00000000
--- a/ECommerce/app/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
- ShoppingYuk
-
- TODO
- Your Cart
- Checkout
- Your Cart is Empty
- Your Shopping
- Total
- $100.00
- Confirm
- Login
- Email
- Password
- Sign In
- Forgot Password?
- Detail Product
- Name Product
- Category Product
- Description Product
- Add to Cart
- Name Cart
- %s Sold
- Clothes
- Profile User
- $ %s
- Done
- %s Oty
- Price Product
-
\ No newline at end of file
diff --git a/ECommerce/app/src/main/res/values/themes.xml b/ECommerce/app/src/main/res/values/themes.xml
deleted file mode 100644
index 363f0946..00000000
--- a/ECommerce/app/src/main/res/values/themes.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ECommerce/app/src/test/java/com/algokelvin/shoppingyuk/ExampleUnitTest.kt b/ECommerce/app/src/test/java/com/algokelvin/shoppingyuk/ExampleUnitTest.kt
deleted file mode 100644
index d8c97606..00000000
--- a/ECommerce/app/src/test/java/com/algokelvin/shoppingyuk/ExampleUnitTest.kt
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.algokelvin.shoppingyuk
-
-import org.junit.Test
-
-import org.junit.Assert.*
-
-/**
- * Example local unit test, which will execute on the development machine (host).
- *
- * See [testing documentation](http://d.android.com/tools/testing).
- */
-class ExampleUnitTest {
- @Test
- fun addition_isCorrect() {
- assertEquals(4, 2 + 2)
- }
-}
\ No newline at end of file
diff --git a/ECommerce/build.gradle.kts b/ECommerce/build.gradle.kts
deleted file mode 100644
index f74b04bf..00000000
--- a/ECommerce/build.gradle.kts
+++ /dev/null
@@ -1,5 +0,0 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
-plugins {
- alias(libs.plugins.android.application) apply false
- alias(libs.plugins.jetbrains.kotlin.android) apply false
-}
\ No newline at end of file
diff --git a/ECommerce/gradle/libs.versions.toml b/ECommerce/gradle/libs.versions.toml
deleted file mode 100644
index ad0928b0..00000000
--- a/ECommerce/gradle/libs.versions.toml
+++ /dev/null
@@ -1,50 +0,0 @@
-[versions]
-agp = "8.5.0"
-dagger = "2.52"
-glide = "4.16.0"
-kotlin = "1.9.0"
-coreKtx = "1.13.1"
-junit = "4.13.2"
-junitVersion = "1.2.1"
-espressoCore = "3.6.1"
-appcompat = "1.7.0"
-kotlinxCoroutinesCore = "1.9.0"
-lifecycleViewmodelKtx = "2.8.6"
-loggingInterceptor = "4.7.2"
-material = "1.12.0"
-activity = "1.9.2"
-constraintlayout = "2.1.4"
-retrofit = "2.11.0"
-roomRuntime = "2.6.1"
-securityCrypto = "1.1.0-alpha06"
-
-[libraries]
-androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
-androidx-lifecycle-compiler = { module = "androidx.lifecycle:lifecycle-compiler", version.ref = "lifecycleViewmodelKtx" }
-androidx-lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "lifecycleViewmodelKtx" }
-androidx-lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycleViewmodelKtx" }
-androidx-lifecycle-viewmodel-savedstate = { module = "androidx.lifecycle:lifecycle-viewmodel-savedstate", version.ref = "lifecycleViewmodelKtx" }
-androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "roomRuntime" }
-androidx-room-ktx = { module = "androidx.room:room-ktx", version.ref = "roomRuntime" }
-androidx-room-runtime = { module = "androidx.room:room-runtime", version.ref = "roomRuntime" }
-androidx-security-crypto = { module = "androidx.security:security-crypto", version.ref = "securityCrypto" }
-converter-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "retrofit" }
-dagger = { module = "com.google.dagger:dagger", version.ref = "dagger" }
-dagger-compiler = { module = "com.google.dagger:dagger-compiler", version.ref = "dagger" }
-glide = { module = "com.github.bumptech.glide:glide", version.ref = "glide" }
-junit = { group = "junit", name = "junit", version.ref = "junit" }
-androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
-androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
-androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
-kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinxCoroutinesCore" }
-kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinxCoroutinesCore" }
-logging-interceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "loggingInterceptor" }
-material = { group = "com.google.android.material", name = "material", version.ref = "material" }
-androidx-activity = { group = "androidx.activity", name = "activity", version.ref = "activity" }
-androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
-retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" }
-
-[plugins]
-android-application = { id = "com.android.application", version.ref = "agp" }
-jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
-
diff --git a/ECommerce/gradle/wrapper/gradle-wrapper.properties b/ECommerce/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 0e5d54d7..00000000
--- a/ECommerce/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Fri Oct 11 09:58:09 WIB 2024
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
diff --git a/ECommerce/settings.gradle.kts b/ECommerce/settings.gradle.kts
deleted file mode 100644
index 31e0298a..00000000
--- a/ECommerce/settings.gradle.kts
+++ /dev/null
@@ -1,24 +0,0 @@
-pluginManagement {
- repositories {
- google {
- content {
- includeGroupByRegex("com\\.android.*")
- includeGroupByRegex("com\\.google.*")
- includeGroupByRegex("androidx.*")
- }
- }
- mavenCentral()
- gradlePluginPortal()
- }
-}
-dependencyResolutionManagement {
- repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
- repositories {
- google()
- mavenCentral()
- }
-}
-
-rootProject.name = "MovieApp"
-include(":app")
-
\ No newline at end of file
diff --git a/EnableDisableButton/README.md b/EnableDisableButton/README.md
deleted file mode 100644
index 96147412..00000000
--- a/EnableDisableButton/README.md
+++ /dev/null
@@ -1,38 +0,0 @@
-## Enable Disable Button
-
-|  |
-|:-------------------------------------------------:|
-| Gambar 1: Enable Disable Button |
-
-## Implementation
-- MVVM
-- View Binding
-
-## Environment
-- **Android Gradle**: 8.5.0
-- **Plugins Version**: 8.7
-- **Gradle Version**: 8.0
-- **Java JDK**: 17
-- **Kotlin Version**: 1.9.0
-- **Min SDK**: 21
-- **Target SDK**: 34
-
-## Contributors
-Thanks all contributors for build this repository
-
-```
-Copyright [2021] [The Dictionary of Android Projects]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-```
diff --git a/EnableDisableButton/app/build.gradle b/EnableDisableButton/app/build.gradle
deleted file mode 100644
index 355c6958..00000000
--- a/EnableDisableButton/app/build.gradle
+++ /dev/null
@@ -1,44 +0,0 @@
-plugins {
- id 'com.android.application'
- id 'kotlin-android'
-}
-
-android {
- compileSdkVersion 31
- buildToolsVersion "30.0.3"
-
- defaultConfig {
- applicationId "algokelvin.app.csenabledbtn"
- minSdkVersion 21
- targetSdkVersion 31
- 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
- }
- kotlinOptions {
- jvmTarget = '1.8'
- }
- viewBinding {
- enabled = true
- }
-}
-
-dependencies {
- implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
- implementation 'androidx.core:core-ktx:1.7.0'
- implementation 'androidx.appcompat:appcompat:1.4.1'
- implementation 'com.google.android.material:material:1.5.0'
- implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
-}
\ No newline at end of file
diff --git a/EnableDisableButton/app/src/main/AndroidManifest.xml b/EnableDisableButton/app/src/main/AndroidManifest.xml
deleted file mode 100644
index 2740cc38..00000000
--- a/EnableDisableButton/app/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/EnableDisableButton/app/src/main/res/drawable/ic_launcher_background.xml b/EnableDisableButton/app/src/main/res/drawable/ic_launcher_background.xml
deleted file mode 100644
index 07d5da9c..00000000
--- a/EnableDisableButton/app/src/main/res/drawable/ic_launcher_background.xml
+++ /dev/null
@@ -1,170 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/EnableDisableButton/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/EnableDisableButton/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
deleted file mode 100644
index eca70cfe..00000000
--- a/EnableDisableButton/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/EnableDisableButton/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/EnableDisableButton/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
deleted file mode 100644
index eca70cfe..00000000
--- a/EnableDisableButton/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/EnableDisableButton/app/src/main/res/mipmap-hdpi/ic_launcher.png b/EnableDisableButton/app/src/main/res/mipmap-hdpi/ic_launcher.png
deleted file mode 100644
index a571e600..00000000
Binary files a/EnableDisableButton/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ
diff --git a/EnableDisableButton/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/EnableDisableButton/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
deleted file mode 100644
index 61da551c..00000000
Binary files a/EnableDisableButton/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and /dev/null differ
diff --git a/EnableDisableButton/app/src/main/res/mipmap-mdpi/ic_launcher.png b/EnableDisableButton/app/src/main/res/mipmap-mdpi/ic_launcher.png
deleted file mode 100644
index c41dd285..00000000
Binary files a/EnableDisableButton/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ
diff --git a/EnableDisableButton/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/EnableDisableButton/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
deleted file mode 100644
index db5080a7..00000000
Binary files a/EnableDisableButton/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and /dev/null differ
diff --git a/EnableDisableButton/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/EnableDisableButton/app/src/main/res/mipmap-xhdpi/ic_launcher.png
deleted file mode 100644
index 6dba46da..00000000
Binary files a/EnableDisableButton/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ
diff --git a/EnableDisableButton/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/EnableDisableButton/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
deleted file mode 100644
index da31a871..00000000
Binary files a/EnableDisableButton/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/EnableDisableButton/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/EnableDisableButton/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
deleted file mode 100644
index 15ac6817..00000000
Binary files a/EnableDisableButton/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ
diff --git a/EnableDisableButton/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/EnableDisableButton/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
deleted file mode 100644
index b216f2d3..00000000
Binary files a/EnableDisableButton/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/EnableDisableButton/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/EnableDisableButton/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
deleted file mode 100644
index f25a4197..00000000
Binary files a/EnableDisableButton/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ
diff --git a/EnableDisableButton/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/EnableDisableButton/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
deleted file mode 100644
index e96783cc..00000000
Binary files a/EnableDisableButton/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/EnableDisableButton/app/src/main/res/values-night/themes.xml b/EnableDisableButton/app/src/main/res/values-night/themes.xml
deleted file mode 100644
index 86bb269e..00000000
--- a/EnableDisableButton/app/src/main/res/values-night/themes.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/EnableDisableButton/app/src/main/res/values/colors.xml b/EnableDisableButton/app/src/main/res/values/colors.xml
deleted file mode 100644
index e395d75c..00000000
--- a/EnableDisableButton/app/src/main/res/values/colors.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
- #FFBB86FC
- #FF6200EE
- #FF3700B3
- #FF03DAC5
- #FF018786
- #FF000000
- #FFFFFFFF
- #9B9B9B
-
\ No newline at end of file
diff --git a/EnableDisableButton/app/src/main/res/values/strings.xml b/EnableDisableButton/app/src/main/res/values/strings.xml
deleted file mode 100644
index 31f3ef21..00000000
--- a/EnableDisableButton/app/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- CsEnabledBtn
-
\ No newline at end of file
diff --git a/EnableDisableButton/app/src/main/res/values/themes.xml b/EnableDisableButton/app/src/main/res/values/themes.xml
deleted file mode 100644
index 20fd2310..00000000
--- a/EnableDisableButton/app/src/main/res/values/themes.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/EnableDisableButton/build.gradle b/EnableDisableButton/build.gradle
deleted file mode 100644
index cb349fb8..00000000
--- a/EnableDisableButton/build.gradle
+++ /dev/null
@@ -1,30 +0,0 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
-buildscript {
- ext {
- agp_version = '8.5.0'
- }
- ext.kotlin_version = "1.5.31"
- repositories {
- google()
- mavenCentral()
- }
- dependencies {
- classpath "com.android.tools.build:gradle:$agp_version"
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
-
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
- }
-}
-
-allprojects {
- repositories {
- google()
- mavenCentral()
- jcenter() // Warning: this repository is going to shut down soon
- }
-}
-
-task clean(type: Delete) {
- delete rootProject.buildDir
-}
\ No newline at end of file
diff --git a/EnableDisableButton/documentation/SS_EnableDisableButton.gif b/EnableDisableButton/documentation/SS_EnableDisableButton.gif
deleted file mode 100644
index 248b194c..00000000
Binary files a/EnableDisableButton/documentation/SS_EnableDisableButton.gif and /dev/null differ
diff --git a/EnableDisableButton/gradle.properties b/EnableDisableButton/gradle.properties
deleted file mode 100644
index 25217527..00000000
--- a/EnableDisableButton/gradle.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-# Project-wide Gradle settings.
-# IDE (e.g. Android Studio) users:
-# Gradle settings configured through the IDE *will override*
-# any settings specified in this file.
-# For more details on how to configure your build environment visit
-# http://www.gradle.org/docs/current/userguide/build_environment.html
-# Specifies the JVM arguments used for the daemon process.
-# The setting is particularly useful for tweaking memory settings.
-org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
-# When configured, Gradle will run in incubating parallel mode.
-# This option should only be used with decoupled projects. More details, visit
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
-# org.gradle.parallel=true
-# AndroidX package structure to make it clearer which packages are bundled with the
-# Android operating system, and which are packaged with your app"s APK
-# https://developer.android.com/topic/libraries/support-library/androidx-rn
-android.useAndroidX=true
-# Kotlin code style for this project: "official" or "obsolete":
-kotlin.code.style=official
\ No newline at end of file
diff --git a/EnableDisableButton/gradle/wrapper/gradle-wrapper.jar b/EnableDisableButton/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index f6b961fd..00000000
Binary files a/EnableDisableButton/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/EnableDisableButton/gradle/wrapper/gradle-wrapper.properties b/EnableDisableButton/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index cb7126d7..00000000
--- a/EnableDisableButton/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Sun Feb 23 16:23:59 WIB 2025
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
diff --git a/EnableDisableButton/gradlew b/EnableDisableButton/gradlew
deleted file mode 100644
index cccdd3d5..00000000
--- a/EnableDisableButton/gradlew
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/usr/bin/env sh
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn () {
- echo "$*"
-}
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=$((i+1))
- done
- case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=$(save "$@")
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-
-# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
-if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
- cd "$(dirname "$0")"
-fi
-
-exec "$JAVACMD" "$@"
diff --git a/EnableDisableButton/gradlew.bat b/EnableDisableButton/gradlew.bat
deleted file mode 100644
index f9553162..00000000
--- a/EnableDisableButton/gradlew.bat
+++ /dev/null
@@ -1,84 +0,0 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/EnableDisableButton/settings.gradle b/EnableDisableButton/settings.gradle
deleted file mode 100644
index 58ecf823..00000000
--- a/EnableDisableButton/settings.gradle
+++ /dev/null
@@ -1,2 +0,0 @@
-rootProject.name = "CsEnabledBtn"
-include ':app'
diff --git a/GalleryCompose/app/build.gradle b/GalleryCompose/app/build.gradle
deleted file mode 100644
index 486ed557..00000000
--- a/GalleryCompose/app/build.gradle
+++ /dev/null
@@ -1,66 +0,0 @@
-plugins {
- alias(libs.plugins.android.application)
- alias(libs.plugins.jetbrains.kotlin.android)
-}
-
-android {
- namespace 'com.algokelvin.gallery'
- compileSdk 34
-
- defaultConfig {
- applicationId "com.algokelvin.gallery"
- minSdk 24
- targetSdk 34
- versionCode 1
- versionName "1.0"
-
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- vectorDrawables {
- useSupportLibrary true
- }
- }
-
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- }
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- kotlinOptions {
- jvmTarget = '1.8'
- }
- buildFeatures {
- compose true
- }
- composeOptions {
- kotlinCompilerExtensionVersion '1.5.1'
- }
- packaging {
- resources {
- excludes += '/META-INF/{AL2.0,LGPL2.1}'
- }
- }
-}
-
-dependencies {
-
- implementation libs.androidx.core.ktx
- implementation libs.androidx.lifecycle.runtime.ktx
- implementation libs.androidx.activity.compose
- implementation platform(libs.androidx.compose.bom)
- implementation libs.androidx.ui
- implementation libs.androidx.ui.graphics
- implementation libs.androidx.ui.tooling.preview
- implementation libs.androidx.material3
- testImplementation libs.junit
- androidTestImplementation libs.androidx.junit
- androidTestImplementation libs.androidx.espresso.core
- androidTestImplementation platform(libs.androidx.compose.bom)
- androidTestImplementation libs.androidx.ui.test.junit4
- debugImplementation libs.androidx.ui.tooling
- debugImplementation libs.androidx.ui.test.manifest
-}
\ No newline at end of file
diff --git a/GalleryCompose/app/src/androidTest/java/com/algokelvin/gallery/ExampleInstrumentedTest.kt b/GalleryCompose/app/src/androidTest/java/com/algokelvin/gallery/ExampleInstrumentedTest.kt
deleted file mode 100644
index 06fd2bc3..00000000
--- a/GalleryCompose/app/src/androidTest/java/com/algokelvin/gallery/ExampleInstrumentedTest.kt
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.algokelvin.gallery
-
-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.algokelvin.gallery", appContext.packageName)
- }
-}
\ No newline at end of file
diff --git a/GalleryCompose/app/src/main/AndroidManifest.xml b/GalleryCompose/app/src/main/AndroidManifest.xml
deleted file mode 100644
index 564c066d..00000000
--- a/GalleryCompose/app/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/GalleryCompose/app/src/main/java/com/algokelvin/gallery/MainActivity.kt b/GalleryCompose/app/src/main/java/com/algokelvin/gallery/MainActivity.kt
deleted file mode 100644
index a1c7ad42..00000000
--- a/GalleryCompose/app/src/main/java/com/algokelvin/gallery/MainActivity.kt
+++ /dev/null
@@ -1,47 +0,0 @@
-package com.algokelvin.gallery
-
-import android.os.Bundle
-import androidx.activity.ComponentActivity
-import androidx.activity.compose.setContent
-import androidx.activity.enableEdgeToEdge
-import androidx.compose.foundation.layout.fillMaxSize
-import androidx.compose.foundation.layout.padding
-import androidx.compose.material3.Scaffold
-import androidx.compose.material3.Text
-import androidx.compose.runtime.Composable
-import androidx.compose.ui.Modifier
-import androidx.compose.ui.tooling.preview.Preview
-import com.algokelvin.gallery.ui.theme.GalleryTheme
-
-class MainActivity : ComponentActivity() {
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- enableEdgeToEdge()
- setContent {
- GalleryTheme {
- Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding ->
- Greeting(
- name = "Android",
- modifier = Modifier.padding(innerPadding)
- )
- }
- }
- }
- }
-}
-
-@Composable
-fun Greeting(name: String, modifier: Modifier = Modifier) {
- Text(
- text = "Hello $name!",
- modifier = modifier
- )
-}
-
-@Preview(showBackground = true)
-@Composable
-fun GreetingPreview() {
- GalleryTheme {
- Greeting("Android")
- }
-}
\ No newline at end of file
diff --git a/GalleryCompose/app/src/main/java/com/algokelvin/gallery/ui/theme/Color.kt b/GalleryCompose/app/src/main/java/com/algokelvin/gallery/ui/theme/Color.kt
deleted file mode 100644
index 5bba171f..00000000
--- a/GalleryCompose/app/src/main/java/com/algokelvin/gallery/ui/theme/Color.kt
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.algokelvin.gallery.ui.theme
-
-import androidx.compose.ui.graphics.Color
-
-val Purple80 = Color(0xFFD0BCFF)
-val PurpleGrey80 = Color(0xFFCCC2DC)
-val Pink80 = Color(0xFFEFB8C8)
-
-val Purple40 = Color(0xFF6650a4)
-val PurpleGrey40 = Color(0xFF625b71)
-val Pink40 = Color(0xFF7D5260)
\ No newline at end of file
diff --git a/GalleryCompose/app/src/main/java/com/algokelvin/gallery/ui/theme/Theme.kt b/GalleryCompose/app/src/main/java/com/algokelvin/gallery/ui/theme/Theme.kt
deleted file mode 100644
index e699461e..00000000
--- a/GalleryCompose/app/src/main/java/com/algokelvin/gallery/ui/theme/Theme.kt
+++ /dev/null
@@ -1,58 +0,0 @@
-package com.algokelvin.gallery.ui.theme
-
-import android.app.Activity
-import android.os.Build
-import androidx.compose.foundation.isSystemInDarkTheme
-import androidx.compose.material3.MaterialTheme
-import androidx.compose.material3.darkColorScheme
-import androidx.compose.material3.dynamicDarkColorScheme
-import androidx.compose.material3.dynamicLightColorScheme
-import androidx.compose.material3.lightColorScheme
-import androidx.compose.runtime.Composable
-import androidx.compose.ui.platform.LocalContext
-
-private val DarkColorScheme = darkColorScheme(
- primary = Purple80,
- secondary = PurpleGrey80,
- tertiary = Pink80
-)
-
-private val LightColorScheme = lightColorScheme(
- primary = Purple40,
- secondary = PurpleGrey40,
- tertiary = Pink40
-
- /* Other default colors to override
- background = Color(0xFFFFFBFE),
- surface = Color(0xFFFFFBFE),
- onPrimary = Color.White,
- onSecondary = Color.White,
- onTertiary = Color.White,
- onBackground = Color(0xFF1C1B1F),
- onSurface = Color(0xFF1C1B1F),
- */
-)
-
-@Composable
-fun GalleryTheme(
- darkTheme: Boolean = isSystemInDarkTheme(),
- // Dynamic color is available on Android 12+
- dynamicColor: Boolean = true,
- content: @Composable () -> Unit
-) {
- val colorScheme = when {
- dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
- val context = LocalContext.current
- if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)
- }
-
- darkTheme -> DarkColorScheme
- else -> LightColorScheme
- }
-
- MaterialTheme(
- colorScheme = colorScheme,
- typography = Typography,
- content = content
- )
-}
\ No newline at end of file
diff --git a/GalleryCompose/app/src/main/java/com/algokelvin/gallery/ui/theme/Type.kt b/GalleryCompose/app/src/main/java/com/algokelvin/gallery/ui/theme/Type.kt
deleted file mode 100644
index efd99d40..00000000
--- a/GalleryCompose/app/src/main/java/com/algokelvin/gallery/ui/theme/Type.kt
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.algokelvin.gallery.ui.theme
-
-import androidx.compose.material3.Typography
-import androidx.compose.ui.text.TextStyle
-import androidx.compose.ui.text.font.FontFamily
-import androidx.compose.ui.text.font.FontWeight
-import androidx.compose.ui.unit.sp
-
-// Set of Material typography styles to start with
-val Typography = Typography(
- bodyLarge = TextStyle(
- fontFamily = FontFamily.Default,
- fontWeight = FontWeight.Normal,
- fontSize = 16.sp,
- lineHeight = 24.sp,
- letterSpacing = 0.5.sp
- )
- /* Other default text styles to override
- titleLarge = TextStyle(
- fontFamily = FontFamily.Default,
- fontWeight = FontWeight.Normal,
- fontSize = 22.sp,
- lineHeight = 28.sp,
- letterSpacing = 0.sp
- ),
- labelSmall = TextStyle(
- fontFamily = FontFamily.Default,
- fontWeight = FontWeight.Medium,
- fontSize = 11.sp,
- lineHeight = 16.sp,
- letterSpacing = 0.5.sp
- )
- */
-)
\ No newline at end of file
diff --git a/GalleryCompose/app/src/main/res/drawable/ic_launcher_background.xml b/GalleryCompose/app/src/main/res/drawable/ic_launcher_background.xml
deleted file mode 100644
index 07d5da9c..00000000
--- a/GalleryCompose/app/src/main/res/drawable/ic_launcher_background.xml
+++ /dev/null
@@ -1,170 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/GalleryCompose/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/GalleryCompose/app/src/main/res/mipmap-hdpi/ic_launcher.webp
deleted file mode 100644
index c209e78e..00000000
Binary files a/GalleryCompose/app/src/main/res/mipmap-hdpi/ic_launcher.webp and /dev/null differ
diff --git a/GalleryCompose/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/GalleryCompose/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
deleted file mode 100644
index b2dfe3d1..00000000
Binary files a/GalleryCompose/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/GalleryCompose/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/GalleryCompose/app/src/main/res/mipmap-mdpi/ic_launcher.webp
deleted file mode 100644
index 4f0f1d64..00000000
Binary files a/GalleryCompose/app/src/main/res/mipmap-mdpi/ic_launcher.webp and /dev/null differ
diff --git a/GalleryCompose/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/GalleryCompose/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
deleted file mode 100644
index 62b611da..00000000
Binary files a/GalleryCompose/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/GalleryCompose/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/GalleryCompose/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
deleted file mode 100644
index 948a3070..00000000
Binary files a/GalleryCompose/app/src/main/res/mipmap-xhdpi/ic_launcher.webp and /dev/null differ
diff --git a/GalleryCompose/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/GalleryCompose/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
deleted file mode 100644
index 1b9a6956..00000000
Binary files a/GalleryCompose/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/GalleryCompose/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/GalleryCompose/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
deleted file mode 100644
index 28d4b77f..00000000
Binary files a/GalleryCompose/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp and /dev/null differ
diff --git a/GalleryCompose/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/GalleryCompose/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
deleted file mode 100644
index 9287f508..00000000
Binary files a/GalleryCompose/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/GalleryCompose/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/GalleryCompose/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
deleted file mode 100644
index aa7d6427..00000000
Binary files a/GalleryCompose/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp and /dev/null differ
diff --git a/GalleryCompose/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/GalleryCompose/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
deleted file mode 100644
index 9126ae37..00000000
Binary files a/GalleryCompose/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/GalleryCompose/app/src/main/res/values/colors.xml b/GalleryCompose/app/src/main/res/values/colors.xml
deleted file mode 100644
index f8c6127d..00000000
--- a/GalleryCompose/app/src/main/res/values/colors.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
- #FFBB86FC
- #FF6200EE
- #FF3700B3
- #FF03DAC5
- #FF018786
- #FF000000
- #FFFFFFFF
-
\ No newline at end of file
diff --git a/GalleryCompose/app/src/main/res/values/strings.xml b/GalleryCompose/app/src/main/res/values/strings.xml
deleted file mode 100644
index b54d8bcd..00000000
--- a/GalleryCompose/app/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- Gallery
-
\ No newline at end of file
diff --git a/GalleryCompose/app/src/main/res/values/themes.xml b/GalleryCompose/app/src/main/res/values/themes.xml
deleted file mode 100644
index 2eb7c60d..00000000
--- a/GalleryCompose/app/src/main/res/values/themes.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/GalleryCompose/app/src/main/res/xml/backup_rules.xml b/GalleryCompose/app/src/main/res/xml/backup_rules.xml
deleted file mode 100644
index fa0f996d..00000000
--- a/GalleryCompose/app/src/main/res/xml/backup_rules.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/GalleryCompose/app/src/test/java/com/algokelvin/gallery/ExampleUnitTest.kt b/GalleryCompose/app/src/test/java/com/algokelvin/gallery/ExampleUnitTest.kt
deleted file mode 100644
index 813abdbb..00000000
--- a/GalleryCompose/app/src/test/java/com/algokelvin/gallery/ExampleUnitTest.kt
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.algokelvin.gallery
-
-import org.junit.Test
-
-import org.junit.Assert.*
-
-/**
- * Example local unit test, which will execute on the development machine (host).
- *
- * See [testing documentation](http://d.android.com/tools/testing).
- */
-class ExampleUnitTest {
- @Test
- fun addition_isCorrect() {
- assertEquals(4, 2 + 2)
- }
-}
\ No newline at end of file
diff --git a/GalleryCompose/gradle/libs.versions.toml b/GalleryCompose/gradle/libs.versions.toml
deleted file mode 100644
index eae502b2..00000000
--- a/GalleryCompose/gradle/libs.versions.toml
+++ /dev/null
@@ -1,31 +0,0 @@
-[versions]
-agp = "8.5.0"
-kotlin = "1.9.0"
-coreKtx = "1.15.0"
-junit = "4.13.2"
-junitVersion = "1.2.1"
-espressoCore = "3.6.1"
-lifecycleRuntimeKtx = "2.8.7"
-activityCompose = "1.10.1"
-composeBom = "2024.04.01"
-
-[libraries]
-androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
-junit = { group = "junit", name = "junit", version.ref = "junit" }
-androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
-androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
-androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" }
-androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" }
-androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" }
-androidx-ui = { group = "androidx.compose.ui", name = "ui" }
-androidx-ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" }
-androidx-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
-androidx-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" }
-androidx-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" }
-androidx-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }
-androidx-material3 = { group = "androidx.compose.material3", name = "material3" }
-
-[plugins]
-android-application = { id = "com.android.application", version.ref = "agp" }
-jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
-
diff --git a/GalleryCompose/gradle/wrapper/gradle-wrapper.properties b/GalleryCompose/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index cceff20f..00000000
--- a/GalleryCompose/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Mon Mar 17 22:19:57 WIB 2025
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
diff --git a/GalleryCompose/settings.gradle b/GalleryCompose/settings.gradle
deleted file mode 100644
index d55ae6e5..00000000
--- a/GalleryCompose/settings.gradle
+++ /dev/null
@@ -1,23 +0,0 @@
-pluginManagement {
- repositories {
- google {
- content {
- includeGroupByRegex("com\\.android.*")
- includeGroupByRegex("com\\.google.*")
- includeGroupByRegex("androidx.*")
- }
- }
- mavenCentral()
- gradlePluginPortal()
- }
-}
-dependencyResolutionManagement {
- repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
- repositories {
- google()
- mavenCentral()
- }
-}
-
-rootProject.name = "Gallery"
-include ':app'
diff --git a/GenerateQR/app/build.gradle b/GenerateQR/app/build.gradle
deleted file mode 100644
index fd059c0b..00000000
--- a/GenerateQR/app/build.gradle
+++ /dev/null
@@ -1,46 +0,0 @@
-plugins {
- id 'com.android.application'
-}
-apply plugin: 'kotlin-android' // Add this for active Kotlin
-
-android {
- compileSdkVersion 30
- buildToolsVersion "30.0.3"
-
- defaultConfig {
- applicationId "com.algokelvin.generate.qr"
- minSdkVersion 16
- 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.3.0'
- implementation 'com.google.android.material:material:1.3.0'
- implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
- implementation "androidx.core:core-ktx:+"
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
-
- implementation 'com.google.zxing:core:3.3.3'
- implementation 'com.journeyapps:zxing-android-embedded:3.6.0@aar'
-}
-// Add mavenCentral to implement Kotlin Environment
-repositories {
- mavenCentral()
-}
\ No newline at end of file
diff --git a/GenerateQR/app/src/main/AndroidManifest.xml b/GenerateQR/app/src/main/AndroidManifest.xml
deleted file mode 100644
index a59ccaf2..00000000
--- a/GenerateQR/app/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/GenerateQR/app/src/main/java/com/algokelvin/generate/qr/GenerateQRJava.java b/GenerateQR/app/src/main/java/com/algokelvin/generate/qr/GenerateQRJava.java
deleted file mode 100644
index 5904dfaf..00000000
--- a/GenerateQR/app/src/main/java/com/algokelvin/generate/qr/GenerateQRJava.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.algokelvin.generate.qr;
-
-import android.graphics.Bitmap;
-import android.widget.ImageView;
-
-import com.google.zxing.BarcodeFormat;
-import com.google.zxing.EncodeHintType;
-import com.google.zxing.MultiFormatWriter;
-import com.google.zxing.WriterException;
-import com.google.zxing.common.BitMatrix;
-import com.journeyapps.barcodescanner.BarcodeEncoder;
-
-import java.util.Map;
-
-import kotlin.TuplesKt;
-import kotlin.collections.MapsKt;
-
-public class GenerateQRJava {
- public static void createBarcode(ImageView img_barcode, MultiFormatWriter multiFormatWriter, String data) throws WriterException {
- Map hintMap = MapsKt.mapOf(TuplesKt.to(EncodeHintType.MARGIN, 0));
- BitMatrix bitMatrix = multiFormatWriter.encode(data, BarcodeFormat.QR_CODE, 400, 400, hintMap);
- BarcodeEncoder barcodeEncoder = new BarcodeEncoder();
- Bitmap bitmap = barcodeEncoder.createBitmap(bitMatrix);
- img_barcode.setImageBitmap(bitmap);
- }
-}
diff --git a/GenerateQR/app/src/main/java/com/algokelvin/generate/qr/GenerateQRKotlin.kt b/GenerateQR/app/src/main/java/com/algokelvin/generate/qr/GenerateQRKotlin.kt
deleted file mode 100644
index 2ed1ec3d..00000000
--- a/GenerateQR/app/src/main/java/com/algokelvin/generate/qr/GenerateQRKotlin.kt
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.algokelvin.generate.qr
-
-import android.widget.ImageView
-import com.google.zxing.BarcodeFormat
-import com.google.zxing.EncodeHintType
-import com.google.zxing.MultiFormatWriter
-import com.journeyapps.barcodescanner.BarcodeEncoder
-
-class GenerateQRKotlin {
- companion object {
- @kotlin.jvm.JvmStatic
- fun createBarcode(img_barcode: ImageView, multiFormatWriter: MultiFormatWriter, data: String) {
- val hintMap = mapOf(EncodeHintType.MARGIN to 0) // style remove white space
- val bitMatrix = multiFormatWriter.encode(data, BarcodeFormat.QR_CODE, 400, 400, hintMap)
- val barcodeEncoder = BarcodeEncoder()
- val bitmap = barcodeEncoder.createBitmap(bitMatrix)
-
- img_barcode.setImageBitmap(bitmap)
- }
- }
-}
\ No newline at end of file
diff --git a/GenerateQR/app/src/main/java/com/algokelvin/generate/qr/MainActivity.java b/GenerateQR/app/src/main/java/com/algokelvin/generate/qr/MainActivity.java
deleted file mode 100644
index a10ebb1d..00000000
--- a/GenerateQR/app/src/main/java/com/algokelvin/generate/qr/MainActivity.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package com.algokelvin.generate.qr;
-
-import androidx.appcompat.app.AppCompatActivity;
-
-import android.os.Bundle;
-import android.widget.ImageView;
-
-import com.google.zxing.MultiFormatWriter;
-import com.google.zxing.WriterException;
-
-public class MainActivity extends AppCompatActivity {
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
-
- ImageView imgBarcode = findViewById(R.id.img_barcode);
- String bitmap = "dnjwdniwncinvinvuerhuruheuhdwudnwndwncjnjvcnejcnjencjendejndjewndjendejndje";
-
- MultiFormatWriter multiFormatWriter = new MultiFormatWriter();
- // GenerateQRKotlin.createBarcode(imgBarcode, multiFormatWriter, bitmap); - Kotlin
-
- try {
- GenerateQRJava.createBarcode(imgBarcode, multiFormatWriter, bitmap); // -> Java
- } catch (WriterException e) {
- e.printStackTrace();
- }
- }
-}
\ No newline at end of file
diff --git a/GenerateQR/app/src/main/res/drawable/ic_launcher_background.xml b/GenerateQR/app/src/main/res/drawable/ic_launcher_background.xml
deleted file mode 100644
index 07d5da9c..00000000
--- a/GenerateQR/app/src/main/res/drawable/ic_launcher_background.xml
+++ /dev/null
@@ -1,170 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/GenerateQR/app/src/main/res/drawable/ic_sample_qr.xml b/GenerateQR/app/src/main/res/drawable/ic_sample_qr.xml
deleted file mode 100644
index 1b6aa8fb..00000000
--- a/GenerateQR/app/src/main/res/drawable/ic_sample_qr.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
diff --git a/GenerateQR/app/src/main/res/layout/activity_main.xml b/GenerateQR/app/src/main/res/layout/activity_main.xml
deleted file mode 100644
index 09ed2202..00000000
--- a/GenerateQR/app/src/main/res/layout/activity_main.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/GenerateQR/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/GenerateQR/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
deleted file mode 100644
index eca70cfe..00000000
--- a/GenerateQR/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/GenerateQR/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/GenerateQR/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
deleted file mode 100644
index eca70cfe..00000000
--- a/GenerateQR/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/GenerateQR/app/src/main/res/mipmap-hdpi/ic_launcher.png b/GenerateQR/app/src/main/res/mipmap-hdpi/ic_launcher.png
deleted file mode 100644
index a571e600..00000000
Binary files a/GenerateQR/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ
diff --git a/GenerateQR/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/GenerateQR/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
deleted file mode 100644
index 61da551c..00000000
Binary files a/GenerateQR/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and /dev/null differ
diff --git a/GenerateQR/app/src/main/res/mipmap-mdpi/ic_launcher.png b/GenerateQR/app/src/main/res/mipmap-mdpi/ic_launcher.png
deleted file mode 100644
index c41dd285..00000000
Binary files a/GenerateQR/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ
diff --git a/GenerateQR/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/GenerateQR/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
deleted file mode 100644
index db5080a7..00000000
Binary files a/GenerateQR/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and /dev/null differ
diff --git a/GenerateQR/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/GenerateQR/app/src/main/res/mipmap-xhdpi/ic_launcher.png
deleted file mode 100644
index 6dba46da..00000000
Binary files a/GenerateQR/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ
diff --git a/GenerateQR/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/GenerateQR/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
deleted file mode 100644
index da31a871..00000000
Binary files a/GenerateQR/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/GenerateQR/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/GenerateQR/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
deleted file mode 100644
index 15ac6817..00000000
Binary files a/GenerateQR/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ
diff --git a/GenerateQR/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/GenerateQR/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
deleted file mode 100644
index b216f2d3..00000000
Binary files a/GenerateQR/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/GenerateQR/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/GenerateQR/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
deleted file mode 100644
index f25a4197..00000000
Binary files a/GenerateQR/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ
diff --git a/GenerateQR/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/GenerateQR/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
deleted file mode 100644
index e96783cc..00000000
Binary files a/GenerateQR/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/GenerateQR/app/src/main/res/values-night/themes.xml b/GenerateQR/app/src/main/res/values-night/themes.xml
deleted file mode 100644
index 34bdee0c..00000000
--- a/GenerateQR/app/src/main/res/values-night/themes.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/GenerateQR/app/src/main/res/values/colors.xml b/GenerateQR/app/src/main/res/values/colors.xml
deleted file mode 100644
index f8c6127d..00000000
--- a/GenerateQR/app/src/main/res/values/colors.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
- #FFBB86FC
- #FF6200EE
- #FF3700B3
- #FF03DAC5
- #FF018786
- #FF000000
- #FFFFFFFF
-
\ No newline at end of file
diff --git a/GenerateQR/app/src/main/res/values/strings.xml b/GenerateQR/app/src/main/res/values/strings.xml
deleted file mode 100644
index 10be343c..00000000
--- a/GenerateQR/app/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- GenerateQR
-
\ No newline at end of file
diff --git a/GenerateQR/app/src/main/res/values/themes.xml b/GenerateQR/app/src/main/res/values/themes.xml
deleted file mode 100644
index 6cc497f2..00000000
--- a/GenerateQR/app/src/main/res/values/themes.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/GenerateQR/build.gradle b/GenerateQR/build.gradle
deleted file mode 100644
index 2aa0dfa4..00000000
--- a/GenerateQR/build.gradle
+++ /dev/null
@@ -1,27 +0,0 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
-buildscript {
- ext.kotlin_version = '1.5.0'
- repositories {
- google()
- mavenCentral()
- }
- dependencies {
- classpath "com.android.tools.build:gradle:4.2.0"
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
-
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
- }
-}
-
-allprojects {
- repositories {
- google()
- mavenCentral()
- jcenter() // Warning: this repository is going to shut down soon
- }
-}
-
-task clean(type: Delete) {
- delete rootProject.buildDir
-}
\ No newline at end of file
diff --git a/GenerateQR/gradle.properties b/GenerateQR/gradle.properties
deleted file mode 100644
index 6826e61b..00000000
--- a/GenerateQR/gradle.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-# Project-wide Gradle settings.
-# IDE (e.g. Android Studio) users:
-# Gradle settings configured through the IDE *will override*
-# any settings specified in this file.
-# For more details on how to configure your build environment visit
-# http://www.gradle.org/docs/current/userguide/build_environment.html
-# Specifies the JVM arguments used for the daemon process.
-# The setting is particularly useful for tweaking memory settings.
-org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
-# When configured, Gradle will run in incubating parallel mode.
-# This option should only be used with decoupled projects. More details, visit
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
-# org.gradle.parallel=true
-# AndroidX package structure to make it clearer which packages are bundled with the
-# Android operating system, and which are packaged with your app"s APK
-# https://developer.android.com/topic/libraries/support-library/androidx-rn
-android.useAndroidX=true
\ No newline at end of file
diff --git a/GenerateQR/gradle/wrapper/gradle-wrapper.jar b/GenerateQR/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index f6b961fd..00000000
Binary files a/GenerateQR/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/GenerateQR/gradle/wrapper/gradle-wrapper.properties b/GenerateQR/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index cad4890d..00000000
--- a/GenerateQR/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Mon May 24 11:55:38 WIB 2021
-distributionBase=GRADLE_USER_HOME
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
-distributionPath=wrapper/dists
-zipStorePath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
diff --git a/GenerateQR/gradlew b/GenerateQR/gradlew
deleted file mode 100644
index cccdd3d5..00000000
--- a/GenerateQR/gradlew
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/usr/bin/env sh
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn () {
- echo "$*"
-}
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=$((i+1))
- done
- case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=$(save "$@")
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-
-# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
-if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
- cd "$(dirname "$0")"
-fi
-
-exec "$JAVACMD" "$@"
diff --git a/GenerateQR/gradlew.bat b/GenerateQR/gradlew.bat
deleted file mode 100644
index f9553162..00000000
--- a/GenerateQR/gradlew.bat
+++ /dev/null
@@ -1,84 +0,0 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/GenerateQR/settings.gradle b/GenerateQR/settings.gradle
deleted file mode 100644
index 7754a4fc..00000000
--- a/GenerateQR/settings.gradle
+++ /dev/null
@@ -1,2 +0,0 @@
-rootProject.name = "GenerateQR"
-include ':app'
diff --git a/CalculatorCompose/.gitignore b/HealthConnectNative/.gitignore
similarity index 100%
rename from CalculatorCompose/.gitignore
rename to HealthConnectNative/.gitignore
diff --git a/HealthConnectNative/.idea/.gitignore b/HealthConnectNative/.idea/.gitignore
new file mode 100644
index 00000000..26d33521
--- /dev/null
+++ b/HealthConnectNative/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/HealthConnectNative/.idea/AndroidProjectSystem.xml b/HealthConnectNative/.idea/AndroidProjectSystem.xml
new file mode 100644
index 00000000..4a53bee8
--- /dev/null
+++ b/HealthConnectNative/.idea/AndroidProjectSystem.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HealthConnectNative/.idea/compiler.xml b/HealthConnectNative/.idea/compiler.xml
new file mode 100644
index 00000000..b86273d9
--- /dev/null
+++ b/HealthConnectNative/.idea/compiler.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HealthConnectNative/.idea/deploymentTargetSelector.xml b/HealthConnectNative/.idea/deploymentTargetSelector.xml
new file mode 100644
index 00000000..b268ef36
--- /dev/null
+++ b/HealthConnectNative/.idea/deploymentTargetSelector.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HealthConnectNative/.idea/gradle.xml b/HealthConnectNative/.idea/gradle.xml
new file mode 100644
index 00000000..639c779c
--- /dev/null
+++ b/HealthConnectNative/.idea/gradle.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HealthConnectNative/.idea/material_theme_project_new.xml b/HealthConnectNative/.idea/material_theme_project_new.xml
new file mode 100644
index 00000000..da98edc7
--- /dev/null
+++ b/HealthConnectNative/.idea/material_theme_project_new.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HealthConnectNative/.idea/migrations.xml b/HealthConnectNative/.idea/migrations.xml
new file mode 100644
index 00000000..f8051a6f
--- /dev/null
+++ b/HealthConnectNative/.idea/migrations.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HealthConnectNative/.idea/misc.xml b/HealthConnectNative/.idea/misc.xml
new file mode 100644
index 00000000..74dd639e
--- /dev/null
+++ b/HealthConnectNative/.idea/misc.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HealthConnectNative/.idea/runConfigurations.xml b/HealthConnectNative/.idea/runConfigurations.xml
new file mode 100644
index 00000000..16660f1d
--- /dev/null
+++ b/HealthConnectNative/.idea/runConfigurations.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/BirthdayCardCompose/app/.gitignore b/HealthConnectNative/app/.gitignore
similarity index 100%
rename from BirthdayCardCompose/app/.gitignore
rename to HealthConnectNative/app/.gitignore
diff --git a/HealthConnectNative/app/build.gradle b/HealthConnectNative/app/build.gradle
new file mode 100644
index 00000000..76d2c817
--- /dev/null
+++ b/HealthConnectNative/app/build.gradle
@@ -0,0 +1,56 @@
+plugins {
+ alias(libs.plugins.android.application)
+}
+
+android {
+ namespace 'com.algokelvin.healthconnectnative'
+ compileSdk 36
+
+ defaultConfig {
+ applicationId "com.algokelvin.healthconnectnative"
+ minSdk 26
+ targetSdk 36
+ 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_11
+ targetCompatibility JavaVersion.VERSION_11
+ }
+}
+
+dependencies {
+ implementation libs.appcompat
+ implementation libs.material
+ implementation libs.activity
+ implementation libs.constraintlayout
+
+ // Add a dependency of Health Connect SDK
+ implementation "androidx.health.connect:connect-client:1.1.0-alpha12"
+
+ implementation 'com.squareup.okhttp3:okhttp:4.12.0'
+ implementation 'com.google.code.gson:gson:2.10.1'
+
+ // Retrofit
+ implementation 'com.squareup.retrofit2:retrofit:2.9.0'
+ implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
+
+ // Work Manager
+ implementation 'androidx.work:work-runtime-ktx:2.9.1'
+
+ // Kotlin Reflect
+ implementation "org.jetbrains.kotlin:kotlin-reflect:1.9.0"
+
+ testImplementation libs.junit
+ androidTestImplementation libs.ext.junit
+ androidTestImplementation libs.espresso.core
+}
\ No newline at end of file
diff --git a/BirthdayCardCompose/app/proguard-rules.pro b/HealthConnectNative/app/proguard-rules.pro
similarity index 100%
rename from BirthdayCardCompose/app/proguard-rules.pro
rename to HealthConnectNative/app/proguard-rules.pro
diff --git a/HealthConnectNative/app/src/androidTest/java/com/algokelvin/healthconnectnative/ExampleInstrumentedTest.java b/HealthConnectNative/app/src/androidTest/java/com/algokelvin/healthconnectnative/ExampleInstrumentedTest.java
new file mode 100644
index 00000000..2d23279e
--- /dev/null
+++ b/HealthConnectNative/app/src/androidTest/java/com/algokelvin/healthconnectnative/ExampleInstrumentedTest.java
@@ -0,0 +1,26 @@
+package com.algokelvin.healthconnectnative;
+
+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.algokelvin.healthconnectnative", appContext.getPackageName());
+ }
+}
\ No newline at end of file
diff --git a/HealthConnectNative/app/src/main/AndroidManifest.xml b/HealthConnectNative/app/src/main/AndroidManifest.xml
new file mode 100644
index 00000000..116d28eb
--- /dev/null
+++ b/HealthConnectNative/app/src/main/AndroidManifest.xml
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HealthConnectNative/app/src/main/java/com/algokelvin/healthconnectnative/HealthConnectManager.java b/HealthConnectNative/app/src/main/java/com/algokelvin/healthconnectnative/HealthConnectManager.java
new file mode 100644
index 00000000..066299f5
--- /dev/null
+++ b/HealthConnectNative/app/src/main/java/com/algokelvin/healthconnectnative/HealthConnectManager.java
@@ -0,0 +1,68 @@
+package com.algokelvin.healthconnectnative;
+
+import android.content.Context;
+import android.os.Build;
+import android.widget.Toast;
+
+import androidx.activity.result.contract.ActivityResultContract;
+import androidx.annotation.NonNull;
+import androidx.health.connect.client.HealthConnectClient;
+import androidx.health.connect.client.HealthConnectFeatures;
+import androidx.health.connect.client.PermissionController;
+
+import java.util.Set;
+
+public class HealthConnectManager {
+
+ public enum HealthConnectAvailability {
+ INSTALLED,
+ NOT_INSTALLED,
+ NOT_SUPPORTED
+ }
+
+ private static final int MIN_SUPPORTED_SDK = Build.VERSION_CODES.O_MR1;
+ private final Context context;
+ private final HealthConnectClient healthConnectClient;
+ private HealthConnectAvailability availability = HealthConnectAvailability.NOT_SUPPORTED;
+
+ public HealthConnectManager(Context context) {
+ this.context = context.getApplicationContext();
+ this.healthConnectClient = HealthConnectClient.getOrCreate(this.context);
+ checkAvailability();
+ }
+
+ public boolean isSupported() {
+ return Build.VERSION.SDK_INT >= MIN_SUPPORTED_SDK;
+ }
+
+ public HealthConnectAvailability getAvailability() {
+ return availability;
+ }
+
+ public void checkAvailability() {
+ int sdkStatus = HealthConnectClient.getSdkStatus(context);
+ if (sdkStatus == HealthConnectClient.SDK_AVAILABLE) {
+ availability = HealthConnectAvailability.INSTALLED;
+ } else if (isSupported()) {
+ availability = HealthConnectAvailability.NOT_INSTALLED;
+ } else {
+ availability = HealthConnectAvailability.NOT_SUPPORTED;
+ }
+ }
+
+ public boolean isFeatureAvailable(int feature) {
+ return healthConnectClient.getFeatures().getFeatureStatus(feature) == HealthConnectFeatures.FEATURE_STATUS_AVAILABLE;
+ }
+
+ public void enqueueReadStepWorker() {
+
+ }
+
+ public void showToast(@NonNull String message) {
+ Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
+ }
+
+ public ActivityResultContract, Set> requestPermissionsActivityContract() {
+ return PermissionController.createRequestPermissionResultContract();
+ }
+}
diff --git a/HealthConnectNative/app/src/main/java/com/algokelvin/healthconnectnative/MainActivity.java b/HealthConnectNative/app/src/main/java/com/algokelvin/healthconnectnative/MainActivity.java
new file mode 100644
index 00000000..6650ac81
--- /dev/null
+++ b/HealthConnectNative/app/src/main/java/com/algokelvin/healthconnectnative/MainActivity.java
@@ -0,0 +1,73 @@
+package com.algokelvin.healthconnectnative;
+
+import android.os.Bundle;
+import android.widget.Button;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import androidx.activity.EdgeToEdge;
+import androidx.activity.result.ActivityResultLauncher;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.health.connect.client.permission.HealthPermission;
+import androidx.health.connect.client.records.ExerciseSessionRecord;
+import androidx.health.connect.client.records.HeartRateRecord;
+import androidx.health.connect.client.records.StepsRecord;
+import androidx.health.connect.client.records.TotalCaloriesBurnedRecord;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import static kotlin.jvm.JvmClassMappingKt.getKotlinClass;
+
+public class MainActivity extends AppCompatActivity {
+ private static final String TAG = "HealthConnectSync";
+ private HealthConnectManager healthConnectManager;
+ private ActivityResultLauncher> permissionsLauncher;
+ private boolean isHealthConnected = false;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ EdgeToEdge.enable(this);
+ setContentView(R.layout.activity_main);
+
+ TextView statusText = findViewById(R.id.statusText);
+
+ healthConnectManager = new HealthConnectManager(getApplicationContext());
+ HealthConnectManager.HealthConnectAvailability status = healthConnectManager.getAvailability();
+
+ statusText.setText("Status: "+ status.name());
+
+ // Inisialisasi permission launcher
+ permissionsLauncher = registerForActivityResult(
+ healthConnectManager.requestPermissionsActivityContract(),
+ grantedPermissions -> {
+ onPermissionsResult(grantedPermissions);
+ }
+ );
+ Button btnRequestPermission = findViewById(R.id.requestPermissionButton);
+ btnRequestPermission.setOnClickListener(v -> {
+ Set permissions = new HashSet<>();
+
+ permissions.add(HealthPermission.getWritePermission(getKotlinClass(ExerciseSessionRecord.class)));
+ permissions.add(HealthPermission.getReadPermission(getKotlinClass(ExerciseSessionRecord.class)));
+ permissions.add(HealthPermission.getWritePermission(getKotlinClass(StepsRecord.class)));
+ permissions.add(HealthPermission.getReadPermission(getKotlinClass(StepsRecord.class)));
+ permissions.add(HealthPermission.getWritePermission(getKotlinClass(TotalCaloriesBurnedRecord.class)));
+ permissions.add(HealthPermission.getWritePermission(getKotlinClass(HeartRateRecord.class)));
+
+ // Launch permission dialog
+ permissionsLauncher.launch(permissions);
+ });
+ }
+
+ private void onPermissionsResult(Set grantedPermissions) {
+ if (grantedPermissions != null && !grantedPermissions.isEmpty()) {
+ Toast.makeText(this, "Permissions granted: " + grantedPermissions.size(), Toast.LENGTH_SHORT).show();
+ isHealthConnected = true;
+ } else {
+ Toast.makeText(this, "No permissions granted", Toast.LENGTH_SHORT).show();
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/AnimationApp/app/src/main/res/drawable/ic_launcher_background.xml b/HealthConnectNative/app/src/main/res/drawable/ic_launcher_background.xml
similarity index 100%
rename from AnimationApp/app/src/main/res/drawable/ic_launcher_background.xml
rename to HealthConnectNative/app/src/main/res/drawable/ic_launcher_background.xml
diff --git a/CalculatorCompose/app/src/main/res/drawable/ic_launcher_foreground.xml b/HealthConnectNative/app/src/main/res/drawable/ic_launcher_foreground.xml
similarity index 100%
rename from CalculatorCompose/app/src/main/res/drawable/ic_launcher_foreground.xml
rename to HealthConnectNative/app/src/main/res/drawable/ic_launcher_foreground.xml
diff --git a/HealthConnectNative/app/src/main/res/layout/activity_main.xml b/HealthConnectNative/app/src/main/res/layout/activity_main.xml
new file mode 100644
index 00000000..1b26bb29
--- /dev/null
+++ b/HealthConnectNative/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CalculatorCompose/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/HealthConnectNative/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
similarity index 100%
rename from CalculatorCompose/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
rename to HealthConnectNative/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
diff --git a/CalculatorCompose/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/HealthConnectNative/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
similarity index 100%
rename from CalculatorCompose/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
rename to HealthConnectNative/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
diff --git a/BirthdayCardCompose/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/HealthConnectNative/app/src/main/res/mipmap-hdpi/ic_launcher.webp
similarity index 100%
rename from BirthdayCardCompose/app/src/main/res/mipmap-hdpi/ic_launcher.webp
rename to HealthConnectNative/app/src/main/res/mipmap-hdpi/ic_launcher.webp
diff --git a/BirthdayCardCompose/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/HealthConnectNative/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
similarity index 100%
rename from BirthdayCardCompose/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
rename to HealthConnectNative/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
diff --git a/BirthdayCardCompose/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/HealthConnectNative/app/src/main/res/mipmap-mdpi/ic_launcher.webp
similarity index 100%
rename from BirthdayCardCompose/app/src/main/res/mipmap-mdpi/ic_launcher.webp
rename to HealthConnectNative/app/src/main/res/mipmap-mdpi/ic_launcher.webp
diff --git a/BirthdayCardCompose/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/HealthConnectNative/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
similarity index 100%
rename from BirthdayCardCompose/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
rename to HealthConnectNative/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
diff --git a/BirthdayCardCompose/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/HealthConnectNative/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
similarity index 100%
rename from BirthdayCardCompose/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
rename to HealthConnectNative/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
diff --git a/BirthdayCardCompose/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/HealthConnectNative/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
similarity index 100%
rename from BirthdayCardCompose/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
rename to HealthConnectNative/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
diff --git a/BirthdayCardCompose/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/HealthConnectNative/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
similarity index 100%
rename from BirthdayCardCompose/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
rename to HealthConnectNative/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
diff --git a/BirthdayCardCompose/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/HealthConnectNative/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
similarity index 100%
rename from BirthdayCardCompose/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
rename to HealthConnectNative/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
diff --git a/BirthdayCardCompose/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/HealthConnectNative/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
similarity index 100%
rename from BirthdayCardCompose/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
rename to HealthConnectNative/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
diff --git a/BirthdayCardCompose/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/HealthConnectNative/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
similarity index 100%
rename from BirthdayCardCompose/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
rename to HealthConnectNative/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
diff --git a/HealthConnectNative/app/src/main/res/values-night/themes.xml b/HealthConnectNative/app/src/main/res/values-night/themes.xml
new file mode 100644
index 00000000..81ab5370
--- /dev/null
+++ b/HealthConnectNative/app/src/main/res/values-night/themes.xml
@@ -0,0 +1,7 @@
+
+
+
+
\ No newline at end of file
diff --git a/InsertLocalDbNoTransaction/app/src/main/res/values/colors.xml b/HealthConnectNative/app/src/main/res/values/colors.xml
similarity index 100%
rename from InsertLocalDbNoTransaction/app/src/main/res/values/colors.xml
rename to HealthConnectNative/app/src/main/res/values/colors.xml
diff --git a/HealthConnectNative/app/src/main/res/values/strings.xml b/HealthConnectNative/app/src/main/res/values/strings.xml
new file mode 100644
index 00000000..abb33e9b
--- /dev/null
+++ b/HealthConnectNative/app/src/main/res/values/strings.xml
@@ -0,0 +1,3 @@
+
+ HealthConnectNative
+
\ No newline at end of file
diff --git a/HealthConnectNative/app/src/main/res/values/themes.xml b/HealthConnectNative/app/src/main/res/values/themes.xml
new file mode 100644
index 00000000..904eb0b2
--- /dev/null
+++ b/HealthConnectNative/app/src/main/res/values/themes.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HealthConnectNative/app/src/main/res/xml/backup_rules.xml b/HealthConnectNative/app/src/main/res/xml/backup_rules.xml
new file mode 100644
index 00000000..4df92558
--- /dev/null
+++ b/HealthConnectNative/app/src/main/res/xml/backup_rules.xml
@@ -0,0 +1,13 @@
+
+
+
+
\ No newline at end of file
diff --git a/CountNumberCompose/app/src/main/res/xml/data_extraction_rules.xml b/HealthConnectNative/app/src/main/res/xml/data_extraction_rules.xml
similarity index 100%
rename from CountNumberCompose/app/src/main/res/xml/data_extraction_rules.xml
rename to HealthConnectNative/app/src/main/res/xml/data_extraction_rules.xml
diff --git a/HealthConnectNative/app/src/test/java/com/algokelvin/healthconnectnative/ExampleUnitTest.java b/HealthConnectNative/app/src/test/java/com/algokelvin/healthconnectnative/ExampleUnitTest.java
new file mode 100644
index 00000000..c16d682d
--- /dev/null
+++ b/HealthConnectNative/app/src/test/java/com/algokelvin/healthconnectnative/ExampleUnitTest.java
@@ -0,0 +1,17 @@
+package com.algokelvin.healthconnectnative;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * @see Testing documentation
+ */
+public class ExampleUnitTest {
+ @Test
+ public void addition_isCorrect() {
+ assertEquals(4, 2 + 2);
+ }
+}
\ No newline at end of file
diff --git a/InsertLocalDbNoTransaction/build.gradle b/HealthConnectNative/build.gradle
similarity index 100%
rename from InsertLocalDbNoTransaction/build.gradle
rename to HealthConnectNative/build.gradle
diff --git a/InsertLocalDbNoTransaction/gradle.properties b/HealthConnectNative/gradle.properties
similarity index 100%
rename from InsertLocalDbNoTransaction/gradle.properties
rename to HealthConnectNative/gradle.properties
diff --git a/HealthConnectNative/gradle/libs.versions.toml b/HealthConnectNative/gradle/libs.versions.toml
new file mode 100644
index 00000000..373db4aa
--- /dev/null
+++ b/HealthConnectNative/gradle/libs.versions.toml
@@ -0,0 +1,24 @@
+[versions]
+agp = "8.10.1"
+connectClient = "1.1.0-alpha07"
+junit = "4.13.2"
+junitVersion = "1.2.1"
+espressoCore = "3.6.1"
+appcompat = "1.7.1"
+material = "1.12.0"
+activity = "1.10.1"
+constraintlayout = "2.2.1"
+
+[libraries]
+connect-client = { module = "androidx.health.connect:connect-client", version.ref = "connectClient" }
+junit = { group = "junit", name = "junit", version.ref = "junit" }
+ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
+espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
+appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
+material = { group = "com.google.android.material", name = "material", version.ref = "material" }
+activity = { group = "androidx.activity", name = "activity", version.ref = "activity" }
+constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
+
+[plugins]
+android-application = { id = "com.android.application", version.ref = "agp" }
+
diff --git a/CountNumberCompose/gradle/wrapper/gradle-wrapper.jar b/HealthConnectNative/gradle/wrapper/gradle-wrapper.jar
similarity index 100%
rename from CountNumberCompose/gradle/wrapper/gradle-wrapper.jar
rename to HealthConnectNative/gradle/wrapper/gradle-wrapper.jar
diff --git a/HealthConnectNative/gradle/wrapper/gradle-wrapper.properties b/HealthConnectNative/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 00000000..dd165fd8
--- /dev/null
+++ b/HealthConnectNative/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Mon Jul 21 09:28:39 WIB 2025
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/CountNumberCompose/gradlew b/HealthConnectNative/gradlew
similarity index 100%
rename from CountNumberCompose/gradlew
rename to HealthConnectNative/gradlew
diff --git a/CountNumberCompose/gradlew.bat b/HealthConnectNative/gradlew.bat
similarity index 100%
rename from CountNumberCompose/gradlew.bat
rename to HealthConnectNative/gradlew.bat
diff --git a/HealthConnectNative/settings.gradle b/HealthConnectNative/settings.gradle
new file mode 100644
index 00000000..5af3cebc
--- /dev/null
+++ b/HealthConnectNative/settings.gradle
@@ -0,0 +1,25 @@
+pluginManagement {
+ repositories {
+ google {
+ content {
+ includeGroupByRegex("com\\.android.*")
+ includeGroupByRegex("com\\.google.*")
+ includeGroupByRegex("androidx.*")
+ }
+ }
+ mavenCentral()
+ gradlePluginPortal()
+ maven { url 'https://androidx.dev/snapshots/builds/11510568/artifacts/repository' }
+ }
+}
+dependencyResolutionManagement {
+ repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
+ repositories {
+ google()
+ mavenCentral()
+ maven { url 'https://androidx.dev/snapshots/builds/11510568/artifacts/repository' }
+ }
+}
+
+rootProject.name = "HealthConnectNative"
+include ':app'
diff --git a/ImageText/app/build.gradle b/ImageText/app/build.gradle
deleted file mode 100644
index 77c0d63d..00000000
--- a/ImageText/app/build.gradle
+++ /dev/null
@@ -1,45 +0,0 @@
-plugins {
- alias(libs.plugins.android.application)
- alias(libs.plugins.jetbrains.kotlin.android)
-}
-
-android {
- namespace 'com.algokelvin.imagetext'
- compileSdk 34
-
- defaultConfig {
- applicationId "com.algokelvin.imagetext"
- minSdk 24
- targetSdk 34
- 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
- }
- kotlinOptions {
- jvmTarget = '1.8'
- }
-}
-
-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/ImageText/app/proguard-rules.pro b/ImageText/app/proguard-rules.pro
deleted file mode 100644
index 481bb434..00000000
--- a/ImageText/app/proguard-rules.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# 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/ImageText/app/src/main/res/drawable/ic_launcher_background.xml b/ImageText/app/src/main/res/drawable/ic_launcher_background.xml
deleted file mode 100644
index 07d5da9c..00000000
--- a/ImageText/app/src/main/res/drawable/ic_launcher_background.xml
+++ /dev/null
@@ -1,170 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ImageText/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/ImageText/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
deleted file mode 100644
index 6f3b755b..00000000
--- a/ImageText/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ImageText/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/ImageText/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
deleted file mode 100644
index 6f3b755b..00000000
--- a/ImageText/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ImageText/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/ImageText/app/src/main/res/mipmap-hdpi/ic_launcher.webp
deleted file mode 100644
index c209e78e..00000000
Binary files a/ImageText/app/src/main/res/mipmap-hdpi/ic_launcher.webp and /dev/null differ
diff --git a/ImageText/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/ImageText/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
deleted file mode 100644
index b2dfe3d1..00000000
Binary files a/ImageText/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/ImageText/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/ImageText/app/src/main/res/mipmap-mdpi/ic_launcher.webp
deleted file mode 100644
index 4f0f1d64..00000000
Binary files a/ImageText/app/src/main/res/mipmap-mdpi/ic_launcher.webp and /dev/null differ
diff --git a/ImageText/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/ImageText/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
deleted file mode 100644
index 62b611da..00000000
Binary files a/ImageText/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/ImageText/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/ImageText/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
deleted file mode 100644
index 948a3070..00000000
Binary files a/ImageText/app/src/main/res/mipmap-xhdpi/ic_launcher.webp and /dev/null differ
diff --git a/ImageText/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/ImageText/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
deleted file mode 100644
index 1b9a6956..00000000
Binary files a/ImageText/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/ImageText/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/ImageText/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
deleted file mode 100644
index 28d4b77f..00000000
Binary files a/ImageText/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp and /dev/null differ
diff --git a/ImageText/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/ImageText/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
deleted file mode 100644
index 9287f508..00000000
Binary files a/ImageText/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/ImageText/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/ImageText/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
deleted file mode 100644
index aa7d6427..00000000
Binary files a/ImageText/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp and /dev/null differ
diff --git a/ImageText/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/ImageText/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
deleted file mode 100644
index 9126ae37..00000000
Binary files a/ImageText/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/ImageText/app/src/main/res/xml/backup_rules.xml b/ImageText/app/src/main/res/xml/backup_rules.xml
deleted file mode 100644
index fa0f996d..00000000
--- a/ImageText/app/src/main/res/xml/backup_rules.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/ImageText/build.gradle b/ImageText/build.gradle
deleted file mode 100644
index bd4e7d9f..00000000
--- a/ImageText/build.gradle
+++ /dev/null
@@ -1,5 +0,0 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
-plugins {
-alias(libs.plugins.android.application) apply false
- alias(libs.plugins.jetbrains.kotlin.android) apply false
-}
\ No newline at end of file
diff --git a/ImageText/gradle/libs.versions.toml b/ImageText/gradle/libs.versions.toml
deleted file mode 100644
index eb3e978b..00000000
--- a/ImageText/gradle/libs.versions.toml
+++ /dev/null
@@ -1,26 +0,0 @@
-[versions]
-agp = "8.5.0"
-kotlin = "1.9.0"
-coreKtx = "1.15.0"
-junit = "4.13.2"
-junitVersion = "1.2.1"
-espressoCore = "3.6.1"
-appcompat = "1.7.0"
-material = "1.12.0"
-activity = "1.10.1"
-constraintlayout = "2.2.1"
-
-[libraries]
-androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
-junit = { group = "junit", name = "junit", version.ref = "junit" }
-androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
-androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
-androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
-material = { group = "com.google.android.material", name = "material", version.ref = "material" }
-androidx-activity = { group = "androidx.activity", name = "activity", version.ref = "activity" }
-androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
-
-[plugins]
-android-application = { id = "com.android.application", version.ref = "agp" }
-jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
-
diff --git a/ImageText/gradle/wrapper/gradle-wrapper.properties b/ImageText/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 7a9de03a..00000000
--- a/ImageText/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Tue Mar 11 15:50:57 WIB 2025
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
diff --git a/ImageTextCompose/.gitignore b/ImageTextCompose/.gitignore
deleted file mode 100644
index 878c2cd5..00000000
--- a/ImageTextCompose/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-*.iml
-.gradle
-/local.properties
-.idea
-.DS_Store
-/build
-/captures
-.externalNativeBuild
-.cxx
-local.properties
diff --git a/ImageTextCompose/app/.gitignore b/ImageTextCompose/app/.gitignore
deleted file mode 100644
index 42afabfd..00000000
--- a/ImageTextCompose/app/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build
\ No newline at end of file
diff --git a/ImageTextCompose/app/build.gradle b/ImageTextCompose/app/build.gradle
deleted file mode 100644
index 0b34e839..00000000
--- a/ImageTextCompose/app/build.gradle
+++ /dev/null
@@ -1,66 +0,0 @@
-plugins {
- alias(libs.plugins.android.application)
- alias(libs.plugins.jetbrains.kotlin.android)
-}
-
-android {
- namespace 'com.algokelvin.imagetext'
- compileSdk 35
-
- defaultConfig {
- applicationId "com.algokelvin.imagetext"
- minSdk 24
- targetSdk 35
- versionCode 1
- versionName "1.0"
-
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- vectorDrawables {
- useSupportLibrary true
- }
- }
-
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- }
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- kotlinOptions {
- jvmTarget = '1.8'
- }
- buildFeatures {
- compose true
- viewBinding true
- }
- composeOptions {
- kotlinCompilerExtensionVersion '1.5.1'
- }
- packaging {
- resources {
- excludes += '/META-INF/{AL2.0,LGPL2.1}'
- }
- }
-}
-
-dependencies {
- implementation libs.androidx.core.ktx
- implementation libs.androidx.lifecycle.runtime.ktx
- implementation libs.androidx.activity.compose
- implementation platform(libs.androidx.compose.bom)
- implementation libs.androidx.ui
- implementation libs.androidx.ui.graphics
- implementation libs.androidx.ui.tooling.preview
- implementation libs.androidx.material3
- testImplementation libs.junit
- androidTestImplementation libs.androidx.junit
- androidTestImplementation libs.androidx.espresso.core
- androidTestImplementation platform(libs.androidx.compose.bom)
- androidTestImplementation libs.androidx.ui.test.junit4
- debugImplementation libs.androidx.ui.tooling
- debugImplementation libs.androidx.ui.test.manifest
-}
\ No newline at end of file
diff --git a/ImageTextCompose/app/proguard-rules.pro b/ImageTextCompose/app/proguard-rules.pro
deleted file mode 100644
index 481bb434..00000000
--- a/ImageTextCompose/app/proguard-rules.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# 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/ImageTextCompose/app/src/main/res/drawable/ic_launcher_background.xml b/ImageTextCompose/app/src/main/res/drawable/ic_launcher_background.xml
deleted file mode 100644
index 07d5da9c..00000000
--- a/ImageTextCompose/app/src/main/res/drawable/ic_launcher_background.xml
+++ /dev/null
@@ -1,170 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ImageTextCompose/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/ImageTextCompose/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
deleted file mode 100644
index 6f3b755b..00000000
--- a/ImageTextCompose/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ImageTextCompose/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/ImageTextCompose/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
deleted file mode 100644
index 6f3b755b..00000000
--- a/ImageTextCompose/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ImageTextCompose/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/ImageTextCompose/app/src/main/res/mipmap-hdpi/ic_launcher.webp
deleted file mode 100644
index c209e78e..00000000
Binary files a/ImageTextCompose/app/src/main/res/mipmap-hdpi/ic_launcher.webp and /dev/null differ
diff --git a/ImageTextCompose/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/ImageTextCompose/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
deleted file mode 100644
index b2dfe3d1..00000000
Binary files a/ImageTextCompose/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/ImageTextCompose/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/ImageTextCompose/app/src/main/res/mipmap-mdpi/ic_launcher.webp
deleted file mode 100644
index 4f0f1d64..00000000
Binary files a/ImageTextCompose/app/src/main/res/mipmap-mdpi/ic_launcher.webp and /dev/null differ
diff --git a/ImageTextCompose/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/ImageTextCompose/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
deleted file mode 100644
index 62b611da..00000000
Binary files a/ImageTextCompose/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/ImageTextCompose/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/ImageTextCompose/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
deleted file mode 100644
index 948a3070..00000000
Binary files a/ImageTextCompose/app/src/main/res/mipmap-xhdpi/ic_launcher.webp and /dev/null differ
diff --git a/ImageTextCompose/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/ImageTextCompose/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
deleted file mode 100644
index 1b9a6956..00000000
Binary files a/ImageTextCompose/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/ImageTextCompose/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/ImageTextCompose/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
deleted file mode 100644
index 28d4b77f..00000000
Binary files a/ImageTextCompose/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp and /dev/null differ
diff --git a/ImageTextCompose/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/ImageTextCompose/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
deleted file mode 100644
index 9287f508..00000000
Binary files a/ImageTextCompose/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/ImageTextCompose/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/ImageTextCompose/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
deleted file mode 100644
index aa7d6427..00000000
Binary files a/ImageTextCompose/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp and /dev/null differ
diff --git a/ImageTextCompose/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/ImageTextCompose/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
deleted file mode 100644
index 9126ae37..00000000
Binary files a/ImageTextCompose/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/ImageTextCompose/app/src/main/res/values/colors.xml b/ImageTextCompose/app/src/main/res/values/colors.xml
deleted file mode 100644
index f8c6127d..00000000
--- a/ImageTextCompose/app/src/main/res/values/colors.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
- #FFBB86FC
- #FF6200EE
- #FF3700B3
- #FF03DAC5
- #FF018786
- #FF000000
- #FFFFFFFF
-
\ No newline at end of file
diff --git a/ImageTextCompose/app/src/main/res/xml/backup_rules.xml b/ImageTextCompose/app/src/main/res/xml/backup_rules.xml
deleted file mode 100644
index fa0f996d..00000000
--- a/ImageTextCompose/app/src/main/res/xml/backup_rules.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/ImageTextCompose/build.gradle b/ImageTextCompose/build.gradle
deleted file mode 100644
index bd4e7d9f..00000000
--- a/ImageTextCompose/build.gradle
+++ /dev/null
@@ -1,5 +0,0 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
-plugins {
-alias(libs.plugins.android.application) apply false
- alias(libs.plugins.jetbrains.kotlin.android) apply false
-}
\ No newline at end of file
diff --git a/ImageTextCompose/gradle/libs.versions.toml b/ImageTextCompose/gradle/libs.versions.toml
deleted file mode 100644
index eae502b2..00000000
--- a/ImageTextCompose/gradle/libs.versions.toml
+++ /dev/null
@@ -1,31 +0,0 @@
-[versions]
-agp = "8.5.0"
-kotlin = "1.9.0"
-coreKtx = "1.15.0"
-junit = "4.13.2"
-junitVersion = "1.2.1"
-espressoCore = "3.6.1"
-lifecycleRuntimeKtx = "2.8.7"
-activityCompose = "1.10.1"
-composeBom = "2024.04.01"
-
-[libraries]
-androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
-junit = { group = "junit", name = "junit", version.ref = "junit" }
-androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
-androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
-androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" }
-androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" }
-androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" }
-androidx-ui = { group = "androidx.compose.ui", name = "ui" }
-androidx-ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" }
-androidx-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
-androidx-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" }
-androidx-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" }
-androidx-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }
-androidx-material3 = { group = "androidx.compose.material3", name = "material3" }
-
-[plugins]
-android-application = { id = "com.android.application", version.ref = "agp" }
-jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
-
diff --git a/ImageTextCompose/gradle/wrapper/gradle-wrapper.properties b/ImageTextCompose/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 73cb099e..00000000
--- a/ImageTextCompose/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Tue Mar 11 15:45:16 WIB 2025
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
diff --git a/InputOutputApp/.gitignore b/InputOutputApp/.gitignore
deleted file mode 100644
index 878c2cd5..00000000
--- a/InputOutputApp/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-*.iml
-.gradle
-/local.properties
-.idea
-.DS_Store
-/build
-/captures
-.externalNativeBuild
-.cxx
-local.properties
diff --git a/InputOutputApp/README.md b/InputOutputApp/README.md
deleted file mode 100644
index efc92a92..00000000
--- a/InputOutputApp/README.md
+++ /dev/null
@@ -1,37 +0,0 @@
-## Input Output
-
-Aplikasi Android Sederhana - Input Output
-
-## Screen Shoot
-| ![Gambar 1]() | ![Gambar 2]() |
-|:-------------:|:--------------:|
-|Gambar 1:
|Gambar 2:
|
-
-## Environment
-- **Android Gradle**: 8.5.0
-- **Plugins Version**: 8.7
-- **Gradle Version**: 8.0
-- **Java JDK**: 17
-- **Kotlin Version**: 1.9.0
-- **Min SDK**: 21
-- **Target SDK**: 34
-
-## Contributors
-Thanks all contributors for build this repository
-
-```
-Copyright [2021] [The Dictionary of Android Projects]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-```
diff --git a/InputOutputApp/app/.gitignore b/InputOutputApp/app/.gitignore
deleted file mode 100644
index 42afabfd..00000000
--- a/InputOutputApp/app/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build
\ No newline at end of file
diff --git a/InputOutputApp/app/build.gradle b/InputOutputApp/app/build.gradle
deleted file mode 100644
index 7ae99095..00000000
--- a/InputOutputApp/app/build.gradle
+++ /dev/null
@@ -1,43 +0,0 @@
-plugins {
- id 'com.android.application'
-}
-
-android {
- compileSdk 32
-
- defaultConfig {
- applicationId "algokelvin.app.inputoutput"
- minSdk 21
- targetSdk 32
- 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_11
- targetCompatibility JavaVersion.VERSION_11
- }
- buildFeatures {
- viewBinding = true
- }
-}
-
-dependencies {
-
- implementation 'androidx.appcompat:appcompat:1.4.2'
- implementation 'com.google.android.material:material:1.6.1'
- implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
- testImplementation 'junit:junit:4.13.2'
- androidTestImplementation 'androidx.test.ext:junit:1.1.3'
- androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
- androidTestImplementation 'androidx.test:runner:1.1.0'
- androidTestImplementation 'androidx.test:rules:1.1.0'
-}
\ No newline at end of file
diff --git a/InputOutputApp/app/proguard-rules.pro b/InputOutputApp/app/proguard-rules.pro
deleted file mode 100644
index 481bb434..00000000
--- a/InputOutputApp/app/proguard-rules.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# 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/InputOutputApp/app/src/androidTest/java/algokelvin/app/inputoutput/ExampleInstrumentedTest.java b/InputOutputApp/app/src/androidTest/java/algokelvin/app/inputoutput/ExampleInstrumentedTest.java
deleted file mode 100644
index 5c402b03..00000000
--- a/InputOutputApp/app/src/androidTest/java/algokelvin/app/inputoutput/ExampleInstrumentedTest.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package algokelvin.app.inputoutput;
-
-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("algokelvin.app.inputoutput", appContext.getPackageName());
- }
-}
\ No newline at end of file
diff --git a/InputOutputApp/app/src/androidTest/java/algokelvin/app/inputoutput/MainUITest.java b/InputOutputApp/app/src/androidTest/java/algokelvin/app/inputoutput/MainUITest.java
deleted file mode 100644
index 42afecd6..00000000
--- a/InputOutputApp/app/src/androidTest/java/algokelvin/app/inputoutput/MainUITest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package algokelvin.app.inputoutput;
-
-import static androidx.test.espresso.Espresso.onView;
-import static androidx.test.espresso.action.ViewActions.click;
-import static androidx.test.espresso.action.ViewActions.closeSoftKeyboard;
-import static androidx.test.espresso.action.ViewActions.typeText;
-import static androidx.test.espresso.assertion.ViewAssertions.matches;
-import static androidx.test.espresso.matcher.ViewMatchers.withId;
-import static androidx.test.espresso.matcher.ViewMatchers.withText;
-
-import static java.lang.Thread.sleep;
-
-import androidx.test.ext.junit.runners.AndroidJUnit4;
-import androidx.test.rule.ActivityTestRule;
-
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-@RunWith(AndroidJUnit4.class)
-public class MainUITest {
- @Rule
- public ActivityTestRule mActivityRule =
- new ActivityTestRule<>(MainActivity.class);
-
- @Test
- public void checkUI() {
- onView(withId(R.id.title))
- .check(matches(withText("Input Your Name")));
- }
-
- @Test
- public void addName() throws InterruptedException {
- onView(withId(R.id.edt_input_name))
- .perform(typeText("Kelvin Herwanda Tandrio"), closeSoftKeyboard());
- onView(withId(R.id.btn_login))
- .perform(click());
-
- sleep(1500);
-
- // This view is in a different Activity, no need to tell Espresso.
- // Check Your Name
- onView(withId(R.id.txt_name)).check(matches(withText("Kelvin Herwanda Tandrio")));
- }
-
-}
diff --git a/InputOutputApp/app/src/main/AndroidManifest.xml b/InputOutputApp/app/src/main/AndroidManifest.xml
deleted file mode 100644
index c9b77c43..00000000
--- a/InputOutputApp/app/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/InputOutputApp/app/src/main/java/algokelvin/app/inputoutput/MainActivity.java b/InputOutputApp/app/src/main/java/algokelvin/app/inputoutput/MainActivity.java
deleted file mode 100644
index 37b44238..00000000
--- a/InputOutputApp/app/src/main/java/algokelvin/app/inputoutput/MainActivity.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package algokelvin.app.inputoutput;
-
-import androidx.appcompat.app.AppCompatActivity;
-
-import android.content.Intent;
-import android.os.Bundle;
-import android.util.Log;
-
-import algokelvin.app.inputoutput.databinding.ActivityMainBinding;
-
-public class MainActivity extends AppCompatActivity {
-
- private ActivityMainBinding binding;
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- binding = ActivityMainBinding.inflate(getLayoutInflater());
- super.onCreate(savedInstanceState);
- setContentView(binding.getRoot());
- setAction();
- }
-
- private void setAction() {
- binding.btnLogin.setOnClickListener(v -> {
- String dataName = binding.edtInputName.getText().toString();
- Intent intentShow = new Intent(this, ShowActivity.class);
- intentShow.putExtra("data_name", dataName);
- startActivity(intentShow);
- });
- }
-
-}
\ No newline at end of file
diff --git a/InputOutputApp/app/src/main/java/algokelvin/app/inputoutput/ShowActivity.java b/InputOutputApp/app/src/main/java/algokelvin/app/inputoutput/ShowActivity.java
deleted file mode 100644
index fc0880e2..00000000
--- a/InputOutputApp/app/src/main/java/algokelvin/app/inputoutput/ShowActivity.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package algokelvin.app.inputoutput;
-
-import androidx.appcompat.app.AppCompatActivity;
-
-import android.os.Bundle;
-
-import algokelvin.app.inputoutput.databinding.ActivityShowBinding;
-
-public class ShowActivity extends AppCompatActivity {
-
- private ActivityShowBinding binding;
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- binding = ActivityShowBinding.inflate(getLayoutInflater());
- super.onCreate(savedInstanceState);
- setContentView(binding.getRoot());
- setAction();
- }
-
- private void setAction() {
- String name = getIntent().getStringExtra("data_name");
- binding.txtName.setText(name);
- }
-
-}
\ No newline at end of file
diff --git a/InputOutputApp/app/src/main/res/drawable/ic_launcher_background.xml b/InputOutputApp/app/src/main/res/drawable/ic_launcher_background.xml
deleted file mode 100644
index 07d5da9c..00000000
--- a/InputOutputApp/app/src/main/res/drawable/ic_launcher_background.xml
+++ /dev/null
@@ -1,170 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/InputOutputApp/app/src/main/res/layout/activity_main.xml b/InputOutputApp/app/src/main/res/layout/activity_main.xml
deleted file mode 100644
index 07278d4c..00000000
--- a/InputOutputApp/app/src/main/res/layout/activity_main.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/InputOutputApp/app/src/main/res/layout/activity_show.xml b/InputOutputApp/app/src/main/res/layout/activity_show.xml
deleted file mode 100644
index 160780f2..00000000
--- a/InputOutputApp/app/src/main/res/layout/activity_show.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/InputOutputApp/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/InputOutputApp/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
deleted file mode 100644
index eca70cfe..00000000
--- a/InputOutputApp/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/InputOutputApp/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/InputOutputApp/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
deleted file mode 100644
index eca70cfe..00000000
--- a/InputOutputApp/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/InputOutputApp/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/InputOutputApp/app/src/main/res/mipmap-hdpi/ic_launcher.webp
deleted file mode 100644
index c209e78e..00000000
Binary files a/InputOutputApp/app/src/main/res/mipmap-hdpi/ic_launcher.webp and /dev/null differ
diff --git a/InputOutputApp/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/InputOutputApp/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
deleted file mode 100644
index b2dfe3d1..00000000
Binary files a/InputOutputApp/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/InputOutputApp/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/InputOutputApp/app/src/main/res/mipmap-mdpi/ic_launcher.webp
deleted file mode 100644
index 4f0f1d64..00000000
Binary files a/InputOutputApp/app/src/main/res/mipmap-mdpi/ic_launcher.webp and /dev/null differ
diff --git a/InputOutputApp/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/InputOutputApp/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
deleted file mode 100644
index 62b611da..00000000
Binary files a/InputOutputApp/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/InputOutputApp/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/InputOutputApp/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
deleted file mode 100644
index 948a3070..00000000
Binary files a/InputOutputApp/app/src/main/res/mipmap-xhdpi/ic_launcher.webp and /dev/null differ
diff --git a/InputOutputApp/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/InputOutputApp/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
deleted file mode 100644
index 1b9a6956..00000000
Binary files a/InputOutputApp/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/InputOutputApp/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/InputOutputApp/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
deleted file mode 100644
index 28d4b77f..00000000
Binary files a/InputOutputApp/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp and /dev/null differ
diff --git a/InputOutputApp/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/InputOutputApp/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
deleted file mode 100644
index 9287f508..00000000
Binary files a/InputOutputApp/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/InputOutputApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/InputOutputApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
deleted file mode 100644
index aa7d6427..00000000
Binary files a/InputOutputApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp and /dev/null differ
diff --git a/InputOutputApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/InputOutputApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
deleted file mode 100644
index 9126ae37..00000000
Binary files a/InputOutputApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/InputOutputApp/app/src/main/res/values-night/themes.xml b/InputOutputApp/app/src/main/res/values-night/themes.xml
deleted file mode 100644
index 9ee904eb..00000000
--- a/InputOutputApp/app/src/main/res/values-night/themes.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/InputOutputApp/app/src/main/res/values/colors.xml b/InputOutputApp/app/src/main/res/values/colors.xml
deleted file mode 100644
index f8c6127d..00000000
--- a/InputOutputApp/app/src/main/res/values/colors.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
- #FFBB86FC
- #FF6200EE
- #FF3700B3
- #FF03DAC5
- #FF018786
- #FF000000
- #FFFFFFFF
-
\ No newline at end of file
diff --git a/InputOutputApp/app/src/main/res/values/strings.xml b/InputOutputApp/app/src/main/res/values/strings.xml
deleted file mode 100644
index 1eed7b4a..00000000
--- a/InputOutputApp/app/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- AndroidInputOutput
-
\ No newline at end of file
diff --git a/InputOutputApp/app/src/main/res/values/themes.xml b/InputOutputApp/app/src/main/res/values/themes.xml
deleted file mode 100644
index acd40001..00000000
--- a/InputOutputApp/app/src/main/res/values/themes.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/InputOutputApp/app/src/main/res/xml/backup_rules.xml b/InputOutputApp/app/src/main/res/xml/backup_rules.xml
deleted file mode 100644
index fa0f996d..00000000
--- a/InputOutputApp/app/src/main/res/xml/backup_rules.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/InputOutputApp/app/src/test/java/algokelvin/app/inputoutput/ExampleUnitTest.java b/InputOutputApp/app/src/test/java/algokelvin/app/inputoutput/ExampleUnitTest.java
deleted file mode 100644
index b572d842..00000000
--- a/InputOutputApp/app/src/test/java/algokelvin/app/inputoutput/ExampleUnitTest.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package algokelvin.app.inputoutput;
-
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-/**
- * Example local unit test, which will execute on the development machine (host).
- *
- * @see Testing documentation
- */
-public class ExampleUnitTest {
- @Test
- public void addition_isCorrect() {
- assertEquals(4, 2 + 2);
- }
-}
\ No newline at end of file
diff --git a/InputOutputApp/build.gradle b/InputOutputApp/build.gradle
deleted file mode 100644
index ce6a4b70..00000000
--- a/InputOutputApp/build.gradle
+++ /dev/null
@@ -1,13 +0,0 @@
-buildscript {
- ext {
- agp_version = '8.5.0'
- }
-}// Top-level build file where you can add configuration options common to all sub-projects/modules.
-plugins {
- id 'com.android.application' version '8.5.0' apply false
- id 'com.android.library' version '7.2.1' apply false
-}
-
-task clean(type: Delete) {
- delete rootProject.buildDir
-}
\ No newline at end of file
diff --git a/InputOutputApp/gradle.properties b/InputOutputApp/gradle.properties
deleted file mode 100644
index dab7c28b..00000000
--- a/InputOutputApp/gradle.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-# Project-wide Gradle settings.
-# IDE (e.g. Android Studio) users:
-# Gradle settings configured through the IDE *will override*
-# any settings specified in this file.
-# For more details on how to configure your build environment visit
-# http://www.gradle.org/docs/current/userguide/build_environment.html
-# Specifies the JVM arguments used for the daemon process.
-# The setting is particularly useful for tweaking memory settings.
-org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
-# When configured, Gradle will run in incubating parallel mode.
-# This option should only be used with decoupled projects. More details, visit
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
-# org.gradle.parallel=true
-# AndroidX package structure to make it clearer which packages are bundled with the
-# Android operating system, and which are packaged with your app"s APK
-# https://developer.android.com/topic/libraries/support-library/androidx-rn
-android.useAndroidX=true
-# Enables namespacing of each library's R class so that its R class includes only the
-# resources declared in the library itself and none from the library's dependencies,
-# thereby reducing the size of the R class for that library
-android.nonTransitiveRClass=true
\ No newline at end of file
diff --git a/InputOutputApp/gradle/wrapper/gradle-wrapper.properties b/InputOutputApp/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 92705609..00000000
--- a/InputOutputApp/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Sun Feb 23 16:26:20 WIB 2025
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
diff --git a/InputOutputApp/settings.gradle b/InputOutputApp/settings.gradle
deleted file mode 100644
index 4821cbaf..00000000
--- a/InputOutputApp/settings.gradle
+++ /dev/null
@@ -1,16 +0,0 @@
-pluginManagement {
- repositories {
- gradlePluginPortal()
- google()
- mavenCentral()
- }
-}
-dependencyResolutionManagement {
- repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
- repositories {
- google()
- mavenCentral()
- }
-}
-rootProject.name = "AndroidInputOutput"
-include ':app'
diff --git a/InsertLocalDbNoTransaction/app/.gitignore b/InsertLocalDbNoTransaction/app/.gitignore
deleted file mode 100644
index 42afabfd..00000000
--- a/InsertLocalDbNoTransaction/app/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build
\ No newline at end of file
diff --git a/InsertLocalDbNoTransaction/app/build.gradle b/InsertLocalDbNoTransaction/app/build.gradle
deleted file mode 100644
index 0bdc5999..00000000
--- a/InsertLocalDbNoTransaction/app/build.gradle
+++ /dev/null
@@ -1,42 +0,0 @@
-plugins {
- alias(libs.plugins.android.application)
-}
-
-android {
- namespace 'com.algokelvin.insertdb'
- compileSdk 34
-
- defaultConfig {
- applicationId "com.algokelvin.insertdb"
- minSdk 24
- targetSdk 34
- versionCode 1
- versionName "1.0.0"
-
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- }
-
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- }
- }
- buildFeatures {
- viewBinding = true
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
-}
-
-dependencies {
- implementation libs.appcompat
- implementation libs.material
- implementation libs.activity
- implementation libs.constraintlayout
-
- implementation "androidx.room:room-runtime:2.4.3"
- annotationProcessor "androidx.room:room-compiler:2.4.3"
-}
\ No newline at end of file
diff --git a/InsertLocalDbNoTransaction/app/proguard-rules.pro b/InsertLocalDbNoTransaction/app/proguard-rules.pro
deleted file mode 100644
index 481bb434..00000000
--- a/InsertLocalDbNoTransaction/app/proguard-rules.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# 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/InsertLocalDbNoTransaction/app/src/androidTest/java/com/algokelvin/insertdb/ExampleInstrumentedTest.java b/InsertLocalDbNoTransaction/app/src/androidTest/java/com/algokelvin/insertdb/ExampleInstrumentedTest.java
deleted file mode 100644
index 5ce08b89..00000000
--- a/InsertLocalDbNoTransaction/app/src/androidTest/java/com/algokelvin/insertdb/ExampleInstrumentedTest.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.algokelvin.insertdb;
-
-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.algokelvin.insertdb", appContext.getPackageName());
- }
-}
\ No newline at end of file
diff --git a/InsertLocalDbNoTransaction/app/src/main/AndroidManifest.xml b/InsertLocalDbNoTransaction/app/src/main/AndroidManifest.xml
deleted file mode 100644
index cb50836a..00000000
--- a/InsertLocalDbNoTransaction/app/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/MainActivity.java b/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/MainActivity.java
deleted file mode 100644
index 09232049..00000000
--- a/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/MainActivity.java
+++ /dev/null
@@ -1,305 +0,0 @@
-package com.algokelvin.insertdb;
-
-import android.content.Intent;
-import android.content.pm.PackageManager;
-import android.os.AsyncTask;
-import android.os.Build;
-import android.os.Bundle;
-import android.widget.Toast;
-
-import androidx.annotation.NonNull;
-import androidx.appcompat.app.AppCompatActivity;
-import androidx.core.app.ActivityCompat;
-import androidx.core.content.ContextCompat;
-
-import com.algokelvin.insertdb.base.RoomDbActivity;
-import com.algokelvin.insertdb.base.SqliteDbActivity;
-import com.algokelvin.insertdb.databinding.ActivityMainBinding;
-import com.algokelvin.insertdb.db.AppDbSqlite;
-import com.algokelvin.insertdb.db.entity.DataTest;
-import com.algokelvin.insertdb.db.entity.User;
-import com.algokelvin.insertdb.db.entity.UserSqlite;
-import com.algokelvin.insertdb.db.task.UserTask;
-import com.algokelvin.insertdb.db.task.inter.SelectUserTask;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import android.Manifest;
-
-public class MainActivity extends AppCompatActivity {
- private AppDbSqlite db;
- private ActivityMainBinding binding;
- private static final int REQUEST_CODE_READ_STORAGE = 1;
- private static final int REQUEST_MANAGE_EXTERNAL_STORAGE = 2;
- private UserTask task;
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- binding = ActivityMainBinding.inflate(getLayoutInflater());
- task = new UserTask(this);
- db = new AppDbSqlite(this);
- setContentView(binding.getRoot());
- initialize(binding);
- }
-
- private void initialize(ActivityMainBinding binding) {
-
- binding.btnRoom.setOnClickListener(v -> {
- Intent toDbRoom = new Intent(this, RoomDbActivity.class);
- startActivity(toDbRoom);
- });
-
- binding.btnSqlite.setOnClickListener(v -> {
- Intent toDbSqlite = new Intent(this, SqliteDbActivity.class);
- startActivity(toDbSqlite);
- });
-
- binding.btnAction.setOnClickListener(v -> {
- actionReadCsvInsertDbRoom();
-// ProgressBarAsync progressBarAsync = new ProgressBarAsync();
-// progressBarAsync.execute();
- });
-
- binding.btnInsertSqlite.setOnClickListener(v -> {
- insertDbSqliteTraining();
- });
-
- binding.btnShow.setOnClickListener(v -> {
- task.getAllUsers(new SelectUserTask() {
- @Override
- public void getListUser(List listUser) {
- int count = listUser.size();
- if (count > 0) {
- for (User user: listUser) {
- System.out.println(user.getId()+" -- "+user.getName());
- }
- Toast.makeText(MainActivity.this, "You have "+count+" data", Toast.LENGTH_SHORT).show();
- } else {
- Toast.makeText(MainActivity.this, "Data still empty", Toast.LENGTH_SHORT).show();
- }
- }
- });
- });
- }
-
- private void actionReadCsvInsertDbRoom() {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
- if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
- ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, REQUEST_CODE_READ_STORAGE);
- } else {
- readFileCsv();
- }
- } else {
- readFileCsv();
- }
- }
-
- // Inserting using SQLite
- private void insertDbSqliteTraining() {
- int count = 200000; // 1000000
-
- List data = new ArrayList<>();
- for (int i = 0; i < count; i++) {
- for (int j = 0; j < 5; j++) {
- UserSqlite user = new UserSqlite();
- if (j == 0) {
- user.setName("Kelvin");
- user.setDescription("Android Developer");
- } else if (j == 1) {
- user.setName("Andy");
- user.setDescription("Web Developer");
- } else if (j == 2) {
- user.setName("Vira");
- user.setDescription("Cyber Security");
- } else if (j == 3) {
- user.setName("Tiara");
- user.setDescription("Singer");
- } else {
- user.setName("Jonny");
- user.setDescription("Project Manager");
- }
- data.add(user);
- }
- }
-
- long start = System.currentTimeMillis();
- db.insertMultipleData(data);
- long end = System.currentTimeMillis();
-
- System.out.println("Time Insert: "+ (end - start));
- Toast.makeText(this, "Add : "+ data.size() +" \n" +
- "Time : "+ (end - start) +" ms", Toast.LENGTH_SHORT).show();
- }
-
- private void readFileCsv() {
- String directory = "trainingcsv/data/";
- String fileName = "filetester.csv";
- File csvFile = new File("/storage/emulated/0/trainingcsv/data/filetester_all.csv"); // Path ke file CSV di penyimpanan internal
- String line = "";
- String csvSplitBy = "\\|";
-
- BufferedReader br = null;
- FileReader fr = null;
-
- try {
- fr = new FileReader(csvFile);
- br = new BufferedReader(fr);
-
- long start = System.currentTimeMillis();
- List dataTestList = new ArrayList<>();
- int count = 1;
- int total = 0;
- while ((line = br.readLine()) != null) {
- String[] dataArray = line.split(csvSplitBy);
-
- if (count == 1) {
- total = Integer.parseInt(dataArray[1]);
- } else {
- DataTest data = new DataTest();
- data.setData1(!dataArray[0].isEmpty() ? dataArray[0] : "");
- data.setData2(!dataArray[1].isEmpty() ? dataArray[1] : "");
- data.setData3(!dataArray[2].isEmpty() ? dataArray[2] : "");
- data.setData4(!dataArray[3].isEmpty() ? dataArray[3] : "");
- data.setData5(!dataArray[4].isEmpty() ? dataArray[4] : "");
- data.setData6(!dataArray[5].isEmpty() ? dataArray[5] : "");
- data.setData7(!dataArray[6].isEmpty() ? dataArray[6] : "");
- data.setData8(!dataArray[7].isEmpty() ? dataArray[7] : "");
- data.setData9(!dataArray[8].isEmpty() ? dataArray[8] : "");
- data.setData10(!dataArray[9].isEmpty() ? dataArray[9] : "");
- data.setData11(!dataArray[10].isEmpty() ? dataArray[10] : "");
- data.setData12(!dataArray[11].isEmpty() ? dataArray[11] : "");
- data.setData13(!dataArray[12].isEmpty() ? dataArray[12] : "");
- data.setData14(!dataArray[13].isEmpty() ? dataArray[13] : "");
- data.setData15(!dataArray[14].isEmpty() ? dataArray[14] : "");
- data.setData16(!dataArray[15].isEmpty() ? dataArray[15] : "");
- data.setData17(!dataArray[16].isEmpty() ? dataArray[16] : "");
- //data.setData18(!dataArray[17].isEmpty() ? dataArray[17] : "");
-
- dataTestList.add(data);
- }
-
- count++;
- if (count % 10000 == 0) {
- dataTestList = new ArrayList<>();
- float percent = (float) (count * 100) / total;
- binding.progressBar.setProgress((int) percent);
- }
- }
- long end = System.currentTimeMillis();
- long times = end - start;
- System.out.println("Timer Read: "+ times);
- Toast.makeText(this, "Time: "+times+ " ms", Toast.LENGTH_SHORT).show();
- } catch (IOException e) {
- e.printStackTrace();
- } finally {
- try {
- if (br != null) {
- br.close();
- }
- if (fr != null) {
- fr.close();
- }
- } catch (IOException ex) {
- ex.printStackTrace();
- }
- }
- }
-
- public class ProgressBarAsync extends AsyncTask {
- private int total = 0;
-
- public ProgressBarAsync() {
- createDataSample();
- }
-
- public void createDataSample() {
- int count = 200000; // 1.000.000
-
- List data = new ArrayList<>();
- for (int i = 0; i < count; i++) {
- for (int j = 0; j < 5; j++) {
- User user = new User();
- if (j == 0) {
- user.setName("Kelvin");
- user.setDescription("Android Developer");
- } else if (j == 1) {
- user.setName("Andy");
- user.setDescription("Web Developer");
- } else if (j == 2) {
- user.setName("Vira");
- user.setDescription("Cyber Security");
- } else if (j == 3) {
- user.setName("Tiara");
- user.setDescription("Singer");
- } else {
- user.setName("Jonny");
- user.setDescription("Project Manager");
- }
- data.add(user);
- }
- }
- total = data.size();
- }
-
- @Override
- protected Void doInBackground(Void... voids) {
- for (int i = 0; i < total; i++) {
- // Simulasikan operasi latar belakang dengan tidur selama 50ms
-// try {
-// Thread.sleep(50);
-// } catch (InterruptedException e) {
-// e.printStackTrace();
-// }
-
- if ((i+1) % 25000 == 0) {
- float part = (float) i /total;
- int percent = (int) (part * 100);
- publishProgress(percent);
- }
-
-
- // Publikasikan kemajuan
- //publishProgress(i);
- }
- return null;
- }
-
- @Override
- protected void onProgressUpdate(Integer... values) {
- super.onProgressUpdate(values);
- // Perbarui UI dengan kemajuan yang diterima
- int progress = values[0];
- System.out.println("Value progress: "+ progress);
- // Misalnya, perbarui ProgressBar atau TextView
- binding.progressBar.setProgress(progress);
- binding.percentProgressBar.setText("Progress: "+ progress +" %");
-// progressBar.setProgress(progress);
-// textView.setText("Progress: " + progress + "%");
- }
-
- @Override
- protected void onPostExecute(Void unused) {
- super.onPostExecute(unused);
- binding.percentProgressBar.setText("Loading Completed");
- }
- }
-
- @Override
- public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
- super.onRequestPermissionsResult(requestCode, permissions, grantResults);
- if (requestCode == REQUEST_CODE_READ_STORAGE) {
- //if (grantResults.length > 0 && grantResults[0] == -1) { // just tester
- if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
- readFileCsv();
- } else {
- Toast.makeText(this, "Permission Denied", Toast.LENGTH_SHORT).show();
- }
- }
- }
-}
\ No newline at end of file
diff --git a/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/base/RoomDbActivity.java b/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/base/RoomDbActivity.java
deleted file mode 100644
index 0e10af18..00000000
--- a/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/base/RoomDbActivity.java
+++ /dev/null
@@ -1,174 +0,0 @@
-package com.algokelvin.insertdb.base;
-
-import android.os.AsyncTask;
-import android.os.Bundle;
-import android.view.View;
-
-import androidx.appcompat.app.AppCompatActivity;
-
-import com.algokelvin.insertdb.databinding.ActivityRoomDbBinding;
-import com.algokelvin.insertdb.db.AppDb;
-import com.algokelvin.insertdb.db.dao.UserDao;
-import com.algokelvin.insertdb.db.entity.User;
-import com.algokelvin.insertdb.db.task.UserTask;
-import com.algokelvin.insertdb.db.task.inter.InsertUserTask;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class RoomDbActivity extends AppCompatActivity implements InsertUserTask {
- private ActivityRoomDbBinding binding;
- private UserDao dao;
- private UserTask task;
- private int total;
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- binding = ActivityRoomDbBinding.inflate(getLayoutInflater());
- setContentView(binding.getRoot());
- AppDb db = AppDb.getDatabase(this);
- dao = db.userDao();
- task = new UserTask(this);
- initialize(binding);
- }
-
- private void initialize(ActivityRoomDbBinding binding) {
- binding.btnInsertRoom.setOnClickListener(v -> {
- binding.layoutLoading.setVisibility(View.VISIBLE);
- insertDbRoomTraining();
- });
-
- binding.btnInsertRoomLoading.setOnClickListener(v -> {
- InsertRoomAsync insertRoomAsync = new InsertRoomAsync(dao);
- insertRoomAsync.execute();
- });
- }
-
- // Inserting Using Room
- private void insertDbRoomTraining() {
- int count = 200000; // 1.000.000 data
-
- List data = new ArrayList<>();
- for (int i = 0; i < count; i++) {
- for (int j = 0; j < 5; j++) {
- User user = new User();
- if (j == 0) {
- user.setName("Kelvin");
- user.setDescription("Android Developer");
- } else if (j == 1) {
- user.setName("Andy");
- user.setDescription("Web Developer");
- } else if (j == 2) {
- user.setName("Vira");
- user.setDescription("Cyber Security");
- } else if (j == 3) {
- user.setName("Tiara");
- user.setDescription("Singer");
- } else {
- user.setName("Jonny");
- user.setDescription("Project Manager");
- }
- data.add(user);
- }
- }
- total = data.size();
-
- // Insert to Room
- task.insert(data, this);
- }
-
- @Override
- public void getTimeExecute(long timer) {
- String totalData = "Total: "+ total;
- String time = "Time: "+ timer/1000 +" detik";
- binding.layoutLoading.setVisibility(View.GONE);
- binding.txtResult.setVisibility(View.VISIBLE);
- binding.txtTotalData.setVisibility(View.VISIBLE);
- binding.txtTimeExecution.setVisibility(View.VISIBLE);
-
- binding.txtTotalData.setText(totalData);
- binding.txtTimeExecution.setText(time);
- }
-
- public class InsertRoomAsync extends AsyncTask {
- private final String startMsg = "Ready to Insert Data";
- private final UserDao userDao;
- private int totalPart = 0;
- private final long start;
-
- public InsertRoomAsync(UserDao userDao) {
- this.userDao = userDao;
- binding.percentProgressBar.setText(startMsg);
- start = System.currentTimeMillis();
- }
-
- @Override
- protected Void doInBackground(Void... voids) {
- int count = 200000; // 1.000.000
- int totalData = count * 5;
-
- // Method 1: Add One by One Data and Insert to DB Room every 25000 data
- List data = new ArrayList<>();
- for (int i = 0; i < count; i++) {
- for (int j = 0; j < 5; j++) {
- User user = new User();
- if (j == 0) {
- user.setName("Kelvin");
- user.setDescription("Android Developer");
- } else if (j == 1) {
- user.setName("Andy");
- user.setDescription("Web Developer");
- } else if (j == 2) {
- user.setName("Vira");
- user.setDescription("Cyber Security");
- } else if (j == 3) {
- user.setName("Tiara");
- user.setDescription("Singer");
- } else {
- user.setName("Jonny");
- user.setDescription("Project Manager");
- }
- data.add(user);
-
- // Ready to insert db for total 25000
- if (data.size() % 25000 == 0) {
- totalPart += data.size(); // Set total part data
- userDao.insert(data); // Insert data to Room
-
- data = new ArrayList<>(); // Making list data become new object
-
- float part = (float) totalPart / totalData;
- int percent = (int) (part * 100);
- publishProgress(percent);
- }
- }
- }
-
- return null;
- }
-
- @Override
- protected void onProgressUpdate(Integer... values) {
- super.onProgressUpdate(values);
-
- // Update UI ProgressBar and TextView
- int progress = values[0];
- String processMsg = startMsg +"\n" +
- "Data Insert: "+ totalPart +" data \n" +
- "Progress: "+ progress +" %";
- binding.progressBar.setProgress(progress);
- binding.percentProgressBar.setText(processMsg);
- }
-
- @Override
- protected void onPostExecute(Void unused) {
- super.onPostExecute(unused);
- long end = System.currentTimeMillis();
- long timerExecute = end - start;
- String lastMessage = "Loading Completed \n" +
- "Time Execute: "+ timerExecute / 1000 + " detik";
- binding.percentProgressBar.setText(lastMessage);
- }
- }
-}
\ No newline at end of file
diff --git a/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/base/SqliteDbActivity.java b/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/base/SqliteDbActivity.java
deleted file mode 100644
index b9272ec1..00000000
--- a/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/base/SqliteDbActivity.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.algokelvin.insertdb.base;
-
-import android.os.Bundle;
-
-import androidx.appcompat.app.AppCompatActivity;
-
-import com.algokelvin.insertdb.R;
-
-public class SqliteDbActivity extends AppCompatActivity {
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_room_db);
-
- }
-}
\ No newline at end of file
diff --git a/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/db/AppDb.java b/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/db/AppDb.java
deleted file mode 100644
index 338ac00f..00000000
--- a/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/db/AppDb.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package com.algokelvin.insertdb.db;
-
-import android.content.Context;
-
-import androidx.room.Database;
-import androidx.room.Room;
-import androidx.room.RoomDatabase;
-
-import com.algokelvin.insertdb.db.dao.UserDao;
-import com.algokelvin.insertdb.db.entity.User;
-
-@Database(
- entities = {User.class},
- version = 1
-)
-public abstract class AppDb extends RoomDatabase {
- public abstract UserDao userDao();
-
- private static volatile AppDb INSTANCE;
-
- public static AppDb getDatabase(final Context context) {
- if (INSTANCE == null) {
- synchronized (AppDb.class) {
- if (INSTANCE == null) {
- String DATABASE_NAME = "user_database";
- INSTANCE = Room.databaseBuilder(
- context.getApplicationContext(),
- AppDb.class,
- DATABASE_NAME
- ).build();
- }
- }
- }
- return INSTANCE;
- }
-}
diff --git a/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/db/AppDbSqlite.java b/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/db/AppDbSqlite.java
deleted file mode 100644
index 9b704403..00000000
--- a/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/db/AppDbSqlite.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package com.algokelvin.insertdb.db;
-
-import android.content.ContentValues;
-import android.content.Context;
-import android.database.sqlite.SQLiteDatabase;
-import android.database.sqlite.SQLiteOpenHelper;
-import android.database.sqlite.SQLiteStatement;
-
-import com.algokelvin.insertdb.db.entity.UserSqlite;
-
-import java.util.List;
-
-public class AppDbSqlite extends SQLiteOpenHelper {
- private static final String DATABASE_NAME = "mydatabase.db";
- private static final int DATABASE_VERSION = 1;
-
- public static final String TABLE_NAME = "myusers";
- public static final String COLUMN_ID = "_id";
- public static final String COLUMN_NAME = "name";
- public static final String COLUMN_DESCRIPTION = "description";
-
- private static final String TABLE_CREATE =
- "CREATE TABLE " + TABLE_NAME + " (" +
- COLUMN_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " +
- COLUMN_NAME + " TEXT, " +
- COLUMN_DESCRIPTION + " TEXT);";
-
- public AppDbSqlite(Context context) {
- super(context, DATABASE_NAME, null, DATABASE_VERSION);
- }
-
- @Override
- public void onCreate(SQLiteDatabase sqLiteDatabase) {
- sqLiteDatabase.execSQL(TABLE_CREATE);
- }
-
- @Override
- public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {
- sqLiteDatabase.execSQL("DROP TABLE IF EXISTS " + TABLE_NAME);
- onCreate(sqLiteDatabase);
- }
-
- public void insertData(UserSqlite user) {
- SQLiteDatabase db = this.getWritableDatabase();
- ContentValues values = new ContentValues();
- values.put(COLUMN_NAME, user.getName());
- values.put(COLUMN_DESCRIPTION, user.getDescription());
- db.insert(TABLE_NAME, null, values);
- db.close();
- }
-
- public void insertMultipleData(List users) {
- SQLiteDatabase db = this.getWritableDatabase();
- String sql = "INSERT INTO " + TABLE_NAME + " (" + COLUMN_NAME + ", " + COLUMN_DESCRIPTION + ") VALUES (?, ?);";
- SQLiteStatement statement = db.compileStatement(sql);
-
- db.beginTransaction();
- try {
- for (UserSqlite person : users) {
- statement.clearBindings();
- statement.bindString(1, person.getName());
- statement.bindString(2, person.getDescription());
- statement.execute();
- }
- db.setTransactionSuccessful();
- } finally {
- db.endTransaction();
- }
-
- db.close();
- }
-}
diff --git a/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/db/dao/UserDao.java b/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/db/dao/UserDao.java
deleted file mode 100644
index ffdc12b1..00000000
--- a/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/db/dao/UserDao.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.algokelvin.insertdb.db.dao;
-
-import androidx.room.Dao;
-import androidx.room.Insert;
-import androidx.room.OnConflictStrategy;
-import androidx.room.Query;
-
-import com.algokelvin.insertdb.db.entity.User;
-
-import java.util.List;
-
-@Dao
-public interface UserDao {
- @Insert(onConflict = OnConflictStrategy.REPLACE)
- void insert(List user);
-
- @Query("SELECT * FROM users")
- List getAllUsers();
-}
diff --git a/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/db/entity/DataTest.java b/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/db/entity/DataTest.java
deleted file mode 100644
index 47de5b12..00000000
--- a/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/db/entity/DataTest.java
+++ /dev/null
@@ -1,175 +0,0 @@
-package com.algokelvin.insertdb.db.entity;
-
-public class DataTest {
- private int id;
- private String data1;
- private String data2;
- private String data3;
- private String data4;
- private String data5;
- private String data6;
- private String data7;
- private String data8;
- private String data9;
- private String data10;
- private String data11;
- private String data12;
- private String data13;
- private String data14;
- private String data15;
- private String data16;
- private String data17;
- private String data18;
-
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getData1() {
- return data1;
- }
-
- public void setData1(String data1) {
- this.data1 = data1;
- }
-
- public String getData2() {
- return data2;
- }
-
- public void setData2(String data2) {
- this.data2 = data2;
- }
-
- public String getData3() {
- return data3;
- }
-
- public void setData3(String data3) {
- this.data3 = data3;
- }
-
- public String getData4() {
- return data4;
- }
-
- public void setData4(String data4) {
- this.data4 = data4;
- }
-
- public String getData5() {
- return data5;
- }
-
- public void setData5(String data5) {
- this.data5 = data5;
- }
-
- public String getData6() {
- return data6;
- }
-
- public void setData6(String data6) {
- this.data6 = data6;
- }
-
- public String getData7() {
- return data7;
- }
-
- public void setData7(String data7) {
- this.data7 = data7;
- }
-
- public String getData8() {
- return data8;
- }
-
- public void setData8(String data8) {
- this.data8 = data8;
- }
-
- public String getData9() {
- return data9;
- }
-
- public void setData9(String data9) {
- this.data9 = data9;
- }
-
- public String getData10() {
- return data10;
- }
-
- public void setData10(String data10) {
- this.data10 = data10;
- }
-
- public String getData11() {
- return data11;
- }
-
- public void setData11(String data11) {
- this.data11 = data11;
- }
-
- public String getData12() {
- return data12;
- }
-
- public void setData12(String data12) {
- this.data12 = data12;
- }
-
- public String getData13() {
- return data13;
- }
-
- public void setData13(String data13) {
- this.data13 = data13;
- }
-
- public String getData14() {
- return data14;
- }
-
- public void setData14(String data14) {
- this.data14 = data14;
- }
-
- public String getData15() {
- return data15;
- }
-
- public void setData15(String data15) {
- this.data15 = data15;
- }
-
- public String getData16() {
- return data16;
- }
-
- public void setData16(String data16) {
- this.data16 = data16;
- }
-
- public String getData17() {
- return data17;
- }
-
- public void setData17(String data17) {
- this.data17 = data17;
- }
-
- public String getData18() {
- return data18;
- }
-
- public void setData18(String data18) {
- this.data18 = data18;
- }
-}
diff --git a/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/db/entity/User.java b/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/db/entity/User.java
deleted file mode 100644
index 159c6167..00000000
--- a/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/db/entity/User.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.algokelvin.insertdb.db.entity;
-
-import androidx.room.Entity;
-import androidx.room.PrimaryKey;
-
-@Entity(tableName = "users")
-public class User {
- @PrimaryKey(autoGenerate = true)
- private int id;
-
- private String name;
-
- private String description;
-
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-}
diff --git a/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/db/entity/UserSqlite.java b/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/db/entity/UserSqlite.java
deleted file mode 100644
index d581797f..00000000
--- a/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/db/entity/UserSqlite.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.algokelvin.insertdb.db.entity;
-
-public class UserSqlite {
- private int id;
- private String name;
- private String description;
-
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-}
diff --git a/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/db/task/UserTask.java b/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/db/task/UserTask.java
deleted file mode 100644
index 269e1bbe..00000000
--- a/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/db/task/UserTask.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package com.algokelvin.insertdb.db.task;
-
-import android.content.Context;
-import android.os.AsyncTask;
-
-import com.algokelvin.insertdb.db.AppDb;
-import com.algokelvin.insertdb.db.dao.UserDao;
-import com.algokelvin.insertdb.db.entity.User;
-import com.algokelvin.insertdb.db.task.inter.InsertUserTask;
-import com.algokelvin.insertdb.db.task.inter.SelectUserTask;
-
-import java.util.List;
-
-public class UserTask {
- private final UserDao dao;
- private static long timer;
-
- public UserTask(Context context) {
- AppDb db = AppDb.getDatabase(context);
- this.dao = db.userDao();
- }
-
- public void insert(List listUser, InsertUserTask insert) {
- new InsertAsyncTask(dao, listUser, insert).execute();
- }
-
- public void getAllUsers(SelectUserTask task) {
- new SelectAsyncTask(dao, task).execute();
- }
-
- private static class InsertAsyncTask extends AsyncTask {
- private final UserDao userDao;
- private final List listUser;
- private InsertUserTask insert;
-
- public InsertAsyncTask(UserDao userDao, List listUser, InsertUserTask insert) {
- this.userDao = userDao;
- this.listUser = listUser;
- this.insert = insert;
- }
-
- /*@Override
- protected Void doInBackground(final User... users) {
- userDao.insert(users);
- System.out.println("DB Test: Success Insert");
- return null;
- }*/
-
- @Override
- protected Void doInBackground(Void... voids) {
- long start = System.currentTimeMillis();
- userDao.insert(listUser);
- long end = System.currentTimeMillis();
- timer = end - start;
- System.out.println("DB Test: Success Insert - "+ (end - start)+" ms");
- return null;
- }
-
- @Override
- protected void onPostExecute(Void unused) {
- super.onPostExecute(unused);
- insert.getTimeExecute(timer);
- }
- }
-
- private static class SelectAsyncTask extends AsyncTask> {
- private final UserDao userDao;
- private final SelectUserTask task;
-
- public SelectAsyncTask(UserDao userDao, SelectUserTask task) {
- this.userDao = userDao;
- this.task = task;
- }
-
- @Override
- protected List doInBackground(Void... voids) {
- return userDao.getAllUsers();
- }
-
- @Override
- protected void onPostExecute(List users) {
- super.onPostExecute(users);
- task.getListUser(users);
- }
- }
-}
diff --git a/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/db/task/inter/InsertUserTask.java b/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/db/task/inter/InsertUserTask.java
deleted file mode 100644
index 019ddff5..00000000
--- a/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/db/task/inter/InsertUserTask.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package com.algokelvin.insertdb.db.task.inter;
-
-public interface InsertUserTask {
- void getTimeExecute(long timer);
-}
diff --git a/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/db/task/inter/SelectUserTask.java b/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/db/task/inter/SelectUserTask.java
deleted file mode 100644
index 1bc8655a..00000000
--- a/InsertLocalDbNoTransaction/app/src/main/java/com/algokelvin/insertdb/db/task/inter/SelectUserTask.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package com.algokelvin.insertdb.db.task.inter;
-
-import com.algokelvin.insertdb.db.entity.User;
-
-import java.util.List;
-
-public interface SelectUserTask {
- void getListUser(List listUser);
-}
diff --git a/InsertLocalDbNoTransaction/app/src/main/res/drawable/ic_launcher_background.xml b/InsertLocalDbNoTransaction/app/src/main/res/drawable/ic_launcher_background.xml
deleted file mode 100644
index 07d5da9c..00000000
--- a/InsertLocalDbNoTransaction/app/src/main/res/drawable/ic_launcher_background.xml
+++ /dev/null
@@ -1,170 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/InsertLocalDbNoTransaction/app/src/main/res/drawable/ic_launcher_foreground.xml b/InsertLocalDbNoTransaction/app/src/main/res/drawable/ic_launcher_foreground.xml
deleted file mode 100644
index 2b068d11..00000000
--- a/InsertLocalDbNoTransaction/app/src/main/res/drawable/ic_launcher_foreground.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/InsertLocalDbNoTransaction/app/src/main/res/layout/activity_main.xml b/InsertLocalDbNoTransaction/app/src/main/res/layout/activity_main.xml
deleted file mode 100644
index 68235ba2..00000000
--- a/InsertLocalDbNoTransaction/app/src/main/res/layout/activity_main.xml
+++ /dev/null
@@ -1,117 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/InsertLocalDbNoTransaction/app/src/main/res/layout/activity_room_db.xml b/InsertLocalDbNoTransaction/app/src/main/res/layout/activity_room_db.xml
deleted file mode 100644
index d107f3bb..00000000
--- a/InsertLocalDbNoTransaction/app/src/main/res/layout/activity_room_db.xml
+++ /dev/null
@@ -1,138 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/InsertLocalDbNoTransaction/app/src/main/res/layout/activity_sqlite_db.xml b/InsertLocalDbNoTransaction/app/src/main/res/layout/activity_sqlite_db.xml
deleted file mode 100644
index a4daab00..00000000
--- a/InsertLocalDbNoTransaction/app/src/main/res/layout/activity_sqlite_db.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/InsertLocalDbNoTransaction/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/InsertLocalDbNoTransaction/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
deleted file mode 100644
index 6f3b755b..00000000
--- a/InsertLocalDbNoTransaction/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/InsertLocalDbNoTransaction/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/InsertLocalDbNoTransaction/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
deleted file mode 100644
index 6f3b755b..00000000
--- a/InsertLocalDbNoTransaction/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/InsertLocalDbNoTransaction/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/InsertLocalDbNoTransaction/app/src/main/res/mipmap-hdpi/ic_launcher.webp
deleted file mode 100644
index c209e78e..00000000
Binary files a/InsertLocalDbNoTransaction/app/src/main/res/mipmap-hdpi/ic_launcher.webp and /dev/null differ
diff --git a/InsertLocalDbNoTransaction/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/InsertLocalDbNoTransaction/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
deleted file mode 100644
index b2dfe3d1..00000000
Binary files a/InsertLocalDbNoTransaction/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/InsertLocalDbNoTransaction/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/InsertLocalDbNoTransaction/app/src/main/res/mipmap-mdpi/ic_launcher.webp
deleted file mode 100644
index 4f0f1d64..00000000
Binary files a/InsertLocalDbNoTransaction/app/src/main/res/mipmap-mdpi/ic_launcher.webp and /dev/null differ
diff --git a/InsertLocalDbNoTransaction/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/InsertLocalDbNoTransaction/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
deleted file mode 100644
index 62b611da..00000000
Binary files a/InsertLocalDbNoTransaction/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/InsertLocalDbNoTransaction/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/InsertLocalDbNoTransaction/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
deleted file mode 100644
index 948a3070..00000000
Binary files a/InsertLocalDbNoTransaction/app/src/main/res/mipmap-xhdpi/ic_launcher.webp and /dev/null differ
diff --git a/InsertLocalDbNoTransaction/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/InsertLocalDbNoTransaction/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
deleted file mode 100644
index 1b9a6956..00000000
Binary files a/InsertLocalDbNoTransaction/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/InsertLocalDbNoTransaction/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/InsertLocalDbNoTransaction/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
deleted file mode 100644
index 28d4b77f..00000000
Binary files a/InsertLocalDbNoTransaction/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp and /dev/null differ
diff --git a/InsertLocalDbNoTransaction/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/InsertLocalDbNoTransaction/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
deleted file mode 100644
index 9287f508..00000000
Binary files a/InsertLocalDbNoTransaction/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/InsertLocalDbNoTransaction/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/InsertLocalDbNoTransaction/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
deleted file mode 100644
index aa7d6427..00000000
Binary files a/InsertLocalDbNoTransaction/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp and /dev/null differ
diff --git a/InsertLocalDbNoTransaction/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/InsertLocalDbNoTransaction/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
deleted file mode 100644
index 9126ae37..00000000
Binary files a/InsertLocalDbNoTransaction/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/InsertLocalDbNoTransaction/app/src/main/res/values-night/themes.xml b/InsertLocalDbNoTransaction/app/src/main/res/values-night/themes.xml
deleted file mode 100644
index c6b00dd5..00000000
--- a/InsertLocalDbNoTransaction/app/src/main/res/values-night/themes.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/InsertLocalDbNoTransaction/app/src/main/res/values/strings.xml b/InsertLocalDbNoTransaction/app/src/main/res/values/strings.xml
deleted file mode 100644
index 992e0446..00000000
--- a/InsertLocalDbNoTransaction/app/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- InsertDbLocalNoTrans
-
\ No newline at end of file
diff --git a/InsertLocalDbNoTransaction/app/src/main/res/values/themes.xml b/InsertLocalDbNoTransaction/app/src/main/res/values/themes.xml
deleted file mode 100644
index b6c2c3e9..00000000
--- a/InsertLocalDbNoTransaction/app/src/main/res/values/themes.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/InsertLocalDbNoTransaction/app/src/main/res/xml/backup_rules.xml b/InsertLocalDbNoTransaction/app/src/main/res/xml/backup_rules.xml
deleted file mode 100644
index fa0f996d..00000000
--- a/InsertLocalDbNoTransaction/app/src/main/res/xml/backup_rules.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/InsertLocalDbNoTransaction/app/src/test/java/com/algokelvin/insertdb/ExampleUnitTest.java b/InsertLocalDbNoTransaction/app/src/test/java/com/algokelvin/insertdb/ExampleUnitTest.java
deleted file mode 100644
index 7b10fdb7..00000000
--- a/InsertLocalDbNoTransaction/app/src/test/java/com/algokelvin/insertdb/ExampleUnitTest.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.algokelvin.insertdb;
-
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-/**
- * Example local unit test, which will execute on the development machine (host).
- *
- * @see Testing documentation
- */
-public class ExampleUnitTest {
- @Test
- public void addition_isCorrect() {
- assertEquals(4, 2 + 2);
- }
-}
\ No newline at end of file
diff --git a/InsertLocalDbNoTransaction/gradle/libs.versions.toml b/InsertLocalDbNoTransaction/gradle/libs.versions.toml
deleted file mode 100644
index 4874452b..00000000
--- a/InsertLocalDbNoTransaction/gradle/libs.versions.toml
+++ /dev/null
@@ -1,22 +0,0 @@
-[versions]
-agp = "8.5.0"
-junit = "4.13.2"
-junitVersion = "1.2.1"
-espressoCore = "3.6.1"
-appcompat = "1.7.0"
-material = "1.12.0"
-activity = "1.9.0"
-constraintlayout = "2.1.4"
-
-[libraries]
-junit = { group = "junit", name = "junit", version.ref = "junit" }
-ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
-material = { group = "com.google.android.material", name = "material", version.ref = "material" }
-activity = { group = "androidx.activity", name = "activity", version.ref = "activity" }
-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
-
-[plugins]
-android-application = { id = "com.android.application", version.ref = "agp" }
-
diff --git a/InsertLocalDbNoTransaction/gradle/wrapper/gradle-wrapper.properties b/InsertLocalDbNoTransaction/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index be6c1c6c..00000000
--- a/InsertLocalDbNoTransaction/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Sat Jul 20 22:27:13 WIB 2024
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
diff --git a/InsertLocalDbNoTransaction/settings.gradle b/InsertLocalDbNoTransaction/settings.gradle
deleted file mode 100644
index 51d526c4..00000000
--- a/InsertLocalDbNoTransaction/settings.gradle
+++ /dev/null
@@ -1,23 +0,0 @@
-pluginManagement {
- repositories {
- google {
- content {
- includeGroupByRegex("com\\.android.*")
- includeGroupByRegex("com\\.google.*")
- includeGroupByRegex("androidx.*")
- }
- }
- mavenCentral()
- gradlePluginPortal()
- }
-}
-dependencyResolutionManagement {
- repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
- repositories {
- google()
- mavenCentral()
- }
-}
-
-rootProject.name = "InsertDbLocalNoTrans"
-include ':app'
diff --git a/KeyStoreApp/.gitignore b/KeyStoreApp/.gitignore
index aa724b77..878c2cd5 100644
--- a/KeyStoreApp/.gitignore
+++ b/KeyStoreApp/.gitignore
@@ -1,12 +1,7 @@
*.iml
.gradle
/local.properties
-/.idea/caches
-/.idea/libraries
-/.idea/modules.xml
-/.idea/workspace.xml
-/.idea/navEditor.xml
-/.idea/assetWizardSettings.xml
+.idea
.DS_Store
/build
/captures
diff --git a/KeyStoreApp/README.md b/KeyStoreApp/README.md
new file mode 100644
index 00000000..8e660070
--- /dev/null
+++ b/KeyStoreApp/README.md
@@ -0,0 +1,4 @@
+# Key Store
+
+--- VERSION ---
+- 1.0.0 : Create APK Project
\ No newline at end of file
diff --git a/KeyStoreApp/app/build.gradle b/KeyStoreApp/app/build.gradle
index b7360206..02f9187d 100644
--- a/KeyStoreApp/app/build.gradle
+++ b/KeyStoreApp/app/build.gradle
@@ -11,7 +11,7 @@ android {
minSdk 24
targetSdk 34
versionCode 1
- versionName "1.0"
+ versionName "1.0.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
@@ -32,7 +32,6 @@ android {
}
dependencies {
-
implementation libs.appcompat
implementation libs.material
implementation libs.activity
diff --git a/KeyStoreApp/app/src/main/ic_launcher-playstore.png b/KeyStoreApp/app/src/main/ic_launcher-playstore.png
new file mode 100644
index 00000000..afeecb3b
Binary files /dev/null and b/KeyStoreApp/app/src/main/ic_launcher-playstore.png differ
diff --git a/KeyStoreApp/app/src/main/res/drawable/ic_launcher_background.xml b/KeyStoreApp/app/src/main/res/drawable/ic_launcher_background.xml
index 07d5da9c..ca3826a4 100644
--- a/KeyStoreApp/app/src/main/res/drawable/ic_launcher_background.xml
+++ b/KeyStoreApp/app/src/main/res/drawable/ic_launcher_background.xml
@@ -1,170 +1,74 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ xmlns:android="http://schemas.android.com/apk/res/android">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/KeyStoreApp/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/KeyStoreApp/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
index 6f3b755b..c4a603d4 100644
--- a/KeyStoreApp/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ b/KeyStoreApp/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -1,6 +1,5 @@
-
-
-
+
+
\ No newline at end of file
diff --git a/KeyStoreApp/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/KeyStoreApp/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
index 6f3b755b..c4a603d4 100644
--- a/KeyStoreApp/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+++ b/KeyStoreApp/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -1,6 +1,5 @@
-
-
-
+
+
\ No newline at end of file
diff --git a/KeyStoreApp/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/KeyStoreApp/app/src/main/res/mipmap-hdpi/ic_launcher.webp
index c209e78e..1f4c0d01 100644
Binary files a/KeyStoreApp/app/src/main/res/mipmap-hdpi/ic_launcher.webp and b/KeyStoreApp/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ
diff --git a/KeyStoreApp/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp b/KeyStoreApp/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..7b289835
Binary files /dev/null and b/KeyStoreApp/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp differ
diff --git a/KeyStoreApp/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/KeyStoreApp/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
index b2dfe3d1..1a6ccc46 100644
Binary files a/KeyStoreApp/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp and b/KeyStoreApp/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ
diff --git a/KeyStoreApp/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/KeyStoreApp/app/src/main/res/mipmap-mdpi/ic_launcher.webp
index 4f0f1d64..559e666e 100644
Binary files a/KeyStoreApp/app/src/main/res/mipmap-mdpi/ic_launcher.webp and b/KeyStoreApp/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ
diff --git a/KeyStoreApp/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp b/KeyStoreApp/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..cd0a7975
Binary files /dev/null and b/KeyStoreApp/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp differ
diff --git a/KeyStoreApp/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/KeyStoreApp/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
index 62b611da..617fd9ea 100644
Binary files a/KeyStoreApp/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp and b/KeyStoreApp/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ
diff --git a/KeyStoreApp/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/KeyStoreApp/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
index 948a3070..5efb6422 100644
Binary files a/KeyStoreApp/app/src/main/res/mipmap-xhdpi/ic_launcher.webp and b/KeyStoreApp/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ
diff --git a/KeyStoreApp/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp b/KeyStoreApp/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..bcae5e61
Binary files /dev/null and b/KeyStoreApp/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp differ
diff --git a/KeyStoreApp/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/KeyStoreApp/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
index 1b9a6956..0cb98685 100644
Binary files a/KeyStoreApp/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp and b/KeyStoreApp/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ
diff --git a/KeyStoreApp/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/KeyStoreApp/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
index 28d4b77f..ee8d549c 100644
Binary files a/KeyStoreApp/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp and b/KeyStoreApp/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ
diff --git a/KeyStoreApp/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp b/KeyStoreApp/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..f8f8d033
Binary files /dev/null and b/KeyStoreApp/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp differ
diff --git a/KeyStoreApp/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/KeyStoreApp/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
index 9287f508..ef80d15c 100644
Binary files a/KeyStoreApp/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp and b/KeyStoreApp/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ
diff --git a/KeyStoreApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/KeyStoreApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
index aa7d6427..b4e0005b 100644
Binary files a/KeyStoreApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp and b/KeyStoreApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ
diff --git a/KeyStoreApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp b/KeyStoreApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..fed1a6c4
Binary files /dev/null and b/KeyStoreApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp differ
diff --git a/KeyStoreApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/KeyStoreApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
index 9126ae37..31b5df0a 100644
Binary files a/KeyStoreApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp and b/KeyStoreApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ
diff --git a/KeyStoreApp/gradle/libs.versions.toml b/KeyStoreApp/gradle/libs.versions.toml
index cea7d6d0..f3eb8cb7 100644
--- a/KeyStoreApp/gradle/libs.versions.toml
+++ b/KeyStoreApp/gradle/libs.versions.toml
@@ -1,5 +1,5 @@
[versions]
-agp = "8.5.0"
+agp = "8.10.1"
junit = "4.13.2"
junitVersion = "1.2.1"
espressoCore = "3.6.1"
diff --git a/KeyStoreApp/gradle/wrapper/gradle-wrapper.properties b/KeyStoreApp/gradle/wrapper/gradle-wrapper.properties
index e8a63c27..5a0d940e 100644
--- a/KeyStoreApp/gradle/wrapper/gradle-wrapper.properties
+++ b/KeyStoreApp/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Mon Aug 12 21:20:06 WIB 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/KeyboardSimulator/.gitignore b/KeyboardSimulator/.gitignore
index 878c2cd5..10cfdbfa 100644
--- a/KeyboardSimulator/.gitignore
+++ b/KeyboardSimulator/.gitignore
@@ -1,7 +1,7 @@
*.iml
.gradle
/local.properties
-.idea
+/.idea
.DS_Store
/build
/captures
diff --git a/KeyboardSimulator/.idea/.gitignore b/KeyboardSimulator/.idea/.gitignore
new file mode 100644
index 00000000..26d33521
--- /dev/null
+++ b/KeyboardSimulator/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/KeyboardSimulator/.idea/.name b/KeyboardSimulator/.idea/.name
new file mode 100644
index 00000000..3989baae
--- /dev/null
+++ b/KeyboardSimulator/.idea/.name
@@ -0,0 +1 @@
+KeyboardSimulator
\ No newline at end of file
diff --git a/KeyboardSimulator/.idea/AndroidProjectSystem.xml b/KeyboardSimulator/.idea/AndroidProjectSystem.xml
new file mode 100644
index 00000000..4a53bee8
--- /dev/null
+++ b/KeyboardSimulator/.idea/AndroidProjectSystem.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/KeyboardSimulator/.idea/compiler.xml b/KeyboardSimulator/.idea/compiler.xml
new file mode 100644
index 00000000..b86273d9
--- /dev/null
+++ b/KeyboardSimulator/.idea/compiler.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/KeyboardSimulator/.idea/deploymentTargetSelector.xml b/KeyboardSimulator/.idea/deploymentTargetSelector.xml
new file mode 100644
index 00000000..b268ef36
--- /dev/null
+++ b/KeyboardSimulator/.idea/deploymentTargetSelector.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/KeyboardSimulator/.idea/gradle.xml b/KeyboardSimulator/.idea/gradle.xml
new file mode 100644
index 00000000..639c779c
--- /dev/null
+++ b/KeyboardSimulator/.idea/gradle.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/KeyboardSimulator/.idea/material_theme_project_new.xml b/KeyboardSimulator/.idea/material_theme_project_new.xml
new file mode 100644
index 00000000..da98edc7
--- /dev/null
+++ b/KeyboardSimulator/.idea/material_theme_project_new.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/KeyboardSimulator/.idea/migrations.xml b/KeyboardSimulator/.idea/migrations.xml
new file mode 100644
index 00000000..f8051a6f
--- /dev/null
+++ b/KeyboardSimulator/.idea/migrations.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/KeyboardSimulator/.idea/misc.xml b/KeyboardSimulator/.idea/misc.xml
new file mode 100644
index 00000000..b2c751a3
--- /dev/null
+++ b/KeyboardSimulator/.idea/misc.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/KeyboardSimulator/.idea/runConfigurations.xml b/KeyboardSimulator/.idea/runConfigurations.xml
new file mode 100644
index 00000000..16660f1d
--- /dev/null
+++ b/KeyboardSimulator/.idea/runConfigurations.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/KeyboardSimulator/.idea/vcs.xml b/KeyboardSimulator/.idea/vcs.xml
new file mode 100644
index 00000000..6c0b8635
--- /dev/null
+++ b/KeyboardSimulator/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/KeyboardSimulator/README.md b/KeyboardSimulator/README.md
index 92d7a63b..18319644 100644
--- a/KeyboardSimulator/README.md
+++ b/KeyboardSimulator/README.md
@@ -1,37 +1,4 @@
-## Keyboard Simulator
+# Keyboard Simulator
-Aplikasi Android Sederhana - Keyboard Simulator
-
-## Screen Shoot
-| ![Gambar 1]() | ![Gambar 2]() |
-|:-------------:|:--------------:|
-|Gambar 1:
|Gambar 2:
|
-
-## Environment
-- **Android Gradle**: 8.5.0
-- **Plugins Version**: 8.7
-- **Gradle Version**: 8.0
-- **Java JDK**: 17
-- **Kotlin Version**: 1.9.0
-- **Min SDK**: 21
-- **Target SDK**: 34
-
-## Contributors
-Thanks all contributors for build this repository
-
-```
-Copyright [2021] [The Dictionary of Android Projects]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-```
+--- VERSION ---
+- 1.0.0 : Create APK Project
\ No newline at end of file
diff --git a/KeyboardSimulator/app/build.gradle b/KeyboardSimulator/app/build.gradle
index 41e2b5de..a1e94bac 100644
--- a/KeyboardSimulator/app/build.gradle
+++ b/KeyboardSimulator/app/build.gradle
@@ -1,19 +1,18 @@
plugins {
- id 'com.android.application'
- id 'kotlin-android'
- id 'kotlin-android-extensions'
+ alias(libs.plugins.android.application)
+ alias(libs.plugins.kotlin.android)
}
android {
- compileSdkVersion 30
- buildToolsVersion "30.0.3"
+ namespace 'com.algokelvin.keyboardsimulator'
+ compileSdk 36
defaultConfig {
- applicationId "com.algokelvin.keyboard.simulator"
- minSdkVersion 21
- targetSdkVersion 30
+ applicationId "com.algokelvin.keyboardsimulator"
+ minSdk 24
+ targetSdk 36
versionCode 1
- versionName "1.0"
+ versionName "1.0.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
@@ -25,18 +24,24 @@ android {
}
}
compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
+ sourceCompatibility JavaVersion.VERSION_11
+ targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
- jvmTarget = '1.8'
+ jvmTarget = '11'
+ }
+ buildFeatures {
+ viewBinding = true
}
}
dependencies {
- implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
- implementation 'androidx.core:core-ktx:1.6.0'
- implementation 'androidx.appcompat:appcompat:1.3.1'
- implementation 'com.google.android.material:material:1.4.0'
- implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
+ 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/KeyboardSimulator/app/src/androidTest/java/com/algokelvin/keyboardsimulator/ExampleInstrumentedTest.kt b/KeyboardSimulator/app/src/androidTest/java/com/algokelvin/keyboardsimulator/ExampleInstrumentedTest.kt
new file mode 100644
index 00000000..29380c11
--- /dev/null
+++ b/KeyboardSimulator/app/src/androidTest/java/com/algokelvin/keyboardsimulator/ExampleInstrumentedTest.kt
@@ -0,0 +1,24 @@
+package com.algokelvin.keyboardsimulator
+
+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.algokelvin.keyboardsimulator", appContext.packageName)
+ }
+}
\ No newline at end of file
diff --git a/KeyboardSimulator/app/src/main/AndroidManifest.xml b/KeyboardSimulator/app/src/main/AndroidManifest.xml
index 018c9d8f..609c6a36 100644
--- a/KeyboardSimulator/app/src/main/AndroidManifest.xml
+++ b/KeyboardSimulator/app/src/main/AndroidManifest.xml
@@ -1,28 +1,27 @@
+ xmlns:tools="http://schemas.android.com/tools">
-
+ android:theme="@style/Theme.KeyboardSimulator"
+ tools:targetApi="31">
+
-
-
-
+
\ No newline at end of file
diff --git a/KeyboardSimulator/app/src/main/ic_launcher-playstore.png b/KeyboardSimulator/app/src/main/ic_launcher-playstore.png
new file mode 100644
index 00000000..afeecb3b
Binary files /dev/null and b/KeyboardSimulator/app/src/main/ic_launcher-playstore.png differ
diff --git a/KeyboardSimulator/app/src/main/java/com/algokelvin/keyboard/simulator/MainActivity.kt b/KeyboardSimulator/app/src/main/java/com/algokelvin/keyboard/simulator/MainActivity.kt
deleted file mode 100644
index e31c76a8..00000000
--- a/KeyboardSimulator/app/src/main/java/com/algokelvin/keyboard/simulator/MainActivity.kt
+++ /dev/null
@@ -1,52 +0,0 @@
-package com.algokelvin.keyboard.simulator
-
-import android.os.Bundle
-import android.view.View
-import kotlinx.android.synthetic.main.activity_main.*
-
-class MainActivity : KeyboardController() {
- private var txtOne = ""
- private var txtTwo = ""
-
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- setContentView(R.layout.activity_main)
-
-// setControllerInputData(R.id.first_name)
-// setImgCrossInput(R.id.cross_first_name)
-// setControllerKeyboard()
-// setKeyboardOnClickListener()
-
- cl_first_name.setOnClickListener {
- txtTwo = txtInputData.text.toString()
- setActionTextKeyboardSimulator(
- R.drawable.bg_menu_white,
- R.drawable.bg_menu_grey,
- View.GONE, View.VISIBLE,
- R.id.first_name,
- R.id.cross_first_name
- )
- }
- cl_second_name.setOnClickListener {
- txtOne = txtInputData.text.toString()
- setActionTextKeyboardSimulator(
- R.drawable.bg_menu_grey,
- R.drawable.bg_menu_white,
- View.VISIBLE, View.GONE,
- R.id.second_name,
- R.id.cross_second_name
- )
- }
-
- }
-
- private fun setActionTextKeyboardSimulator(bg1: Int, bg2: Int, v1: Int, v2: Int, txt: Int, cross: Int) {
- cl_second_name.setBackgroundResource(bg1)
- cl_first_name.setBackgroundResource(bg2)
- cross_second_name.visibility = v1
- cross_first_name.visibility = v2
-// setControllerInputData(txt)
-// setImgCrossInput(cross)
- }
-
-}
\ No newline at end of file
diff --git a/KeyboardSimulator/app/src/main/java/com/algokelvin/keyboard/simulator/KeyboardController.java b/KeyboardSimulator/app/src/main/java/com/algokelvin/keyboardsimulator/KeyboardController.java
similarity index 85%
rename from KeyboardSimulator/app/src/main/java/com/algokelvin/keyboard/simulator/KeyboardController.java
rename to KeyboardSimulator/app/src/main/java/com/algokelvin/keyboardsimulator/KeyboardController.java
index a47145ca..7ec278d5 100644
--- a/KeyboardSimulator/app/src/main/java/com/algokelvin/keyboard/simulator/KeyboardController.java
+++ b/KeyboardSimulator/app/src/main/java/com/algokelvin/keyboardsimulator/KeyboardController.java
@@ -1,4 +1,4 @@
-package com.algokelvin.keyboard.simulator;
+package com.algokelvin.keyboardsimulator;
import android.annotation.SuppressLint;
import android.view.View;
@@ -109,34 +109,31 @@ private void setKeyboardOnClickListener() {
@SuppressLint("NonConstantResourceId")
@Override
public void onClick(View view) {
- switch (view.getId()) {
- case R.id.keyBtn_00: addText("0");
- break;
- case R.id.keyBtn_01: addText("1");
- break;
- case R.id.keyBtn_02: addText("2");
- break;
- case R.id.keyBtn_03: addText("3");
- break;
- case R.id.keyBtn_04: addText("4");
- break;
- case R.id.keyBtn_05: addText("5");
- break;
- case R.id.keyBtn_06: addText("6");
- break;
- case R.id.keyBtn_07: addText("7");
- break;
- case R.id.keyBtn_08: addText("8");
- break;
- case R.id.keyBtn_09: addText("9");
- break;
- case R.id.keyBtn_back: removeText(String.valueOf(txtInputData.getText()));
- break;
- case R.id.keyBtn_Cancel:
- finish();
- break;
- default:
- break;
+ int id = view.getId();
+ if (id == R.id.keyBtn_00) {
+ addText("0");
+ } else if (id == R.id.keyBtn_01) {
+ addText("1");
+ } else if (id == R.id.keyBtn_02) {
+ addText("2");
+ } else if (id == R.id.keyBtn_03) {
+ addText("3");
+ } else if (id == R.id.keyBtn_04) {
+ addText("4");
+ } else if (id == R.id.keyBtn_05) {
+ addText("5");
+ } else if (id == R.id.keyBtn_06) {
+ addText("6");
+ } else if (id == R.id.keyBtn_07) {
+ addText("7");
+ } else if (id == R.id.keyBtn_08) {
+ addText("8");
+ } else if (id == R.id.keyBtn_09) {
+ addText("9");
+ } else if (id == R.id.keyBtn_back) {
+ removeText(String.valueOf(txtInputData.getText()));
+ } else if (id == R.id.keyBtn_Cancel) {
+ finish();
}
}
private void addText(String character) {
diff --git a/KeyboardSimulator/app/src/main/java/com/algokelvin/keyboardsimulator/MainActivity.kt b/KeyboardSimulator/app/src/main/java/com/algokelvin/keyboardsimulator/MainActivity.kt
new file mode 100644
index 00000000..b41e537e
--- /dev/null
+++ b/KeyboardSimulator/app/src/main/java/com/algokelvin/keyboardsimulator/MainActivity.kt
@@ -0,0 +1,54 @@
+package com.algokelvin.keyboardsimulator
+
+import android.os.Bundle
+import android.view.View
+import com.algokelvin.keyboardsimulator.databinding.ActivityMainBinding
+
+class MainActivity : KeyboardController() {
+ private lateinit var binding: ActivityMainBinding
+ private var txtOne = ""
+ private var txtTwo = ""
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ binding = ActivityMainBinding.inflate(layoutInflater)
+ setContentView(binding.root)
+
+// setControllerInputData(R.id.first_name)
+// setImgCrossInput(R.id.cross_first_name)
+// setControllerKeyboard()
+// setKeyboardOnClickListener()
+
+ binding.clFirstName.setOnClickListener {
+ txtTwo = txtInputData.text.toString()
+ setActionTextKeyboardSimulator(
+ R.drawable.bg_menu_white,
+ R.drawable.bg_menu_grey,
+ View.GONE, View.VISIBLE,
+ R.id.first_name,
+ R.id.cross_first_name
+ )
+ }
+ binding.clSecondName.setOnClickListener {
+ txtOne = txtInputData.text.toString()
+ setActionTextKeyboardSimulator(
+ R.drawable.bg_menu_grey,
+ R.drawable.bg_menu_white,
+ View.VISIBLE, View.GONE,
+ R.id.second_name,
+ R.id.cross_second_name
+ )
+ }
+
+ }
+
+ private fun setActionTextKeyboardSimulator(bg1: Int, bg2: Int, v1: Int, v2: Int, txt: Int, cross: Int) {
+ binding.clSecondName.setBackgroundResource(bg1)
+ binding.clFirstName.setBackgroundResource(bg2)
+ binding.crossSecondName.visibility = v1
+ binding.crossFirstName.visibility = v2
+// setControllerInputData(txt)
+// setImgCrossInput(cross)
+ }
+
+}
\ No newline at end of file
diff --git a/KeyboardSimulator/app/src/main/java/com/algokelvin/keyboard/simulator/MainJavaActivity.java b/KeyboardSimulator/app/src/main/java/com/algokelvin/keyboardsimulator/MainJavaActivity.java
similarity index 94%
rename from KeyboardSimulator/app/src/main/java/com/algokelvin/keyboard/simulator/MainJavaActivity.java
rename to KeyboardSimulator/app/src/main/java/com/algokelvin/keyboardsimulator/MainJavaActivity.java
index 660267da..acf4f8d7 100644
--- a/KeyboardSimulator/app/src/main/java/com/algokelvin/keyboard/simulator/MainJavaActivity.java
+++ b/KeyboardSimulator/app/src/main/java/com/algokelvin/keyboardsimulator/MainJavaActivity.java
@@ -1,4 +1,4 @@
-package com.algokelvin.keyboard.simulator;
+package com.algokelvin.keyboardsimulator;
import android.os.Bundle;
diff --git a/KeyboardSimulator/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/KeyboardSimulator/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
deleted file mode 100644
index 2b068d11..00000000
--- a/KeyboardSimulator/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/KeyboardSimulator/app/src/main/res/drawable/ic_launcher_background.xml b/KeyboardSimulator/app/src/main/res/drawable/ic_launcher_background.xml
index 07d5da9c..ca3826a4 100644
--- a/KeyboardSimulator/app/src/main/res/drawable/ic_launcher_background.xml
+++ b/KeyboardSimulator/app/src/main/res/drawable/ic_launcher_background.xml
@@ -1,170 +1,74 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ xmlns:android="http://schemas.android.com/apk/res/android">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CameraRotation/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/KeyboardSimulator/app/src/main/res/drawable/ic_launcher_foreground.xml
similarity index 100%
rename from CameraRotation/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
rename to KeyboardSimulator/app/src/main/res/drawable/ic_launcher_foreground.xml
diff --git a/KeyboardSimulator/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/KeyboardSimulator/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
index eca70cfe..c4a603d4 100644
--- a/KeyboardSimulator/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ b/KeyboardSimulator/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -1,5 +1,5 @@
-
-
+
+
\ No newline at end of file
diff --git a/KeyboardSimulator/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/KeyboardSimulator/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
index eca70cfe..c4a603d4 100644
--- a/KeyboardSimulator/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+++ b/KeyboardSimulator/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -1,5 +1,5 @@
-
-
+
+
\ No newline at end of file
diff --git a/KeyboardSimulator/app/src/main/res/mipmap-hdpi/ic_launcher.png b/KeyboardSimulator/app/src/main/res/mipmap-hdpi/ic_launcher.png
deleted file mode 100644
index a571e600..00000000
Binary files a/KeyboardSimulator/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ
diff --git a/KeyboardSimulator/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/KeyboardSimulator/app/src/main/res/mipmap-hdpi/ic_launcher.webp
new file mode 100644
index 00000000..1f4c0d01
Binary files /dev/null and b/KeyboardSimulator/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ
diff --git a/KeyboardSimulator/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp b/KeyboardSimulator/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..7b289835
Binary files /dev/null and b/KeyboardSimulator/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp differ
diff --git a/KeyboardSimulator/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/KeyboardSimulator/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
deleted file mode 100644
index 61da551c..00000000
Binary files a/KeyboardSimulator/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and /dev/null differ
diff --git a/KeyboardSimulator/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/KeyboardSimulator/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
new file mode 100644
index 00000000..1a6ccc46
Binary files /dev/null and b/KeyboardSimulator/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ
diff --git a/KeyboardSimulator/app/src/main/res/mipmap-mdpi/ic_launcher.png b/KeyboardSimulator/app/src/main/res/mipmap-mdpi/ic_launcher.png
deleted file mode 100644
index c41dd285..00000000
Binary files a/KeyboardSimulator/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ
diff --git a/KeyboardSimulator/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/KeyboardSimulator/app/src/main/res/mipmap-mdpi/ic_launcher.webp
new file mode 100644
index 00000000..559e666e
Binary files /dev/null and b/KeyboardSimulator/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ
diff --git a/KeyboardSimulator/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp b/KeyboardSimulator/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..cd0a7975
Binary files /dev/null and b/KeyboardSimulator/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp differ
diff --git a/KeyboardSimulator/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/KeyboardSimulator/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
deleted file mode 100644
index db5080a7..00000000
Binary files a/KeyboardSimulator/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and /dev/null differ
diff --git a/KeyboardSimulator/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/KeyboardSimulator/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
new file mode 100644
index 00000000..617fd9ea
Binary files /dev/null and b/KeyboardSimulator/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ
diff --git a/KeyboardSimulator/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/KeyboardSimulator/app/src/main/res/mipmap-xhdpi/ic_launcher.png
deleted file mode 100644
index 6dba46da..00000000
Binary files a/KeyboardSimulator/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ
diff --git a/KeyboardSimulator/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/KeyboardSimulator/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
new file mode 100644
index 00000000..5efb6422
Binary files /dev/null and b/KeyboardSimulator/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ
diff --git a/KeyboardSimulator/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp b/KeyboardSimulator/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..bcae5e61
Binary files /dev/null and b/KeyboardSimulator/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp differ
diff --git a/KeyboardSimulator/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/KeyboardSimulator/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
deleted file mode 100644
index da31a871..00000000
Binary files a/KeyboardSimulator/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/KeyboardSimulator/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/KeyboardSimulator/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
new file mode 100644
index 00000000..0cb98685
Binary files /dev/null and b/KeyboardSimulator/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ
diff --git a/KeyboardSimulator/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/KeyboardSimulator/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
deleted file mode 100644
index 15ac6817..00000000
Binary files a/KeyboardSimulator/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ
diff --git a/KeyboardSimulator/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/KeyboardSimulator/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
new file mode 100644
index 00000000..ee8d549c
Binary files /dev/null and b/KeyboardSimulator/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ
diff --git a/KeyboardSimulator/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp b/KeyboardSimulator/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..f8f8d033
Binary files /dev/null and b/KeyboardSimulator/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp differ
diff --git a/KeyboardSimulator/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/KeyboardSimulator/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
deleted file mode 100644
index b216f2d3..00000000
Binary files a/KeyboardSimulator/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/KeyboardSimulator/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/KeyboardSimulator/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
new file mode 100644
index 00000000..ef80d15c
Binary files /dev/null and b/KeyboardSimulator/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ
diff --git a/KeyboardSimulator/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/KeyboardSimulator/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
deleted file mode 100644
index f25a4197..00000000
Binary files a/KeyboardSimulator/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ
diff --git a/KeyboardSimulator/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/KeyboardSimulator/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
new file mode 100644
index 00000000..b4e0005b
Binary files /dev/null and b/KeyboardSimulator/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ
diff --git a/KeyboardSimulator/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp b/KeyboardSimulator/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..fed1a6c4
Binary files /dev/null and b/KeyboardSimulator/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp differ
diff --git a/KeyboardSimulator/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/KeyboardSimulator/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
deleted file mode 100644
index e96783cc..00000000
Binary files a/KeyboardSimulator/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/KeyboardSimulator/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/KeyboardSimulator/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
new file mode 100644
index 00000000..31b5df0a
Binary files /dev/null and b/KeyboardSimulator/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ
diff --git a/KeyboardSimulator/app/src/main/res/values-night/themes.xml b/KeyboardSimulator/app/src/main/res/values-night/themes.xml
index 0e033dcf..433823e2 100644
--- a/KeyboardSimulator/app/src/main/res/values-night/themes.xml
+++ b/KeyboardSimulator/app/src/main/res/values-night/themes.xml
@@ -1,16 +1,7 @@
-
\ No newline at end of file
diff --git a/KeyboardSimulator/app/src/main/res/xml/backup_rules.xml b/KeyboardSimulator/app/src/main/res/xml/backup_rules.xml
new file mode 100644
index 00000000..4df92558
--- /dev/null
+++ b/KeyboardSimulator/app/src/main/res/xml/backup_rules.xml
@@ -0,0 +1,13 @@
+
+
+
+
\ No newline at end of file
diff --git a/ECommerce/app/src/main/res/xml/data_extraction_rules.xml b/KeyboardSimulator/app/src/main/res/xml/data_extraction_rules.xml
similarity index 100%
rename from ECommerce/app/src/main/res/xml/data_extraction_rules.xml
rename to KeyboardSimulator/app/src/main/res/xml/data_extraction_rules.xml
diff --git a/KeyboardSimulator/app/src/test/java/com/algokelvin/keyboardsimulator/ExampleUnitTest.kt b/KeyboardSimulator/app/src/test/java/com/algokelvin/keyboardsimulator/ExampleUnitTest.kt
new file mode 100644
index 00000000..cc41ee51
--- /dev/null
+++ b/KeyboardSimulator/app/src/test/java/com/algokelvin/keyboardsimulator/ExampleUnitTest.kt
@@ -0,0 +1,17 @@
+package com.algokelvin.keyboardsimulator
+
+import org.junit.Test
+
+import org.junit.Assert.*
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * See [testing documentation](http://d.android.com/tools/testing).
+ */
+class ExampleUnitTest {
+ @Test
+ fun addition_isCorrect() {
+ assertEquals(4, 2 + 2)
+ }
+}
\ No newline at end of file
diff --git a/KeyboardSimulator/build.gradle b/KeyboardSimulator/build.gradle
index 9b9306b2..5bec31d9 100644
--- a/KeyboardSimulator/build.gradle
+++ b/KeyboardSimulator/build.gradle
@@ -1,30 +1,5 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
-buildscript {
- ext {
- agp_version = '8.5.0'
- }
- ext.kotlin_version = "1.4.32"
- repositories {
- google()
- mavenCentral()
- }
- dependencies {
- classpath "com.android.tools.build:gradle:$agp_version"
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
-
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
- }
-}
-
-allprojects {
- repositories {
- google()
- mavenCentral()
- jcenter() // Warning: this repository is going to shut down soon
- }
-}
-
-task clean(type: Delete) {
- delete rootProject.buildDir
+plugins {
+alias(libs.plugins.android.application) apply false
+ alias(libs.plugins.kotlin.android) apply false
}
\ No newline at end of file
diff --git a/KeyboardSimulator/gradle.properties b/KeyboardSimulator/gradle.properties
index 25217527..20e2a015 100644
--- a/KeyboardSimulator/gradle.properties
+++ b/KeyboardSimulator/gradle.properties
@@ -8,12 +8,16 @@
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
-# This option should only be used with decoupled projects. More details, visit
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# This option should only be used with decoupled projects. For more details, visit
+# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
-# Android operating system, and which are packaged with your app"s APK
+# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Kotlin code style for this project: "official" or "obsolete":
-kotlin.code.style=official
\ No newline at end of file
+kotlin.code.style=official
+# Enables namespacing of each library's R class so that its R class includes only the
+# resources declared in the library itself and none from the library's dependencies,
+# thereby reducing the size of the R class for that library
+android.nonTransitiveRClass=true
\ No newline at end of file
diff --git a/KeyboardSimulator/gradle/libs.versions.toml b/KeyboardSimulator/gradle/libs.versions.toml
new file mode 100644
index 00000000..6b7dabb4
--- /dev/null
+++ b/KeyboardSimulator/gradle/libs.versions.toml
@@ -0,0 +1,26 @@
+[versions]
+agp = "8.10.1"
+kotlin = "2.0.21"
+coreKtx = "1.17.0"
+junit = "4.13.2"
+junitVersion = "1.3.0"
+espressoCore = "3.7.0"
+appcompat = "1.7.1"
+material = "1.13.0"
+activity = "1.10.1"
+constraintlayout = "2.2.1"
+
+[libraries]
+androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
+junit = { group = "junit", name = "junit", version.ref = "junit" }
+androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
+androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
+androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
+material = { group = "com.google.android.material", name = "material", version.ref = "material" }
+androidx-activity = { group = "androidx.activity", name = "activity", version.ref = "activity" }
+androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
+
+[plugins]
+android-application = { id = "com.android.application", version.ref = "agp" }
+kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
+
diff --git a/KeyboardSimulator/gradle/wrapper/gradle-wrapper.jar b/KeyboardSimulator/gradle/wrapper/gradle-wrapper.jar
index f6b961fd..e708b1c0 100644
Binary files a/KeyboardSimulator/gradle/wrapper/gradle-wrapper.jar and b/KeyboardSimulator/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/KeyboardSimulator/gradle/wrapper/gradle-wrapper.properties b/KeyboardSimulator/gradle/wrapper/gradle-wrapper.properties
index e6b461f9..41d4bae5 100644
--- a/KeyboardSimulator/gradle/wrapper/gradle-wrapper.properties
+++ b/KeyboardSimulator/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Mon Feb 24 05:37:03 WIB 2025
+#Sat Sep 06 23:51:10 WIB 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/KeyboardSimulator/gradlew b/KeyboardSimulator/gradlew
index cccdd3d5..4f906e0c 100644
--- a/KeyboardSimulator/gradlew
+++ b/KeyboardSimulator/gradlew
@@ -1,5 +1,21 @@
#!/usr/bin/env sh
+#
+# Copyright 2015 the original author or authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
##############################################################################
##
## Gradle start up script for UN*X
@@ -28,7 +44,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
@@ -66,6 +82,7 @@ esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
@@ -109,10 +126,11 @@ if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
@@ -138,19 +156,19 @@ if $cygwin ; then
else
eval `echo args$i`="\"$arg\""
fi
- i=$((i+1))
+ i=`expr $i + 1`
done
case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ 0) set -- ;;
+ 1) set -- "$args0" ;;
+ 2) set -- "$args0" "$args1" ;;
+ 3) set -- "$args0" "$args1" "$args2" ;;
+ 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
@@ -159,14 +177,9 @@ save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
-APP_ARGS=$(save "$@")
+APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
-if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
- cd "$(dirname "$0")"
-fi
-
exec "$JAVACMD" "$@"
diff --git a/KeyboardSimulator/gradlew.bat b/KeyboardSimulator/gradlew.bat
index f9553162..107acd32 100644
--- a/KeyboardSimulator/gradlew.bat
+++ b/KeyboardSimulator/gradlew.bat
@@ -1,3 +1,19 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@@ -13,15 +29,18 @@ if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
+if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -35,7 +54,7 @@ goto fail
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-if exist "%JAVA_EXE%" goto init
+if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
@@ -45,28 +64,14 @@ echo location of your Java installation.
goto fail
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
diff --git a/KeyboardSimulator/settings.gradle b/KeyboardSimulator/settings.gradle
index 42284c99..4d840a5c 100644
--- a/KeyboardSimulator/settings.gradle
+++ b/KeyboardSimulator/settings.gradle
@@ -1,2 +1,23 @@
+pluginManagement {
+ repositories {
+ google {
+ content {
+ includeGroupByRegex("com\\.android.*")
+ includeGroupByRegex("com\\.google.*")
+ includeGroupByRegex("androidx.*")
+ }
+ }
+ mavenCentral()
+ gradlePluginPortal()
+ }
+}
+dependencyResolutionManagement {
+ repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
+ repositories {
+ google()
+ mavenCentral()
+ }
+}
+
rootProject.name = "KeyboardSimulator"
include ':app'
diff --git a/LanguageChangeOne/README.md b/LanguageChangeOne/README.md
index 0b8e82b2..4188346b 100644
--- a/LanguageChangeOne/README.md
+++ b/LanguageChangeOne/README.md
@@ -1,11 +1,9 @@
-## Enable Disable Button
+## Language Change
|  |  |  |
|:--------------------------------------------------------:|:--------------------------------------------------------:|:--------------------------------------------------------:|
| Gambar 1: In Japanese Language | Gambar 2: In Indonesian Language | Gambar 3: In English Language |
-## Implementation
-- Nothing
## Environment
diff --git a/LanguageChangeOne/app/build.gradle b/LanguageChangeOne/app/build.gradle
index 6967f807..fadea958 100644
--- a/LanguageChangeOne/app/build.gradle
+++ b/LanguageChangeOne/app/build.gradle
@@ -4,6 +4,7 @@ plugins {
}
android {
+ namespace "algokelvin.app.languagechangeone"
compileSdk 34
defaultConfig {
@@ -11,7 +12,7 @@ android {
minSdk 21
targetSdk 34
versionCode 1
- versionName "1.0"
+ versionName "1.0.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
diff --git a/LanguageChangeOne/app/src/main/ic_launcher-playstore.png b/LanguageChangeOne/app/src/main/ic_launcher-playstore.png
new file mode 100644
index 00000000..afeecb3b
Binary files /dev/null and b/LanguageChangeOne/app/src/main/ic_launcher-playstore.png differ
diff --git a/LanguageChangeOne/app/src/main/res/drawable/ic_launcher_background.xml b/LanguageChangeOne/app/src/main/res/drawable/ic_launcher_background.xml
index 07d5da9c..ca3826a4 100644
--- a/LanguageChangeOne/app/src/main/res/drawable/ic_launcher_background.xml
+++ b/LanguageChangeOne/app/src/main/res/drawable/ic_launcher_background.xml
@@ -1,170 +1,74 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ xmlns:android="http://schemas.android.com/apk/res/android">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/LanguageChangeOne/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/LanguageChangeOne/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
index eca70cfe..c4a603d4 100644
--- a/LanguageChangeOne/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ b/LanguageChangeOne/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -1,5 +1,5 @@
-
-
+
+
\ No newline at end of file
diff --git a/LanguageChangeOne/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/LanguageChangeOne/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
index eca70cfe..c4a603d4 100644
--- a/LanguageChangeOne/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+++ b/LanguageChangeOne/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -1,5 +1,5 @@
-
-
+
+
\ No newline at end of file
diff --git a/LanguageChangeOne/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/LanguageChangeOne/app/src/main/res/mipmap-hdpi/ic_launcher.webp
index c209e78e..1f4c0d01 100644
Binary files a/LanguageChangeOne/app/src/main/res/mipmap-hdpi/ic_launcher.webp and b/LanguageChangeOne/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ
diff --git a/LanguageChangeOne/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp b/LanguageChangeOne/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..7b289835
Binary files /dev/null and b/LanguageChangeOne/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp differ
diff --git a/LanguageChangeOne/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/LanguageChangeOne/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
index b2dfe3d1..1a6ccc46 100644
Binary files a/LanguageChangeOne/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp and b/LanguageChangeOne/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ
diff --git a/LanguageChangeOne/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/LanguageChangeOne/app/src/main/res/mipmap-mdpi/ic_launcher.webp
index 4f0f1d64..559e666e 100644
Binary files a/LanguageChangeOne/app/src/main/res/mipmap-mdpi/ic_launcher.webp and b/LanguageChangeOne/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ
diff --git a/LanguageChangeOne/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp b/LanguageChangeOne/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..cd0a7975
Binary files /dev/null and b/LanguageChangeOne/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp differ
diff --git a/LanguageChangeOne/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/LanguageChangeOne/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
index 62b611da..617fd9ea 100644
Binary files a/LanguageChangeOne/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp and b/LanguageChangeOne/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ
diff --git a/LanguageChangeOne/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/LanguageChangeOne/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
index 948a3070..5efb6422 100644
Binary files a/LanguageChangeOne/app/src/main/res/mipmap-xhdpi/ic_launcher.webp and b/LanguageChangeOne/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ
diff --git a/LanguageChangeOne/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp b/LanguageChangeOne/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..bcae5e61
Binary files /dev/null and b/LanguageChangeOne/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp differ
diff --git a/LanguageChangeOne/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/LanguageChangeOne/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
index 1b9a6956..0cb98685 100644
Binary files a/LanguageChangeOne/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp and b/LanguageChangeOne/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ
diff --git a/LanguageChangeOne/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/LanguageChangeOne/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
index 28d4b77f..ee8d549c 100644
Binary files a/LanguageChangeOne/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp and b/LanguageChangeOne/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ
diff --git a/LanguageChangeOne/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp b/LanguageChangeOne/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..f8f8d033
Binary files /dev/null and b/LanguageChangeOne/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp differ
diff --git a/LanguageChangeOne/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/LanguageChangeOne/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
index 9287f508..ef80d15c 100644
Binary files a/LanguageChangeOne/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp and b/LanguageChangeOne/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ
diff --git a/LanguageChangeOne/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/LanguageChangeOne/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
index aa7d6427..b4e0005b 100644
Binary files a/LanguageChangeOne/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp and b/LanguageChangeOne/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ
diff --git a/LanguageChangeOne/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp b/LanguageChangeOne/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..fed1a6c4
Binary files /dev/null and b/LanguageChangeOne/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp differ
diff --git a/LanguageChangeOne/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/LanguageChangeOne/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
index 9126ae37..31b5df0a 100644
Binary files a/LanguageChangeOne/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp and b/LanguageChangeOne/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ
diff --git a/LanguageChangeOne/build.gradle b/LanguageChangeOne/build.gradle
index a689b8c3..ea6e7bf9 100644
--- a/LanguageChangeOne/build.gradle
+++ b/LanguageChangeOne/build.gradle
@@ -1,10 +1,10 @@
buildscript {
ext {
- agp_version = '8.5.0'
+ agp_version = '8.10.1'
}
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
- id 'com.android.application' version '8.5.0' apply false
+ id 'com.android.application' version '8.10.1' apply false
id 'com.android.library' version '7.2.2' apply false
id 'org.jetbrains.kotlin.android' version '1.8.0' apply false
}
diff --git a/LanguageChangeOne/gradle/wrapper/gradle-wrapper.properties b/LanguageChangeOne/gradle/wrapper/gradle-wrapper.properties
index 111664a1..756e0825 100644
--- a/LanguageChangeOne/gradle/wrapper/gradle-wrapper.properties
+++ b/LanguageChangeOne/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Mon Feb 24 05:37:56 WIB 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/CameraRotation/.gitignore b/LayerMapGoogle/.gitignore
similarity index 100%
rename from CameraRotation/.gitignore
rename to LayerMapGoogle/.gitignore
diff --git a/LayerMapGoogle/README.md b/LayerMapGoogle/README.md
new file mode 100644
index 00000000..d9656e5f
--- /dev/null
+++ b/LayerMapGoogle/README.md
@@ -0,0 +1,4 @@
+# Layer Map Google
+
+--- VERSION ---
+- 1.0.0 : Create APK Project
\ No newline at end of file
diff --git a/CalculatorCompose/app/.gitignore b/LayerMapGoogle/app/.gitignore
similarity index 100%
rename from CalculatorCompose/app/.gitignore
rename to LayerMapGoogle/app/.gitignore
diff --git a/LayerMapGoogle/app/build.gradle b/LayerMapGoogle/app/build.gradle
new file mode 100644
index 00000000..8412beb2
--- /dev/null
+++ b/LayerMapGoogle/app/build.gradle
@@ -0,0 +1,42 @@
+plugins {
+ alias(libs.plugins.android.application)
+ id "com.google.secrets_gradle_plugin" version "0.4"
+}
+
+android {
+ namespace 'com.algokelvin.layermapgoogle'
+ compileSdk 34
+
+ defaultConfig {
+ applicationId "com.algokelvin.layermapgoogle"
+ minSdk 24
+ targetSdk 34
+ versionCode 1
+ versionName "1.0.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 libs.appcompat
+ implementation libs.material
+ implementation libs.activity
+ implementation libs.constraintlayout
+ testImplementation libs.junit
+ androidTestImplementation libs.ext.junit
+ androidTestImplementation libs.espresso.core
+}
\ No newline at end of file
diff --git a/CalculatorCompose/app/proguard-rules.pro b/LayerMapGoogle/app/proguard-rules.pro
similarity index 100%
rename from CalculatorCompose/app/proguard-rules.pro
rename to LayerMapGoogle/app/proguard-rules.pro
diff --git a/LayerMapGoogleTrain/app/src/androidTest/java/com/algokelvin/layermapgoogle/ExampleInstrumentedTest.java b/LayerMapGoogle/app/src/androidTest/java/com/algokelvin/layermapgoogle/ExampleInstrumentedTest.java
similarity index 100%
rename from LayerMapGoogleTrain/app/src/androidTest/java/com/algokelvin/layermapgoogle/ExampleInstrumentedTest.java
rename to LayerMapGoogle/app/src/androidTest/java/com/algokelvin/layermapgoogle/ExampleInstrumentedTest.java
diff --git a/LayerMapGoogleTrain/app/src/main/AndroidManifest.xml b/LayerMapGoogle/app/src/main/AndroidManifest.xml
similarity index 100%
rename from LayerMapGoogleTrain/app/src/main/AndroidManifest.xml
rename to LayerMapGoogle/app/src/main/AndroidManifest.xml
diff --git a/LayerMapGoogle/app/src/main/ic_launcher-playstore.png b/LayerMapGoogle/app/src/main/ic_launcher-playstore.png
new file mode 100644
index 00000000..afeecb3b
Binary files /dev/null and b/LayerMapGoogle/app/src/main/ic_launcher-playstore.png differ
diff --git a/LayerMapGoogleTrain/app/src/main/java/com/algokelvin/layermapgoogle/MainActivity.java b/LayerMapGoogle/app/src/main/java/com/algokelvin/layermapgoogle/MainActivity.java
similarity index 100%
rename from LayerMapGoogleTrain/app/src/main/java/com/algokelvin/layermapgoogle/MainActivity.java
rename to LayerMapGoogle/app/src/main/java/com/algokelvin/layermapgoogle/MainActivity.java
diff --git a/LayerMapGoogleTrain/app/src/main/java/com/algokelvin/layermapgoogle/utils/SecretApplication.java b/LayerMapGoogle/app/src/main/java/com/algokelvin/layermapgoogle/utils/SecretApplication.java
similarity index 100%
rename from LayerMapGoogleTrain/app/src/main/java/com/algokelvin/layermapgoogle/utils/SecretApplication.java
rename to LayerMapGoogle/app/src/main/java/com/algokelvin/layermapgoogle/utils/SecretApplication.java
diff --git a/LayerMapGoogle/app/src/main/res/drawable/ic_launcher_background.xml b/LayerMapGoogle/app/src/main/res/drawable/ic_launcher_background.xml
new file mode 100644
index 00000000..ca3826a4
--- /dev/null
+++ b/LayerMapGoogle/app/src/main/res/drawable/ic_launcher_background.xml
@@ -0,0 +1,74 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CleanArchitectureMVVM/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/LayerMapGoogle/app/src/main/res/drawable/ic_launcher_foreground.xml
similarity index 100%
rename from CleanArchitectureMVVM/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
rename to LayerMapGoogle/app/src/main/res/drawable/ic_launcher_foreground.xml
diff --git a/ImageText/app/src/main/res/layout/activity_main.xml b/LayerMapGoogle/app/src/main/res/layout/activity_main.xml
similarity index 100%
rename from ImageText/app/src/main/res/layout/activity_main.xml
rename to LayerMapGoogle/app/src/main/res/layout/activity_main.xml
diff --git a/LayerMapGoogle/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/LayerMapGoogle/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 00000000..c4a603d4
--- /dev/null
+++ b/LayerMapGoogle/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/LayerMapGoogle/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/LayerMapGoogle/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
new file mode 100644
index 00000000..c4a603d4
--- /dev/null
+++ b/LayerMapGoogle/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/LayerMapGoogle/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/LayerMapGoogle/app/src/main/res/mipmap-hdpi/ic_launcher.webp
new file mode 100644
index 00000000..1f4c0d01
Binary files /dev/null and b/LayerMapGoogle/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ
diff --git a/LayerMapGoogle/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp b/LayerMapGoogle/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..7b289835
Binary files /dev/null and b/LayerMapGoogle/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp differ
diff --git a/LayerMapGoogle/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/LayerMapGoogle/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
new file mode 100644
index 00000000..1a6ccc46
Binary files /dev/null and b/LayerMapGoogle/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ
diff --git a/LayerMapGoogle/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/LayerMapGoogle/app/src/main/res/mipmap-mdpi/ic_launcher.webp
new file mode 100644
index 00000000..559e666e
Binary files /dev/null and b/LayerMapGoogle/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ
diff --git a/LayerMapGoogle/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp b/LayerMapGoogle/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..cd0a7975
Binary files /dev/null and b/LayerMapGoogle/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp differ
diff --git a/LayerMapGoogle/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/LayerMapGoogle/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
new file mode 100644
index 00000000..617fd9ea
Binary files /dev/null and b/LayerMapGoogle/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ
diff --git a/LayerMapGoogle/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/LayerMapGoogle/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
new file mode 100644
index 00000000..5efb6422
Binary files /dev/null and b/LayerMapGoogle/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ
diff --git a/LayerMapGoogle/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp b/LayerMapGoogle/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..bcae5e61
Binary files /dev/null and b/LayerMapGoogle/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp differ
diff --git a/LayerMapGoogle/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/LayerMapGoogle/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
new file mode 100644
index 00000000..0cb98685
Binary files /dev/null and b/LayerMapGoogle/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ
diff --git a/LayerMapGoogle/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/LayerMapGoogle/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
new file mode 100644
index 00000000..ee8d549c
Binary files /dev/null and b/LayerMapGoogle/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ
diff --git a/LayerMapGoogle/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp b/LayerMapGoogle/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..f8f8d033
Binary files /dev/null and b/LayerMapGoogle/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp differ
diff --git a/LayerMapGoogle/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/LayerMapGoogle/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
new file mode 100644
index 00000000..ef80d15c
Binary files /dev/null and b/LayerMapGoogle/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ
diff --git a/LayerMapGoogle/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/LayerMapGoogle/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
new file mode 100644
index 00000000..b4e0005b
Binary files /dev/null and b/LayerMapGoogle/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ
diff --git a/LayerMapGoogle/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp b/LayerMapGoogle/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..fed1a6c4
Binary files /dev/null and b/LayerMapGoogle/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp differ
diff --git a/LayerMapGoogle/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/LayerMapGoogle/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
new file mode 100644
index 00000000..31b5df0a
Binary files /dev/null and b/LayerMapGoogle/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ
diff --git a/LayerMapGoogleTrain/app/src/main/res/values-night/themes.xml b/LayerMapGoogle/app/src/main/res/values-night/themes.xml
similarity index 100%
rename from LayerMapGoogleTrain/app/src/main/res/values-night/themes.xml
rename to LayerMapGoogle/app/src/main/res/values-night/themes.xml
diff --git a/LayerMapGoogleTrain/app/src/main/res/values/colors.xml b/LayerMapGoogle/app/src/main/res/values/colors.xml
similarity index 100%
rename from LayerMapGoogleTrain/app/src/main/res/values/colors.xml
rename to LayerMapGoogle/app/src/main/res/values/colors.xml
diff --git a/LayerMapGoogleTrain/app/src/main/res/values/strings.xml b/LayerMapGoogle/app/src/main/res/values/strings.xml
similarity index 100%
rename from LayerMapGoogleTrain/app/src/main/res/values/strings.xml
rename to LayerMapGoogle/app/src/main/res/values/strings.xml
diff --git a/LayerMapGoogleTrain/app/src/main/res/values/themes.xml b/LayerMapGoogle/app/src/main/res/values/themes.xml
similarity index 100%
rename from LayerMapGoogleTrain/app/src/main/res/values/themes.xml
rename to LayerMapGoogle/app/src/main/res/values/themes.xml
diff --git a/CalculatorCompose/app/src/main/res/xml/backup_rules.xml b/LayerMapGoogle/app/src/main/res/xml/backup_rules.xml
similarity index 100%
rename from CalculatorCompose/app/src/main/res/xml/backup_rules.xml
rename to LayerMapGoogle/app/src/main/res/xml/backup_rules.xml
diff --git a/GalleryCompose/app/src/main/res/xml/data_extraction_rules.xml b/LayerMapGoogle/app/src/main/res/xml/data_extraction_rules.xml
similarity index 100%
rename from GalleryCompose/app/src/main/res/xml/data_extraction_rules.xml
rename to LayerMapGoogle/app/src/main/res/xml/data_extraction_rules.xml
diff --git a/LayerMapGoogleTrain/app/src/test/java/com/algokelvin/layermapgoogle/ExampleUnitTest.java b/LayerMapGoogle/app/src/test/java/com/algokelvin/layermapgoogle/ExampleUnitTest.java
similarity index 100%
rename from LayerMapGoogleTrain/app/src/test/java/com/algokelvin/layermapgoogle/ExampleUnitTest.java
rename to LayerMapGoogle/app/src/test/java/com/algokelvin/layermapgoogle/ExampleUnitTest.java
diff --git a/LayerMapGoogleTrain/build.gradle b/LayerMapGoogle/build.gradle
similarity index 100%
rename from LayerMapGoogleTrain/build.gradle
rename to LayerMapGoogle/build.gradle
diff --git a/LayerMapGoogleTrain/gradle.properties b/LayerMapGoogle/gradle.properties
similarity index 100%
rename from LayerMapGoogleTrain/gradle.properties
rename to LayerMapGoogle/gradle.properties
diff --git a/LayerMapGoogle/gradle/libs.versions.toml b/LayerMapGoogle/gradle/libs.versions.toml
new file mode 100644
index 00000000..f3eb8cb7
--- /dev/null
+++ b/LayerMapGoogle/gradle/libs.versions.toml
@@ -0,0 +1,22 @@
+[versions]
+agp = "8.10.1"
+junit = "4.13.2"
+junitVersion = "1.2.1"
+espressoCore = "3.6.1"
+appcompat = "1.7.0"
+material = "1.12.0"
+activity = "1.9.1"
+constraintlayout = "2.1.4"
+
+[libraries]
+junit = { group = "junit", name = "junit", version.ref = "junit" }
+ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
+espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
+appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
+material = { group = "com.google.android.material", name = "material", version.ref = "material" }
+activity = { group = "androidx.activity", name = "activity", version.ref = "activity" }
+constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
+
+[plugins]
+android-application = { id = "com.android.application", version.ref = "agp" }
+
diff --git a/ECommerce/gradle/wrapper/gradle-wrapper.jar b/LayerMapGoogle/gradle/wrapper/gradle-wrapper.jar
similarity index 100%
rename from ECommerce/gradle/wrapper/gradle-wrapper.jar
rename to LayerMapGoogle/gradle/wrapper/gradle-wrapper.jar
diff --git a/LayerMapGoogle/gradle/wrapper/gradle-wrapper.properties b/LayerMapGoogle/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 00000000..1073b4d6
--- /dev/null
+++ b/LayerMapGoogle/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Fri Aug 23 20:54:45 WIB 2024
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/ECommerce/gradlew b/LayerMapGoogle/gradlew
similarity index 100%
rename from ECommerce/gradlew
rename to LayerMapGoogle/gradlew
diff --git a/ECommerce/gradlew.bat b/LayerMapGoogle/gradlew.bat
similarity index 100%
rename from ECommerce/gradlew.bat
rename to LayerMapGoogle/gradlew.bat
diff --git a/LayerMapGoogleTrain/settings.gradle b/LayerMapGoogle/settings.gradle
similarity index 100%
rename from LayerMapGoogleTrain/settings.gradle
rename to LayerMapGoogle/settings.gradle
diff --git a/LayerMapGoogleTrain/.gitignore b/LayerMapGoogleTrain/.gitignore
deleted file mode 100644
index aa724b77..00000000
--- a/LayerMapGoogleTrain/.gitignore
+++ /dev/null
@@ -1,15 +0,0 @@
-*.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/LayerMapGoogleTrain/app/.gitignore b/LayerMapGoogleTrain/app/.gitignore
deleted file mode 100644
index 42afabfd..00000000
--- a/LayerMapGoogleTrain/app/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build
\ No newline at end of file
diff --git a/LayerMapGoogleTrain/app/build.gradle b/LayerMapGoogleTrain/app/build.gradle
deleted file mode 100644
index 31c19e72..00000000
--- a/LayerMapGoogleTrain/app/build.gradle
+++ /dev/null
@@ -1,42 +0,0 @@
-plugins {
- alias(libs.plugins.android.application)
- id "com.google.secrets_gradle_plugin" version "0.4"
-}
-
-android {
- namespace 'com.algokelvin.layermapgoogle'
- compileSdk 34
-
- defaultConfig {
- applicationId "com.algokelvin.layermapgoogle"
- minSdk 24
- targetSdk 34
- 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 libs.appcompat
- implementation libs.material
- implementation libs.activity
- implementation libs.constraintlayout
- testImplementation libs.junit
- androidTestImplementation libs.ext.junit
- androidTestImplementation libs.espresso.core
-}
\ No newline at end of file
diff --git a/LayerMapGoogleTrain/app/proguard-rules.pro b/LayerMapGoogleTrain/app/proguard-rules.pro
deleted file mode 100644
index 481bb434..00000000
--- a/LayerMapGoogleTrain/app/proguard-rules.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# 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/LayerMapGoogleTrain/app/src/main/res/drawable/ic_launcher_background.xml b/LayerMapGoogleTrain/app/src/main/res/drawable/ic_launcher_background.xml
deleted file mode 100644
index 07d5da9c..00000000
--- a/LayerMapGoogleTrain/app/src/main/res/drawable/ic_launcher_background.xml
+++ /dev/null
@@ -1,170 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/LayerMapGoogleTrain/app/src/main/res/drawable/ic_launcher_foreground.xml b/LayerMapGoogleTrain/app/src/main/res/drawable/ic_launcher_foreground.xml
deleted file mode 100644
index 2b068d11..00000000
--- a/LayerMapGoogleTrain/app/src/main/res/drawable/ic_launcher_foreground.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/LayerMapGoogleTrain/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/LayerMapGoogleTrain/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
deleted file mode 100644
index 6f3b755b..00000000
--- a/LayerMapGoogleTrain/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/LayerMapGoogleTrain/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/LayerMapGoogleTrain/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
deleted file mode 100644
index 6f3b755b..00000000
--- a/LayerMapGoogleTrain/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/LayerMapGoogleTrain/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/LayerMapGoogleTrain/app/src/main/res/mipmap-hdpi/ic_launcher.webp
deleted file mode 100644
index c209e78e..00000000
Binary files a/LayerMapGoogleTrain/app/src/main/res/mipmap-hdpi/ic_launcher.webp and /dev/null differ
diff --git a/LayerMapGoogleTrain/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/LayerMapGoogleTrain/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
deleted file mode 100644
index b2dfe3d1..00000000
Binary files a/LayerMapGoogleTrain/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/LayerMapGoogleTrain/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/LayerMapGoogleTrain/app/src/main/res/mipmap-mdpi/ic_launcher.webp
deleted file mode 100644
index 4f0f1d64..00000000
Binary files a/LayerMapGoogleTrain/app/src/main/res/mipmap-mdpi/ic_launcher.webp and /dev/null differ
diff --git a/LayerMapGoogleTrain/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/LayerMapGoogleTrain/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
deleted file mode 100644
index 62b611da..00000000
Binary files a/LayerMapGoogleTrain/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/LayerMapGoogleTrain/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/LayerMapGoogleTrain/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
deleted file mode 100644
index 948a3070..00000000
Binary files a/LayerMapGoogleTrain/app/src/main/res/mipmap-xhdpi/ic_launcher.webp and /dev/null differ
diff --git a/LayerMapGoogleTrain/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/LayerMapGoogleTrain/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
deleted file mode 100644
index 1b9a6956..00000000
Binary files a/LayerMapGoogleTrain/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/LayerMapGoogleTrain/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/LayerMapGoogleTrain/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
deleted file mode 100644
index 28d4b77f..00000000
Binary files a/LayerMapGoogleTrain/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp and /dev/null differ
diff --git a/LayerMapGoogleTrain/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/LayerMapGoogleTrain/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
deleted file mode 100644
index 9287f508..00000000
Binary files a/LayerMapGoogleTrain/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/LayerMapGoogleTrain/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/LayerMapGoogleTrain/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
deleted file mode 100644
index aa7d6427..00000000
Binary files a/LayerMapGoogleTrain/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp and /dev/null differ
diff --git a/LayerMapGoogleTrain/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/LayerMapGoogleTrain/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
deleted file mode 100644
index 9126ae37..00000000
Binary files a/LayerMapGoogleTrain/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/LayerMapGoogleTrain/app/src/main/res/xml/backup_rules.xml b/LayerMapGoogleTrain/app/src/main/res/xml/backup_rules.xml
deleted file mode 100644
index fa0f996d..00000000
--- a/LayerMapGoogleTrain/app/src/main/res/xml/backup_rules.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/LayerMapGoogleTrain/gradle/libs.versions.toml b/LayerMapGoogleTrain/gradle/libs.versions.toml
deleted file mode 100644
index cea7d6d0..00000000
--- a/LayerMapGoogleTrain/gradle/libs.versions.toml
+++ /dev/null
@@ -1,22 +0,0 @@
-[versions]
-agp = "8.5.0"
-junit = "4.13.2"
-junitVersion = "1.2.1"
-espressoCore = "3.6.1"
-appcompat = "1.7.0"
-material = "1.12.0"
-activity = "1.9.1"
-constraintlayout = "2.1.4"
-
-[libraries]
-junit = { group = "junit", name = "junit", version.ref = "junit" }
-ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
-material = { group = "com.google.android.material", name = "material", version.ref = "material" }
-activity = { group = "androidx.activity", name = "activity", version.ref = "activity" }
-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
-
-[plugins]
-android-application = { id = "com.android.application", version.ref = "agp" }
-
diff --git a/LayerMapGoogleTrain/gradle/wrapper/gradle-wrapper.properties b/LayerMapGoogleTrain/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 4f9cd6ad..00000000
--- a/LayerMapGoogleTrain/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Fri Aug 23 20:54:45 WIB 2024
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
diff --git a/LoginPlayOpenSource/.gitignore b/LoginPlayOpenSource/.gitignore
index aa724b77..878c2cd5 100644
--- a/LoginPlayOpenSource/.gitignore
+++ b/LoginPlayOpenSource/.gitignore
@@ -1,12 +1,7 @@
*.iml
.gradle
/local.properties
-/.idea/caches
-/.idea/libraries
-/.idea/modules.xml
-/.idea/workspace.xml
-/.idea/navEditor.xml
-/.idea/assetWizardSettings.xml
+.idea
.DS_Store
/build
/captures
diff --git a/LoginPlayOpenSource/README.md b/LoginPlayOpenSource/README.md
new file mode 100644
index 00000000..a6d90b30
--- /dev/null
+++ b/LoginPlayOpenSource/README.md
@@ -0,0 +1,4 @@
+# Login Play
+
+--- VERSION ---
+- 1.0.0 : Create APK Project
\ No newline at end of file
diff --git a/LoginPlayOpenSource/app/build.gradle b/LoginPlayOpenSource/app/build.gradle
index 05206edd..f3a98d6c 100644
--- a/LoginPlayOpenSource/app/build.gradle
+++ b/LoginPlayOpenSource/app/build.gradle
@@ -12,7 +12,7 @@ android {
minSdk 24
targetSdk 34
versionCode 1
- versionName "1.0"
+ versionName "1.0.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
diff --git a/LoginPlayOpenSource/app/src/main/ic_launcher-playstore.png b/LoginPlayOpenSource/app/src/main/ic_launcher-playstore.png
new file mode 100644
index 00000000..afeecb3b
Binary files /dev/null and b/LoginPlayOpenSource/app/src/main/ic_launcher-playstore.png differ
diff --git a/LoginPlayOpenSource/app/src/main/res/drawable/ic_launcher_background.xml b/LoginPlayOpenSource/app/src/main/res/drawable/ic_launcher_background.xml
index 07d5da9c..ca3826a4 100644
--- a/LoginPlayOpenSource/app/src/main/res/drawable/ic_launcher_background.xml
+++ b/LoginPlayOpenSource/app/src/main/res/drawable/ic_launcher_background.xml
@@ -1,170 +1,74 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ xmlns:android="http://schemas.android.com/apk/res/android">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/LoginPlayOpenSource/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/LoginPlayOpenSource/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
index 6f3b755b..c4a603d4 100644
--- a/LoginPlayOpenSource/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ b/LoginPlayOpenSource/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -1,6 +1,5 @@
-
-
-
+
+
\ No newline at end of file
diff --git a/LoginPlayOpenSource/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/LoginPlayOpenSource/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
index 6f3b755b..c4a603d4 100644
--- a/LoginPlayOpenSource/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+++ b/LoginPlayOpenSource/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -1,6 +1,5 @@
-
-
-
+
+
\ No newline at end of file
diff --git a/LoginPlayOpenSource/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/LoginPlayOpenSource/app/src/main/res/mipmap-hdpi/ic_launcher.webp
index c209e78e..1f4c0d01 100644
Binary files a/LoginPlayOpenSource/app/src/main/res/mipmap-hdpi/ic_launcher.webp and b/LoginPlayOpenSource/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ
diff --git a/LoginPlayOpenSource/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp b/LoginPlayOpenSource/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..7b289835
Binary files /dev/null and b/LoginPlayOpenSource/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp differ
diff --git a/LoginPlayOpenSource/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/LoginPlayOpenSource/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
index b2dfe3d1..1a6ccc46 100644
Binary files a/LoginPlayOpenSource/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp and b/LoginPlayOpenSource/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ
diff --git a/LoginPlayOpenSource/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/LoginPlayOpenSource/app/src/main/res/mipmap-mdpi/ic_launcher.webp
index 4f0f1d64..559e666e 100644
Binary files a/LoginPlayOpenSource/app/src/main/res/mipmap-mdpi/ic_launcher.webp and b/LoginPlayOpenSource/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ
diff --git a/LoginPlayOpenSource/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp b/LoginPlayOpenSource/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..cd0a7975
Binary files /dev/null and b/LoginPlayOpenSource/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp differ
diff --git a/LoginPlayOpenSource/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/LoginPlayOpenSource/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
index 62b611da..617fd9ea 100644
Binary files a/LoginPlayOpenSource/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp and b/LoginPlayOpenSource/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ
diff --git a/LoginPlayOpenSource/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/LoginPlayOpenSource/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
index 948a3070..5efb6422 100644
Binary files a/LoginPlayOpenSource/app/src/main/res/mipmap-xhdpi/ic_launcher.webp and b/LoginPlayOpenSource/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ
diff --git a/LoginPlayOpenSource/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp b/LoginPlayOpenSource/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..bcae5e61
Binary files /dev/null and b/LoginPlayOpenSource/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp differ
diff --git a/LoginPlayOpenSource/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/LoginPlayOpenSource/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
index 1b9a6956..0cb98685 100644
Binary files a/LoginPlayOpenSource/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp and b/LoginPlayOpenSource/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ
diff --git a/LoginPlayOpenSource/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/LoginPlayOpenSource/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
index 28d4b77f..ee8d549c 100644
Binary files a/LoginPlayOpenSource/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp and b/LoginPlayOpenSource/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ
diff --git a/LoginPlayOpenSource/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp b/LoginPlayOpenSource/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..f8f8d033
Binary files /dev/null and b/LoginPlayOpenSource/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp differ
diff --git a/LoginPlayOpenSource/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/LoginPlayOpenSource/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
index 9287f508..ef80d15c 100644
Binary files a/LoginPlayOpenSource/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp and b/LoginPlayOpenSource/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ
diff --git a/LoginPlayOpenSource/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/LoginPlayOpenSource/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
index aa7d6427..b4e0005b 100644
Binary files a/LoginPlayOpenSource/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp and b/LoginPlayOpenSource/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ
diff --git a/LoginPlayOpenSource/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp b/LoginPlayOpenSource/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..fed1a6c4
Binary files /dev/null and b/LoginPlayOpenSource/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp differ
diff --git a/LoginPlayOpenSource/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/LoginPlayOpenSource/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
index 9126ae37..31b5df0a 100644
Binary files a/LoginPlayOpenSource/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp and b/LoginPlayOpenSource/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ
diff --git a/LoginPlayOpenSource/gradle/libs.versions.toml b/LoginPlayOpenSource/gradle/libs.versions.toml
index 89049f28..d719ddaa 100644
--- a/LoginPlayOpenSource/gradle/libs.versions.toml
+++ b/LoginPlayOpenSource/gradle/libs.versions.toml
@@ -1,5 +1,5 @@
[versions]
-agp = "8.5.0"
+agp = "8.10.1"
kotlin = "1.9.0"
coreKtx = "1.13.1"
junit = "4.13.2"
diff --git a/LoginPlayOpenSource/gradle/wrapper/gradle-wrapper.properties b/LoginPlayOpenSource/gradle/wrapper/gradle-wrapper.properties
index dfde9fe4..9b78c374 100644
--- a/LoginPlayOpenSource/gradle/wrapper/gradle-wrapper.properties
+++ b/LoginPlayOpenSource/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Mon Aug 19 23:33:55 WIB 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/Math2D3D/README.md b/Math2D3D/README.md
index a2e346dc..4f231ad9 100644
--- a/Math2D3D/README.md
+++ b/Math2D3D/README.md
@@ -12,8 +12,8 @@
Java JDK |
- 8.5.0 |
- 8.7 |
+ 8.11.1 |
+ 8.10.1 |
17 |
diff --git a/Math2D3D/app/build.gradle b/Math2D3D/app/build.gradle
index c7b67617..71f80fab 100644
--- a/Math2D3D/app/build.gradle
+++ b/Math2D3D/app/build.gradle
@@ -12,7 +12,7 @@ android {
minSdk 24
targetSdk 35
versionCode 1
- versionName "1.0"
+ versionName "1.0.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
diff --git a/Math2D3D/app/src/main/ic_launcher-playstore.png b/Math2D3D/app/src/main/ic_launcher-playstore.png
new file mode 100644
index 00000000..afeecb3b
Binary files /dev/null and b/Math2D3D/app/src/main/ic_launcher-playstore.png differ
diff --git a/Math2D3D/app/src/main/res/drawable/ic_launcher_background.xml b/Math2D3D/app/src/main/res/drawable/ic_launcher_background.xml
index 07d5da9c..ca3826a4 100644
--- a/Math2D3D/app/src/main/res/drawable/ic_launcher_background.xml
+++ b/Math2D3D/app/src/main/res/drawable/ic_launcher_background.xml
@@ -1,170 +1,74 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ xmlns:android="http://schemas.android.com/apk/res/android">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Math2D3D/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/Math2D3D/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
index 6f3b755b..c4a603d4 100644
--- a/Math2D3D/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ b/Math2D3D/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -1,6 +1,5 @@
-
-
-
+
+
\ No newline at end of file
diff --git a/Math2D3D/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/Math2D3D/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
index 6f3b755b..c4a603d4 100644
--- a/Math2D3D/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+++ b/Math2D3D/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -1,6 +1,5 @@
-
-
-
+
+
\ No newline at end of file
diff --git a/Math2D3D/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/Math2D3D/app/src/main/res/mipmap-hdpi/ic_launcher.webp
index c209e78e..1f4c0d01 100644
Binary files a/Math2D3D/app/src/main/res/mipmap-hdpi/ic_launcher.webp and b/Math2D3D/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ
diff --git a/Math2D3D/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp b/Math2D3D/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..7b289835
Binary files /dev/null and b/Math2D3D/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp differ
diff --git a/Math2D3D/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/Math2D3D/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
index b2dfe3d1..1a6ccc46 100644
Binary files a/Math2D3D/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp and b/Math2D3D/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ
diff --git a/Math2D3D/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/Math2D3D/app/src/main/res/mipmap-mdpi/ic_launcher.webp
index 4f0f1d64..559e666e 100644
Binary files a/Math2D3D/app/src/main/res/mipmap-mdpi/ic_launcher.webp and b/Math2D3D/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ
diff --git a/Math2D3D/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp b/Math2D3D/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..cd0a7975
Binary files /dev/null and b/Math2D3D/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp differ
diff --git a/Math2D3D/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/Math2D3D/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
index 62b611da..617fd9ea 100644
Binary files a/Math2D3D/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp and b/Math2D3D/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ
diff --git a/Math2D3D/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/Math2D3D/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
index 948a3070..5efb6422 100644
Binary files a/Math2D3D/app/src/main/res/mipmap-xhdpi/ic_launcher.webp and b/Math2D3D/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ
diff --git a/Math2D3D/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp b/Math2D3D/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..bcae5e61
Binary files /dev/null and b/Math2D3D/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp differ
diff --git a/Math2D3D/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/Math2D3D/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
index 1b9a6956..0cb98685 100644
Binary files a/Math2D3D/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp and b/Math2D3D/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ
diff --git a/Math2D3D/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/Math2D3D/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
index 28d4b77f..ee8d549c 100644
Binary files a/Math2D3D/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp and b/Math2D3D/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ
diff --git a/Math2D3D/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp b/Math2D3D/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..f8f8d033
Binary files /dev/null and b/Math2D3D/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp differ
diff --git a/Math2D3D/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/Math2D3D/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
index 9287f508..ef80d15c 100644
Binary files a/Math2D3D/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp and b/Math2D3D/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ
diff --git a/Math2D3D/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/Math2D3D/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
index aa7d6427..b4e0005b 100644
Binary files a/Math2D3D/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp and b/Math2D3D/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ
diff --git a/Math2D3D/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp b/Math2D3D/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp
new file mode 100644
index 00000000..fed1a6c4
Binary files /dev/null and b/Math2D3D/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp differ
diff --git a/Math2D3D/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/Math2D3D/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
index 9126ae37..31b5df0a 100644
Binary files a/Math2D3D/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp and b/Math2D3D/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ
diff --git a/Math2D3D/gradle/libs.versions.toml b/Math2D3D/gradle/libs.versions.toml
index 3b0df2ff..3d069367 100644
--- a/Math2D3D/gradle/libs.versions.toml
+++ b/Math2D3D/gradle/libs.versions.toml
@@ -1,5 +1,5 @@
[versions]
-agp = "8.5.0"
+agp = "8.10.1"
kotlin = "1.9.0"
coreKtx = "1.15.0"
junit = "4.13.2"
diff --git a/Math2D3D/gradle/wrapper/gradle-wrapper.properties b/Math2D3D/gradle/wrapper/gradle-wrapper.properties
index 54ac615c..4ded2003 100644
--- a/Math2D3D/gradle/wrapper/gradle-wrapper.properties
+++ b/Math2D3D/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Mon Jan 27 22:40:34 WIB 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/MovieAppMVVMCleanArchitecture/.gitignore b/MovieAppMVVMCleanArchitecture/.gitignore
deleted file mode 100644
index 878c2cd5..00000000
--- a/MovieAppMVVMCleanArchitecture/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-*.iml
-.gradle
-/local.properties
-.idea
-.DS_Store
-/build
-/captures
-.externalNativeBuild
-.cxx
-local.properties
diff --git a/MovieAppMVVMCleanArchitecture/app/.gitignore b/MovieAppMVVMCleanArchitecture/app/.gitignore
deleted file mode 100644
index 42afabfd..00000000
--- a/MovieAppMVVMCleanArchitecture/app/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/build.gradle.kts b/MovieAppMVVMCleanArchitecture/app/build.gradle.kts
deleted file mode 100644
index b85155ce..00000000
--- a/MovieAppMVVMCleanArchitecture/app/build.gradle.kts
+++ /dev/null
@@ -1,88 +0,0 @@
-plugins {
- alias(libs.plugins.android.application)
- alias(libs.plugins.jetbrains.kotlin.android)
- id ("kotlin-kapt")
-}
-
-android {
- namespace = "com.algokelvin.movieapp"
- compileSdk = 34
-
- defaultConfig {
- applicationId = "com.algokelvin.movieapp"
- minSdk = 30
- targetSdk = 34
- versionCode = 1
- versionName = "1.0"
-
- testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
-
- buildConfigField("String", "API_KEY", "\"19978af3bb16e019522fd5077f3018f2\"")
- buildConfigField("String", "BASE_URL", "\"https://api.themoviedb.org/3/\"")
- }
-
- buildTypes {
- release {
- isMinifyEnabled = false
- proguardFiles(
- getDefaultProguardFile("proguard-android-optimize.txt"),
- "proguard-rules.pro"
- )
- }
- }
- compileOptions {
- sourceCompatibility = JavaVersion.VERSION_1_8
- targetCompatibility = JavaVersion.VERSION_1_8
- }
- kotlinOptions {
- jvmTarget = "1.8"
- }
- buildFeatures {
- dataBinding = true
- buildConfig = true
- }
-}
-
-dependencies {
- implementation(libs.androidx.core.ktx)
- implementation(libs.androidx.appcompat)
- implementation(libs.material)
- implementation(libs.androidx.activity)
- implementation(libs.androidx.constraintlayout)
-
- val lifecycle_version = "2.8.6"
- val room_version = "2.6.1"
-
- // ViewModel
- implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version")
- // LiveData
- implementation("androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version")
- // Saved state module for ViewModel
- implementation("androidx.lifecycle:lifecycle-viewmodel-savedstate:$lifecycle_version")
- // Annotation processor
- kapt("androidx.lifecycle:lifecycle-compiler:$lifecycle_version")
-
- implementation("androidx.room:room-runtime:$room_version")
- implementation("androidx.room:room-ktx:$room_version")
-
- // To use Kotlin annotation processing tool (kapt)
- kapt("androidx.room:room-compiler:$room_version")
-
- implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.9.0")
- implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.9.0")
-
- implementation("com.google.dagger:dagger:2.52")
- kapt("com.google.dagger:dagger-compiler:2.52")
-
- implementation("com.squareup.retrofit2:retrofit:2.11.0")
- implementation("com.squareup.retrofit2:converter-gson:2.11.0")
- implementation("com.squareup.okhttp3:logging-interceptor:4.7.2")
-
- implementation("com.github.bumptech.glide:glide:4.16.0")
-
- implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.9.0")
-
- testImplementation(libs.junit)
- androidTestImplementation(libs.androidx.junit)
- androidTestImplementation(libs.androidx.espresso.core)
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/proguard-rules.pro b/MovieAppMVVMCleanArchitecture/app/proguard-rules.pro
deleted file mode 100644
index 481bb434..00000000
--- a/MovieAppMVVMCleanArchitecture/app/proguard-rules.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# 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/MovieAppMVVMCleanArchitecture/app/src/androidTest/java/com/algokelvin/movieapp/ExampleInstrumentedTest.kt b/MovieAppMVVMCleanArchitecture/app/src/androidTest/java/com/algokelvin/movieapp/ExampleInstrumentedTest.kt
deleted file mode 100644
index 8c7dda84..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/androidTest/java/com/algokelvin/movieapp/ExampleInstrumentedTest.kt
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.algokelvin.movieapp
-
-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.algokelvin.movieapp", appContext.packageName)
- }
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/AndroidManifest.xml b/MovieAppMVVMCleanArchitecture/app/src/main/AndroidManifest.xml
deleted file mode 100644
index ca92e9a8..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/api/MovieApiService.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/api/MovieApiService.kt
deleted file mode 100644
index 47424ef3..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/api/MovieApiService.kt
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.algokelvin.movieapp.data.api
-
-import com.algokelvin.movieapp.data.model.artist.ArtistList
-import com.algokelvin.movieapp.data.model.movie.MovieList
-import com.algokelvin.movieapp.data.model.tv.TvShowList
-import retrofit2.Response
-import retrofit2.http.GET
-import retrofit2.http.Query
-
-interface MovieApiService {
- @GET("movie/popular")
- suspend fun getMovieListPopular(@Query("api_key") apiKey: String): Response
-
- @GET("tv/popular")
- suspend fun getTvShowListPopular(@Query("api_key") apiKey: String): Response
-
- @GET("person/popular")
- suspend fun getArtistListPopular(@Query("api_key") apiKey: String): Response
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/db/ArtistDao.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/db/ArtistDao.kt
deleted file mode 100644
index f26da48f..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/db/ArtistDao.kt
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.algokelvin.movieapp.data.db
-
-import androidx.room.Dao
-import androidx.room.Insert
-import androidx.room.OnConflictStrategy
-import androidx.room.Query
-import com.algokelvin.movieapp.data.model.artist.Artist
-
-@Dao
-interface ArtistDao {
- @Insert(onConflict = OnConflictStrategy.REPLACE)
- suspend fun saveArtists(artist: List)
-
- @Query("DELETE FROM popular_artists")
- suspend fun deleteAllArtists()
-
- @Query("SELECT * FROM popular_artists")
- suspend fun getAllArtists(): List
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/db/MovieDB.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/db/MovieDB.kt
deleted file mode 100644
index 882d32ef..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/db/MovieDB.kt
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.algokelvin.movieapp.data.db
-
-import androidx.room.Database
-import androidx.room.RoomDatabase
-import com.algokelvin.movieapp.data.model.artist.Artist
-import com.algokelvin.movieapp.data.model.movie.Movie
-import com.algokelvin.movieapp.data.model.tv.TvShow
-
-@Database(
- entities = [Movie::class, TvShow::class, Artist::class],
- version = 1,
- exportSchema = false
-)
-abstract class MovieDB(): RoomDatabase() {
- abstract fun movieDao(): MovieDao
- abstract fun tvShowDao(): TvShowDao
- abstract fun artistDao(): ArtistDao
-
-
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/db/MovieDao.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/db/MovieDao.kt
deleted file mode 100644
index 137a8086..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/db/MovieDao.kt
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.algokelvin.movieapp.data.db
-
-import androidx.room.Dao
-import androidx.room.Insert
-import androidx.room.OnConflictStrategy
-import androidx.room.Query
-import com.algokelvin.movieapp.data.model.movie.Movie
-
-@Dao
-interface MovieDao {
- @Insert(onConflict = OnConflictStrategy.REPLACE)
- suspend fun saveMovies(movies: List)
-
- @Query("DELETE FROM popular_movies")
- suspend fun deleteAllMovies()
-
- @Query("SELECT * FROM popular_movies")
- suspend fun getAllMovies(): List
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/db/TvShowDao.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/db/TvShowDao.kt
deleted file mode 100644
index 7f44f9d6..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/db/TvShowDao.kt
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.algokelvin.movieapp.data.db
-
-import androidx.room.Dao
-import androidx.room.Insert
-import androidx.room.OnConflictStrategy
-import androidx.room.Query
-import com.algokelvin.movieapp.data.model.tv.TvShow
-
-@Dao
-interface TvShowDao {
- @Insert(onConflict = OnConflictStrategy.REPLACE)
- suspend fun saveTvShows(tvShows: List)
-
- @Query("DELETE FROM popular_tvShows")
- suspend fun deleteAllTvShows()
-
- @Query("SELECT * FROM popular_tvShows")
- suspend fun getAllTvShows(): List
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/model/artist/Artist.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/model/artist/Artist.kt
deleted file mode 100644
index 42b9cfe0..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/model/artist/Artist.kt
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.algokelvin.movieapp.data.model.artist
-
-
-import androidx.room.ColumnInfo
-import androidx.room.Entity
-import androidx.room.PrimaryKey
-import com.google.gson.annotations.SerializedName
-
-@Entity(tableName = "popular_artists")
-data class Artist(
- @PrimaryKey
- @SerializedName("id")
- val id: Int,
-
- @ColumnInfo(name = "artist_name")
- @SerializedName("name")
- val name: String?,
-
- @ColumnInfo(name = "artist_popularity")
- @SerializedName("popularity")
- val popularity: Double?,
-
- @ColumnInfo(name = "artist_profile_path")
- @SerializedName("profile_path")
- val profilePath: String?
-)
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/model/artist/ArtistList.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/model/artist/ArtistList.kt
deleted file mode 100644
index ade69e33..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/model/artist/ArtistList.kt
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.algokelvin.movieapp.data.model.artist
-
-
-import com.google.gson.annotations.SerializedName
-
-data class ArtistList(
- @SerializedName("page")
- val page: Int,
- @SerializedName("results")
- val results: List,
- @SerializedName("total_pages")
- val totalPages: Int,
- @SerializedName("total_results")
- val totalResults: Int
-)
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/model/artist/KnownFor.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/model/artist/KnownFor.kt
deleted file mode 100644
index 1e1ad8ad..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/model/artist/KnownFor.kt
+++ /dev/null
@@ -1,45 +0,0 @@
-package com.algokelvin.movieapp.data.model.artist
-
-
-import com.google.gson.annotations.SerializedName
-
-data class KnownFor(
- @SerializedName("adult")
- val adult: Boolean,
- @SerializedName("backdrop_path")
- val backdropPath: String,
- @SerializedName("first_air_date")
- val firstAirDate: String,
- @SerializedName("genre_ids")
- val genreIds: List,
- @SerializedName("id")
- val id: Int,
- @SerializedName("media_type")
- val mediaType: String,
- @SerializedName("name")
- val name: String,
- @SerializedName("origin_country")
- val originCountry: List,
- @SerializedName("original_language")
- val originalLanguage: String,
- @SerializedName("original_name")
- val originalName: String,
- @SerializedName("original_title")
- val originalTitle: String,
- @SerializedName("overview")
- val overview: String,
- @SerializedName("popularity")
- val popularity: Double,
- @SerializedName("poster_path")
- val posterPath: String,
- @SerializedName("release_date")
- val releaseDate: String,
- @SerializedName("title")
- val title: String,
- @SerializedName("video")
- val video: Boolean,
- @SerializedName("vote_average")
- val voteAverage: Double,
- @SerializedName("vote_count")
- val voteCount: Int
-)
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/model/movie/Movie.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/model/movie/Movie.kt
deleted file mode 100644
index 205ebe66..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/model/movie/Movie.kt
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.algokelvin.movieapp.data.model.movie
-
-
-import androidx.room.ColumnInfo
-import androidx.room.Entity
-import androidx.room.PrimaryKey
-import com.google.gson.annotations.SerializedName
-
-@Entity(tableName = "popular_movies")
-data class Movie(
- @PrimaryKey
- @SerializedName("id")
- val id: Int,
-
- @ColumnInfo(name = "movie_overview")
- @SerializedName("overview")
- val overview: String?,
-
- @ColumnInfo(name = "movie_popularity")
- @SerializedName("popularity")
- val popularity: Double?,
-
- @ColumnInfo(name = "movie_poster_path")
- @SerializedName("poster_path")
- val posterPath: String?,
-
- @ColumnInfo(name = "movie_release_date")
- @SerializedName("release_date")
- val releaseDate: String?,
-
- @ColumnInfo(name = "movie_title")
- @SerializedName("title")
- val title: String?,
-)
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/model/movie/MovieList.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/model/movie/MovieList.kt
deleted file mode 100644
index fd3e73e1..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/model/movie/MovieList.kt
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.algokelvin.movieapp.data.model.movie
-
-
-import com.google.gson.annotations.SerializedName
-
-data class MovieList(
- @SerializedName("page")
- val page: Int,
- @SerializedName("results")
- val results: List,
- @SerializedName("total_pages")
- val totalPages: Int,
- @SerializedName("total_results")
- val totalResults: Int
-)
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/model/tv/TvShow.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/model/tv/TvShow.kt
deleted file mode 100644
index 00693844..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/model/tv/TvShow.kt
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.algokelvin.movieapp.data.model.tv
-
-
-import androidx.room.ColumnInfo
-import androidx.room.Entity
-import androidx.room.PrimaryKey
-import com.google.gson.annotations.SerializedName
-
-@Entity(tableName = "popular_tvShows")
-data class TvShow(
- @PrimaryKey
- @SerializedName("id")
- val id: Int,
-
- @ColumnInfo(name = "tvShow_first_air_date")
- @SerializedName("first_air_date")
- val firstAirDate: String?,
-
- @ColumnInfo(name = "tvShow_name")
- @SerializedName("name")
- val name: String?,
-
- @ColumnInfo(name = "tvShow_overview")
- @SerializedName("overview")
- val overview: String?,
-
- @ColumnInfo(name = "tvShow_popularity")
- @SerializedName("popularity")
- val popularity: Double?,
-
- @ColumnInfo(name = "tvShow_poster_path")
- @SerializedName("poster_path")
- val posterPath: String?,
-)
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/model/tv/TvShowList.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/model/tv/TvShowList.kt
deleted file mode 100644
index eff30755..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/model/tv/TvShowList.kt
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.algokelvin.movieapp.data.model.tv
-
-
-import com.google.gson.annotations.SerializedName
-
-data class TvShowList(
- @SerializedName("page")
- val page: Int,
- @SerializedName("results")
- val results: List,
- @SerializedName("total_pages")
- val totalPages: Int,
- @SerializedName("total_results")
- val totalResults: Int
-)
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/artist/ArtistRepositoryImpl.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/artist/ArtistRepositoryImpl.kt
deleted file mode 100644
index b667e24b..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/artist/ArtistRepositoryImpl.kt
+++ /dev/null
@@ -1,78 +0,0 @@
-package com.algokelvin.movieapp.data.repository.artist
-
-import android.util.Log
-import com.algokelvin.movieapp.data.model.artist.Artist
-import com.algokelvin.movieapp.data.repository.artist.datasource.ArtistCacheDataSource
-import com.algokelvin.movieapp.data.repository.artist.datasource.ArtistLocalDataSource
-import com.algokelvin.movieapp.data.repository.artist.datasource.ArtistRemoteDataSource
-import com.algokelvin.movieapp.domain.repository.ArtistRepository
-
-class ArtistRepositoryImpl(
- private val remote: ArtistRemoteDataSource,
- private val local: ArtistLocalDataSource,
- private val cache: ArtistCacheDataSource
-): ArtistRepository {
- override suspend fun getArtists(): List = getMoviesFromCache()
-
- override suspend fun updateArtists(): List {
- val newListOfArtists = getArtistsFromAPI()
- local.clearAll()
- local.saveArtistsToDB(newListOfArtists)
- cache.saveArtistsToCache(newListOfArtists)
- return newListOfArtists
- }
-
- suspend fun getArtistsFromAPI(): List {
- lateinit var artistsList: List
-
- try {
- val response = remote.getArtists()
- val body = response.body()
- if (body != null) {
- artistsList = body.results
- }
- } catch (e: Exception) {
- Log.i("ALGOKELVIN", e.message.toString())
- }
-
- return artistsList
- }
-
- suspend fun getArtistsFromDB(): List {
- lateinit var artistsList: List
-
- try {
- artistsList = local.getArtistsFromDB()
- } catch (e: Exception) {
- Log.i("ALGOKELVIN", e.message.toString())
- }
-
- if (artistsList.isNotEmpty()) {
- return artistsList
- } else {
- artistsList = getArtistsFromAPI()
- local.saveArtistsToDB(artistsList)
- }
-
- return artistsList
- }
-
- suspend fun getMoviesFromCache(): List {
- lateinit var artistList: List
-
- try {
- artistList = cache.getArtistsFromCache()
- } catch (e: Exception) {
- Log.i("ALGOKELVIN", e.message.toString())
- }
-
- if (artistList.isNotEmpty()) {
- return artistList
- } else {
- artistList = getArtistsFromDB()
- cache.saveArtistsToCache(artistList)
- }
-
- return artistList
- }
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/artist/datasource/ArtistCacheDataSource.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/artist/datasource/ArtistCacheDataSource.kt
deleted file mode 100644
index 6206a1e1..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/artist/datasource/ArtistCacheDataSource.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.algokelvin.movieapp.data.repository.artist.datasource
-
-import com.algokelvin.movieapp.data.model.artist.Artist
-
-interface ArtistCacheDataSource {
- suspend fun getArtistsFromCache(): List
- suspend fun saveArtistsToCache(artists: List)
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/artist/datasource/ArtistLocalDataSource.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/artist/datasource/ArtistLocalDataSource.kt
deleted file mode 100644
index 23c6f0ed..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/artist/datasource/ArtistLocalDataSource.kt
+++ /dev/null
@@ -1,9 +0,0 @@
-package com.algokelvin.movieapp.data.repository.artist.datasource
-
-import com.algokelvin.movieapp.data.model.artist.Artist
-
-interface ArtistLocalDataSource {
- suspend fun getArtistsFromDB(): List
- suspend fun saveArtistsToDB(artists: List)
- suspend fun clearAll()
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/artist/datasource/ArtistRemoteDataSource.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/artist/datasource/ArtistRemoteDataSource.kt
deleted file mode 100644
index 87a4ca64..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/artist/datasource/ArtistRemoteDataSource.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.algokelvin.movieapp.data.repository.artist.datasource
-
-import com.algokelvin.movieapp.data.model.artist.ArtistList
-import retrofit2.Response
-
-interface ArtistRemoteDataSource {
- suspend fun getArtists(): Response
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/artist/datasourceImpl/ArtistCacheDataSourceImpl.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/artist/datasourceImpl/ArtistCacheDataSourceImpl.kt
deleted file mode 100644
index 8418155c..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/artist/datasourceImpl/ArtistCacheDataSourceImpl.kt
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.algokelvin.movieapp.data.repository.artist.datasourceImpl
-
-import com.algokelvin.movieapp.data.model.artist.Artist
-import com.algokelvin.movieapp.data.repository.artist.datasource.ArtistCacheDataSource
-
-class ArtistCacheDataSourceImpl: ArtistCacheDataSource {
- private var artistList = ArrayList()
-
- override suspend fun getArtistsFromCache(): List {
- return artistList
- }
-
- override suspend fun saveArtistsToCache(artists: List) {
- artistList.clear()
- artistList = ArrayList(artists)
- }
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/artist/datasourceImpl/ArtistLocalDataSourceImpl.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/artist/datasourceImpl/ArtistLocalDataSourceImpl.kt
deleted file mode 100644
index b1d447cf..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/artist/datasourceImpl/ArtistLocalDataSourceImpl.kt
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.algokelvin.movieapp.data.repository.artist.datasourceImpl
-
-import com.algokelvin.movieapp.data.db.ArtistDao
-import com.algokelvin.movieapp.data.model.artist.Artist
-import com.algokelvin.movieapp.data.repository.artist.datasource.ArtistLocalDataSource
-import kotlinx.coroutines.CoroutineScope
-import kotlinx.coroutines.Dispatchers
-import kotlinx.coroutines.launch
-
-class ArtistLocalDataSourceImpl(private val artistDao: ArtistDao): ArtistLocalDataSource {
- override suspend fun getArtistsFromDB(): List = artistDao.getAllArtists()
-
- override suspend fun saveArtistsToDB(artists: List) {
- CoroutineScope(Dispatchers.IO).launch {
- artistDao.saveArtists(artists)
- }
- }
-
- override suspend fun clearAll() {
- CoroutineScope(Dispatchers.IO).launch {
- artistDao.deleteAllArtists()
- }
- }
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/artist/datasourceImpl/ArtistRemoteDataSourceImpl.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/artist/datasourceImpl/ArtistRemoteDataSourceImpl.kt
deleted file mode 100644
index b37dbc0d..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/artist/datasourceImpl/ArtistRemoteDataSourceImpl.kt
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.algokelvin.movieapp.data.repository.artist.datasourceImpl
-
-import com.algokelvin.movieapp.data.api.MovieApiService
-import com.algokelvin.movieapp.data.model.artist.ArtistList
-import com.algokelvin.movieapp.data.repository.artist.datasource.ArtistRemoteDataSource
-import retrofit2.Response
-
-class ArtistRemoteDataSourceImpl(
- private val service: MovieApiService,
- private val apiKey: String,
-): ArtistRemoteDataSource {
- override suspend fun getArtists(): Response = service.getArtistListPopular(apiKey)
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/movie/MovieRepositoryImpl.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/movie/MovieRepositoryImpl.kt
deleted file mode 100644
index d8843a60..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/movie/MovieRepositoryImpl.kt
+++ /dev/null
@@ -1,78 +0,0 @@
-package com.algokelvin.movieapp.data.repository.movie
-
-import android.util.Log
-import com.algokelvin.movieapp.data.model.movie.Movie
-import com.algokelvin.movieapp.data.repository.movie.datasource.MovieCacheDataSource
-import com.algokelvin.movieapp.data.repository.movie.datasource.MovieLocalDataSource
-import com.algokelvin.movieapp.data.repository.movie.datasource.MovieRemoteDataSource
-import com.algokelvin.movieapp.domain.repository.MovieRepository
-
-class MovieRepositoryImpl(
- private val remote: MovieRemoteDataSource,
- private val local: MovieLocalDataSource,
- private val cache: MovieCacheDataSource,
-): MovieRepository {
- override suspend fun getMovies(): List = getMoviesFromCache()
-
- override suspend fun updateMovies(): List {
- val newListOfMovies = getMoviesFromAPI()
- local.clearAll()
- local.saveMoviesToDB(newListOfMovies)
- cache.saveMoviesToCache(newListOfMovies)
- return newListOfMovies
- }
-
- suspend fun getMoviesFromAPI(): List {
- lateinit var movieList: List
-
- try {
- val response = remote.getMovies()
- val body = response.body()
- if (body != null) {
- movieList = body.results
- }
- } catch (e: Exception) {
- Log.i("ALGOKELVIN", e.message.toString())
- }
-
- return movieList
- }
-
- suspend fun getMoviesFromDB(): List {
- lateinit var movieList: List
-
- try {
- movieList = local.getMoviesFromDB()
- } catch (e: Exception) {
- Log.i("ALGOKELVIN", e.message.toString())
- }
-
- if (movieList.isNotEmpty()) {
- return movieList
- } else {
- movieList = getMoviesFromAPI()
- local.saveMoviesToDB(movieList)
- }
-
- return movieList
- }
-
- suspend fun getMoviesFromCache(): List {
- lateinit var movieList: List
-
- try {
- movieList = cache.getMoviesFromCache()
- } catch (e: Exception) {
- Log.i("ALGOKELVIN", e.message.toString())
- }
-
- if (movieList.isNotEmpty()) {
- return movieList
- } else {
- movieList = getMoviesFromDB()
- cache.saveMoviesToCache(movieList)
- }
-
- return movieList
- }
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/movie/datasource/MovieCacheDataSource.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/movie/datasource/MovieCacheDataSource.kt
deleted file mode 100644
index 2b070311..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/movie/datasource/MovieCacheDataSource.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.algokelvin.movieapp.data.repository.movie.datasource
-
-import com.algokelvin.movieapp.data.model.movie.Movie
-
-interface MovieCacheDataSource {
- suspend fun getMoviesFromCache(): List
- suspend fun saveMoviesToCache(movies: List)
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/movie/datasource/MovieLocalDataSource.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/movie/datasource/MovieLocalDataSource.kt
deleted file mode 100644
index 3c4dde1e..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/movie/datasource/MovieLocalDataSource.kt
+++ /dev/null
@@ -1,9 +0,0 @@
-package com.algokelvin.movieapp.data.repository.movie.datasource
-
-import com.algokelvin.movieapp.data.model.movie.Movie
-
-interface MovieLocalDataSource {
- suspend fun getMoviesFromDB(): List
- suspend fun saveMoviesToDB(movies: List)
- suspend fun clearAll()
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/movie/datasource/MovieRemoteDataSource.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/movie/datasource/MovieRemoteDataSource.kt
deleted file mode 100644
index 8fd1e6ca..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/movie/datasource/MovieRemoteDataSource.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.algokelvin.movieapp.data.repository.movie.datasource
-
-import com.algokelvin.movieapp.data.model.movie.MovieList
-import retrofit2.Response
-
-interface MovieRemoteDataSource {
- suspend fun getMovies(): Response
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/movie/datasourceImpl/MovieCacheDataSourceImpl.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/movie/datasourceImpl/MovieCacheDataSourceImpl.kt
deleted file mode 100644
index 403f856e..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/movie/datasourceImpl/MovieCacheDataSourceImpl.kt
+++ /dev/null
@@ -1,18 +0,0 @@
-package com.algokelvin.movieapp.data.repository.movie.datasourceImpl
-
-import com.algokelvin.movieapp.data.model.movie.Movie
-import com.algokelvin.movieapp.data.repository.artist.datasource.ArtistCacheDataSource
-import com.algokelvin.movieapp.data.repository.movie.datasource.MovieCacheDataSource
-
-class MovieCacheDataSourceImpl: MovieCacheDataSource {
- private var movieList = ArrayList()
-
- override suspend fun getMoviesFromCache(): List {
- return movieList
- }
-
- override suspend fun saveMoviesToCache(movies: List) {
- movieList.clear()
- movieList = ArrayList(movies)
- }
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/movie/datasourceImpl/MovieLocalDataSourceImpl.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/movie/datasourceImpl/MovieLocalDataSourceImpl.kt
deleted file mode 100644
index f75312b4..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/movie/datasourceImpl/MovieLocalDataSourceImpl.kt
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.algokelvin.movieapp.data.repository.movie.datasourceImpl
-
-import com.algokelvin.movieapp.data.db.MovieDao
-import com.algokelvin.movieapp.data.model.movie.Movie
-import com.algokelvin.movieapp.data.repository.movie.datasource.MovieLocalDataSource
-import kotlinx.coroutines.CoroutineScope
-import kotlinx.coroutines.Dispatchers
-import kotlinx.coroutines.launch
-
-class MovieLocalDataSourceImpl(private val movieDao: MovieDao): MovieLocalDataSource {
- override suspend fun getMoviesFromDB(): List = movieDao.getAllMovies()
-
- override suspend fun saveMoviesToDB(movies: List) {
- CoroutineScope(Dispatchers.IO).launch {
- movieDao.saveMovies(movies)
- }
- }
-
- override suspend fun clearAll() {
- CoroutineScope(Dispatchers.IO).launch {
- movieDao.deleteAllMovies()
- }
- }
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/movie/datasourceImpl/MovieRemoteDataSourceImpl.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/movie/datasourceImpl/MovieRemoteDataSourceImpl.kt
deleted file mode 100644
index 5ef18c89..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/movie/datasourceImpl/MovieRemoteDataSourceImpl.kt
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.algokelvin.movieapp.data.repository.movie.datasourceImpl
-
-import com.algokelvin.movieapp.data.api.MovieApiService
-import com.algokelvin.movieapp.data.model.movie.MovieList
-import com.algokelvin.movieapp.data.repository.artist.datasource.ArtistRemoteDataSource
-import com.algokelvin.movieapp.data.repository.movie.datasource.MovieRemoteDataSource
-import retrofit2.Response
-
-class MovieRemoteDataSourceImpl(
- private val service: MovieApiService,
- private val apiKey: String,
-): MovieRemoteDataSource {
- override suspend fun getMovies(): Response = service.getMovieListPopular(apiKey)
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/tv/TvShowRepositoryImpl.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/tv/TvShowRepositoryImpl.kt
deleted file mode 100644
index 70792f5a..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/tv/TvShowRepositoryImpl.kt
+++ /dev/null
@@ -1,78 +0,0 @@
-package com.algokelvin.movieapp.data.repository.tv
-
-import android.util.Log
-import com.algokelvin.movieapp.data.model.tv.TvShow
-import com.algokelvin.movieapp.data.repository.tv.datasource.TvShowCacheDataSource
-import com.algokelvin.movieapp.data.repository.tv.datasource.TvShowLocalDataSource
-import com.algokelvin.movieapp.data.repository.tv.datasource.TvShowRemoteDataSource
-import com.algokelvin.movieapp.domain.repository.TvShowRepository
-
-class TvShowRepositoryImpl(
- private val remote: TvShowRemoteDataSource,
- private val local: TvShowLocalDataSource,
- private val cache: TvShowCacheDataSource,
-): TvShowRepository {
- override suspend fun getTvShows(): List = getTvShowFromCache()
-
- override suspend fun updateTvShows(): List {
- val newListOfTvShows = getTvShowsFromAPI()
- local.clearAll()
- local.saveTvShowsToDB(newListOfTvShows)
- cache.saveTvShowsToCache(newListOfTvShows)
- return newListOfTvShows
- }
-
- suspend fun getTvShowsFromAPI(): List {
- lateinit var tvShowsList: List
-
- try {
- val response = remote.getTvShows()
- val body = response.body()
- if (body != null) {
- tvShowsList = body.results
- }
- } catch (e: Exception) {
- Log.i("ALGOKELVIN", e.message.toString())
- }
-
- return tvShowsList
- }
-
- suspend fun getTvShowsFromDB(): List {
- lateinit var tvShowList: List
-
- try {
- tvShowList = local.getTvShowsFromDB()
- } catch (e: Exception) {
- Log.i("ALGOKELVIN", e.message.toString())
- }
-
- if (tvShowList.isNotEmpty()) {
- return tvShowList
- } else {
- tvShowList = getTvShowsFromAPI()
- local.saveTvShowsToDB(tvShowList)
- }
-
- return tvShowList
- }
-
- suspend fun getTvShowFromCache(): List {
- lateinit var tvShowList: List
-
- try {
- tvShowList = cache.getTvShowsFromCache()
- } catch (e: Exception) {
- Log.i("ALGOKELVIN", e.message.toString())
- }
-
- if (tvShowList.isNotEmpty()) {
- return tvShowList
- } else {
- tvShowList = getTvShowsFromDB()
- cache.saveTvShowsToCache(tvShowList)
- }
-
- return tvShowList
- }
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/tv/datasource/TvShowCacheDataSource.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/tv/datasource/TvShowCacheDataSource.kt
deleted file mode 100644
index 0423c3da..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/tv/datasource/TvShowCacheDataSource.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.algokelvin.movieapp.data.repository.tv.datasource
-
-import com.algokelvin.movieapp.data.model.tv.TvShow
-
-interface TvShowCacheDataSource {
- suspend fun getTvShowsFromCache(): List
- suspend fun saveTvShowsToCache(tvShows: List)
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/tv/datasource/TvShowLocalDataSource.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/tv/datasource/TvShowLocalDataSource.kt
deleted file mode 100644
index 45041914..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/tv/datasource/TvShowLocalDataSource.kt
+++ /dev/null
@@ -1,9 +0,0 @@
-package com.algokelvin.movieapp.data.repository.tv.datasource
-
-import com.algokelvin.movieapp.data.model.tv.TvShow
-
-interface TvShowLocalDataSource {
- suspend fun getTvShowsFromDB(): List
- suspend fun saveTvShowsToDB(tvShows: List)
- suspend fun clearAll()
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/tv/datasource/TvShowRemoteDataSource.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/tv/datasource/TvShowRemoteDataSource.kt
deleted file mode 100644
index 01b63c37..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/tv/datasource/TvShowRemoteDataSource.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.algokelvin.movieapp.data.repository.tv.datasource
-
-import com.algokelvin.movieapp.data.model.tv.TvShowList
-import retrofit2.Response
-
-interface TvShowRemoteDataSource {
- suspend fun getTvShows(): Response
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/tv/datasourceImpl/TvShowCacheDataSourceImpl.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/tv/datasourceImpl/TvShowCacheDataSourceImpl.kt
deleted file mode 100644
index 0aa566cd..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/tv/datasourceImpl/TvShowCacheDataSourceImpl.kt
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.algokelvin.movieapp.data.repository.tv.datasourceImpl
-
-import com.algokelvin.movieapp.data.model.tv.TvShow
-import com.algokelvin.movieapp.data.repository.tv.datasource.TvShowCacheDataSource
-
-class TvShowCacheDataSourceImpl: TvShowCacheDataSource {
- private var tvShowsList = ArrayList()
-
- override suspend fun getTvShowsFromCache(): List {
- return tvShowsList
- }
-
- override suspend fun saveTvShowsToCache(tvShows: List) {
- tvShowsList.clear()
- tvShowsList = ArrayList(tvShows)
- }
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/tv/datasourceImpl/TvShowLocalDataSourceImpl.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/tv/datasourceImpl/TvShowLocalDataSourceImpl.kt
deleted file mode 100644
index b9b60f33..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/tv/datasourceImpl/TvShowLocalDataSourceImpl.kt
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.algokelvin.movieapp.data.repository.tv.datasourceImpl
-
-import com.algokelvin.movieapp.data.db.TvShowDao
-import com.algokelvin.movieapp.data.model.tv.TvShow
-import com.algokelvin.movieapp.data.repository.tv.datasource.TvShowLocalDataSource
-import kotlinx.coroutines.CoroutineScope
-import kotlinx.coroutines.Dispatchers
-import kotlinx.coroutines.launch
-
-class TvShowLocalDataSourceImpl(private val tvShowDao: TvShowDao): TvShowLocalDataSource {
- override suspend fun getTvShowsFromDB(): List = tvShowDao.getAllTvShows()
-
- override suspend fun saveTvShowsToDB(tvShows: List) {
- CoroutineScope(Dispatchers.IO).launch {
- tvShowDao.saveTvShows(tvShows)
- }
- }
-
- override suspend fun clearAll() {
- CoroutineScope(Dispatchers.IO).launch {
- tvShowDao.deleteAllTvShows()
- }
- }
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/tv/datasourceImpl/TvShowRemoteDataSourceImpl.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/tv/datasourceImpl/TvShowRemoteDataSourceImpl.kt
deleted file mode 100644
index 99fc5d74..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/data/repository/tv/datasourceImpl/TvShowRemoteDataSourceImpl.kt
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.algokelvin.movieapp.data.repository.tv.datasourceImpl
-
-import com.algokelvin.movieapp.data.api.MovieApiService
-import com.algokelvin.movieapp.data.model.tv.TvShowList
-import com.algokelvin.movieapp.data.repository.tv.datasource.TvShowRemoteDataSource
-import retrofit2.Response
-
-class TvShowRemoteDataSourceImpl(
- private val service: MovieApiService,
- private val apiKey: String,
-): TvShowRemoteDataSource {
- override suspend fun getTvShows(): Response = service.getTvShowListPopular(apiKey)
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/domain/repository/ArtistRepository.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/domain/repository/ArtistRepository.kt
deleted file mode 100644
index ed3e2a15..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/domain/repository/ArtistRepository.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.algokelvin.movieapp.domain.repository
-
-import com.algokelvin.movieapp.data.model.artist.Artist
-
-interface ArtistRepository {
- suspend fun getArtists(): List?
- suspend fun updateArtists(): List?
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/domain/repository/MovieRepository.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/domain/repository/MovieRepository.kt
deleted file mode 100644
index 4b3e1d91..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/domain/repository/MovieRepository.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.algokelvin.movieapp.domain.repository
-
-import com.algokelvin.movieapp.data.model.movie.Movie
-
-interface MovieRepository {
- suspend fun getMovies(): List?
- suspend fun updateMovies(): List?
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/domain/repository/TvShowRepository.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/domain/repository/TvShowRepository.kt
deleted file mode 100644
index d8a40796..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/domain/repository/TvShowRepository.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.algokelvin.movieapp.domain.repository
-
-import com.algokelvin.movieapp.data.model.tv.TvShow
-
-interface TvShowRepository {
- suspend fun getTvShows(): List?
- suspend fun updateTvShows(): List?
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/domain/usecase/GetArtistsUseCase.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/domain/usecase/GetArtistsUseCase.kt
deleted file mode 100644
index 6b4b3c4f..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/domain/usecase/GetArtistsUseCase.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.algokelvin.movieapp.domain.usecase
-
-import com.algokelvin.movieapp.data.model.artist.Artist
-import com.algokelvin.movieapp.domain.repository.ArtistRepository
-
-class GetArtistsUseCase(private val artistRepository: ArtistRepository) {
- suspend fun execute(): List? = artistRepository.getArtists()
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/domain/usecase/GetMoviesUseCase.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/domain/usecase/GetMoviesUseCase.kt
deleted file mode 100644
index 7a863274..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/domain/usecase/GetMoviesUseCase.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.algokelvin.movieapp.domain.usecase
-
-import com.algokelvin.movieapp.data.model.movie.Movie
-import com.algokelvin.movieapp.domain.repository.MovieRepository
-
-class GetMoviesUseCase(private val movieRepository: MovieRepository) {
- suspend fun execute(): List? = movieRepository.getMovies()
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/domain/usecase/GetTvShowsUseCase.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/domain/usecase/GetTvShowsUseCase.kt
deleted file mode 100644
index 38a58a7f..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/domain/usecase/GetTvShowsUseCase.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.algokelvin.movieapp.domain.usecase
-
-import com.algokelvin.movieapp.data.model.tv.TvShow
-import com.algokelvin.movieapp.domain.repository.TvShowRepository
-
-class GetTvShowsUseCase(private val tvShowRepository: TvShowRepository) {
- suspend fun execute(): List? = tvShowRepository.getTvShows()
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/domain/usecase/UpdateArtistsUseCase.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/domain/usecase/UpdateArtistsUseCase.kt
deleted file mode 100644
index 4a3e579f..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/domain/usecase/UpdateArtistsUseCase.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.algokelvin.movieapp.domain.usecase
-
-import com.algokelvin.movieapp.data.model.artist.Artist
-import com.algokelvin.movieapp.domain.repository.ArtistRepository
-
-class UpdateArtistsUseCase(private val artistRepository: ArtistRepository) {
- suspend fun execute(): List? = artistRepository.updateArtists()
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/domain/usecase/UpdateMoviesUseCase.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/domain/usecase/UpdateMoviesUseCase.kt
deleted file mode 100644
index 7eaa2fb1..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/domain/usecase/UpdateMoviesUseCase.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.algokelvin.movieapp.domain.usecase
-
-import com.algokelvin.movieapp.data.model.movie.Movie
-import com.algokelvin.movieapp.domain.repository.MovieRepository
-
-class UpdateMoviesUseCase(private val movieRepository: MovieRepository) {
- suspend fun execute(): List? = movieRepository.updateMovies()
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/domain/usecase/UpdateTvShowsUseCase.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/domain/usecase/UpdateTvShowsUseCase.kt
deleted file mode 100644
index 78f55139..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/domain/usecase/UpdateTvShowsUseCase.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.algokelvin.movieapp.domain.usecase
-
-import com.algokelvin.movieapp.data.model.tv.TvShow
-import com.algokelvin.movieapp.domain.repository.TvShowRepository
-
-class UpdateTvShowsUseCase(private val tvShowRepository: TvShowRepository) {
- suspend fun execute(): List? = tvShowRepository.updateTvShows()
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/presentation/App.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/presentation/App.kt
deleted file mode 100644
index d5a64170..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/presentation/App.kt
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.algokelvin.movieapp.presentation
-
-import android.app.Application
-import com.algokelvin.movieapp.BuildConfig
-import com.algokelvin.movieapp.presentation.di.Injector
-import com.algokelvin.movieapp.presentation.di.artist.ArtistSubComponent
-import com.algokelvin.movieapp.presentation.di.core.AppComponent
-import com.algokelvin.movieapp.presentation.di.core.AppModule
-import com.algokelvin.movieapp.presentation.di.core.DaggerAppComponent
-import com.algokelvin.movieapp.presentation.di.core.NetModule
-import com.algokelvin.movieapp.presentation.di.core.RemoteDataModule
-import com.algokelvin.movieapp.presentation.di.movie.MovieSubComponent
-import com.algokelvin.movieapp.presentation.di.tv.TvShowSubComponent
-
-class App: Application(), Injector {
- private lateinit var appComponent:AppComponent
-
- override fun onCreate() {
- super.onCreate()
- appComponent = DaggerAppComponent.builder()
- .appModule(AppModule(applicationContext))
- .netModule(NetModule(BuildConfig.BASE_URL))
- .remoteDataModule(RemoteDataModule(BuildConfig.API_KEY))
- .build()
- }
-
- override fun createMovieSubComponent(): MovieSubComponent {
- return appComponent.movieSubComponent().create()
- }
-
- override fun createTvShowSubComponent(): TvShowSubComponent {
- return appComponent.tvShowSubComponent().create()
- }
-
- override fun createArtistSubComponent(): ArtistSubComponent {
- return appComponent.artistSubComponent().create()
- }
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/presentation/HomeActivity.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/presentation/HomeActivity.kt
deleted file mode 100644
index 86837165..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/presentation/HomeActivity.kt
+++ /dev/null
@@ -1,35 +0,0 @@
-package com.algokelvin.movieapp.presentation
-
-import android.content.Intent
-import android.os.Bundle
-import androidx.appcompat.app.AppCompatActivity
-import androidx.databinding.DataBindingUtil
-import com.algokelvin.movieapp.R
-import com.algokelvin.movieapp.databinding.ActivityHomeBinding
-import com.algokelvin.movieapp.presentation.artist.ArtistActivity
-import com.algokelvin.movieapp.presentation.movie.MovieActivity
-import com.algokelvin.movieapp.presentation.tv.TvShowActivity
-
-class HomeActivity : AppCompatActivity() {
- private lateinit var binding: ActivityHomeBinding
-
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- binding = DataBindingUtil.setContentView(this, R.layout.activity_home)
-
- binding.movieButton.setOnClickListener {
- val intentToMovie = Intent(this, MovieActivity::class.java)
- startActivity(intentToMovie)
- }
-
- binding.tvButton.setOnClickListener {
- val intentToTvShow = Intent(this, TvShowActivity::class.java)
- startActivity(intentToTvShow)
- }
-
- binding.artistsButton.setOnClickListener {
- val intentToArtist = Intent(this, ArtistActivity::class.java)
- startActivity(intentToArtist)
- }
- }
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/presentation/artist/ArtistActivity.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/presentation/artist/ArtistActivity.kt
deleted file mode 100644
index aa91781a..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/presentation/artist/ArtistActivity.kt
+++ /dev/null
@@ -1,89 +0,0 @@
-package com.algokelvin.movieapp.presentation.artist
-
-import android.os.Bundle
-import android.view.Menu
-import android.view.MenuInflater
-import android.view.MenuItem
-import android.view.View
-import android.widget.Toast
-import androidx.appcompat.app.AppCompatActivity
-import androidx.databinding.DataBindingUtil
-import androidx.lifecycle.Observer
-import androidx.lifecycle.ViewModelProvider
-import androidx.recyclerview.widget.LinearLayoutManager
-import com.algokelvin.movieapp.R
-import com.algokelvin.movieapp.databinding.ActivityArtistBinding
-import com.algokelvin.movieapp.presentation.di.Injector
-import javax.inject.Inject
-
-class ArtistActivity : AppCompatActivity() {
- @Inject
- lateinit var factory: ArtistViewModelFactory
-
- private lateinit var binding: ActivityArtistBinding
- private lateinit var artistViewModel: ArtistViewModel
- private lateinit var adapter: ArtistAdapter
-
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- binding = DataBindingUtil.setContentView(this, R.layout.activity_artist)
-
- (application as Injector).createArtistSubComponent()
- .inject(this)
- artistViewModel = ViewModelProvider(this, factory)[ArtistViewModel::class]
-
- initRecyclerView()
- }
-
- override fun onCreateOptionsMenu(menu: Menu?): Boolean {
- val inflater: MenuInflater = menuInflater
- inflater.inflate(R.menu.update, menu)
- return true
- }
-
- override fun onOptionsItemSelected(item: MenuItem): Boolean {
- return when (item.itemId) {
- R.id.action_update -> {
- updateArtists()
- true
- }
- else -> super.onOptionsItemSelected(item)
- }
- }
-
- private fun updateArtists() {
- binding.artistProgressBar.visibility = View.VISIBLE
- val response = artistViewModel.updateArtists()
- response.observe(this, Observer {
- if (it != null) {
- adapter.setList(it)
- adapter.notifyDataSetChanged()
- binding.artistProgressBar.visibility = View.GONE
- } else {
- binding.artistProgressBar.visibility = View.GONE
- }
- })
- }
-
- private fun initRecyclerView(){
- binding.artistRecyclerView.layoutManager = LinearLayoutManager(this)
- adapter = ArtistAdapter()
- binding.artistRecyclerView.adapter = adapter
- displayPopularMovies()
- }
-
- private fun displayPopularMovies(){
- binding.artistProgressBar.visibility = View.VISIBLE
- val responseLiveData = artistViewModel.getArtists()
- responseLiveData.observe(this, Observer {
- if(it!=null){
- adapter.setList(it)
- adapter.notifyDataSetChanged()
- binding.artistProgressBar.visibility = View.GONE
- }else{
- binding.artistProgressBar.visibility = View.GONE
- Toast.makeText(applicationContext,"No data available", Toast.LENGTH_LONG).show()
- }
- })
- }
-}
\ No newline at end of file
diff --git a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/presentation/artist/ArtistAdapter.kt b/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/presentation/artist/ArtistAdapter.kt
deleted file mode 100644
index 88718740..00000000
--- a/MovieAppMVVMCleanArchitecture/app/src/main/java/com/algokelvin/movieapp/presentation/artist/ArtistAdapter.kt
+++ /dev/null
@@ -1,53 +0,0 @@
-package com.algokelvin.movieapp.presentation.artist
-
-import android.view.LayoutInflater
-import android.view.ViewGroup
-import androidx.databinding.DataBindingUtil
-import androidx.recyclerview.widget.RecyclerView
-import com.algokelvin.movieapp.R
-import com.algokelvin.movieapp.data.model.artist.Artist
-import com.algokelvin.movieapp.databinding.ListItemBinding
-import com.bumptech.glide.Glide
-
-
-class ArtistAdapter():RecyclerView.Adapter() {
- private val artistList = ArrayList