diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 20eaf0695..32b85b75d 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -36,4 +36,5 @@ dependencies { // Splash implementation(libs.splash.screen) + implementation(projects.feature.onboarding) } diff --git a/app/src/main/java/com/hmh/hamyeonham/MainActivity.kt b/app/src/main/java/com/hmh/hamyeonham/MainActivity.kt index 7ee73dc9d..a29a1e6bb 100644 --- a/app/src/main/java/com/hmh/hamyeonham/MainActivity.kt +++ b/app/src/main/java/com/hmh/hamyeonham/MainActivity.kt @@ -1,11 +1,13 @@ package com.hmh.hamyeonham +import android.content.Intent import android.os.Bundle import android.view.animation.Animation import android.view.animation.AnimationUtils import androidx.appcompat.app.AppCompatActivity import androidx.core.splashscreen.SplashScreen import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen +import com.hmh.hamyeonham.feature.onboarding.OnBoardingActivity class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { @@ -15,6 +17,7 @@ class MainActivity : AppCompatActivity() { initSplashAnimation(splashScreen) setContentView(R.layout.activity_main) + Intent(this, OnBoardingActivity::class.java).let(::startActivity) } private fun initSplashAnimation(splashScreen: SplashScreen) { diff --git a/feature/onboarding/.gitignore b/feature/onboarding/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/feature/onboarding/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/feature/onboarding/build.gradle.kts b/feature/onboarding/build.gradle.kts new file mode 100644 index 000000000..14bee7b5d --- /dev/null +++ b/feature/onboarding/build.gradle.kts @@ -0,0 +1,12 @@ +@Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed +plugins { + hmh("feature") +} + +android { + namespace = "com.hmh.hamyeonham.feature.onboarding" +} + +dependencies { + implementation(projects.core.common) +} \ No newline at end of file diff --git a/feature/onboarding/consumer-rules.pro b/feature/onboarding/consumer-rules.pro new file mode 100644 index 000000000..e69de29bb diff --git a/feature/onboarding/proguard-rules.pro b/feature/onboarding/proguard-rules.pro new file mode 100644 index 000000000..481bb4348 --- /dev/null +++ b/feature/onboarding/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/feature/onboarding/src/androidTest/java/com/hmh/hamyeonham/feature/onboarding/ExampleInstrumentedTest.kt b/feature/onboarding/src/androidTest/java/com/hmh/hamyeonham/feature/onboarding/ExampleInstrumentedTest.kt new file mode 100644 index 000000000..152c7bd4b --- /dev/null +++ b/feature/onboarding/src/androidTest/java/com/hmh/hamyeonham/feature/onboarding/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package com.hmh.hamyeonham.feature.onboarding + +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.hmh.hamyeonham.feature.onboarding.test", appContext.packageName) + } +} \ No newline at end of file diff --git a/feature/onboarding/src/main/AndroidManifest.xml b/feature/onboarding/src/main/AndroidManifest.xml new file mode 100644 index 000000000..0a1001196 --- /dev/null +++ b/feature/onboarding/src/main/AndroidManifest.xml @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/feature/onboarding/src/main/java/com/hmh/hamyeonham/feature/onboarding/OnBoardingActivity.kt b/feature/onboarding/src/main/java/com/hmh/hamyeonham/feature/onboarding/OnBoardingActivity.kt new file mode 100644 index 000000000..00e84cf4c --- /dev/null +++ b/feature/onboarding/src/main/java/com/hmh/hamyeonham/feature/onboarding/OnBoardingActivity.kt @@ -0,0 +1,21 @@ +package com.hmh.hamyeonham.feature.onboarding + +import android.os.Bundle +import androidx.appcompat.app.AppCompatActivity +import com.hmh.hamyeonham.feature.onboarding.databinding.ActivityOnBoardingBinding + +class OnBoardingActivity : AppCompatActivity() { + private lateinit var binding: ActivityOnBoardingBinding + override fun onCreate(savedInstanceState: Bundle?) { + binding = ActivityOnBoardingBinding.inflate(layoutInflater) + super.onCreate(savedInstanceState) + setContentView(binding.root) + + binding.run { + numberPicker.npCustomHours.minValue = 1 + numberPicker.npCustomHours.maxValue = 6 + numberPicker.npCustomMinutes.minValue = 1 + numberPicker.npCustomMinutes.maxValue = 59 + } + } +} diff --git a/feature/onboarding/src/main/res/layout/activity_on_boarding.xml b/feature/onboarding/src/main/res/layout/activity_on_boarding.xml new file mode 100644 index 000000000..4339e9b8c --- /dev/null +++ b/feature/onboarding/src/main/res/layout/activity_on_boarding.xml @@ -0,0 +1,16 @@ + + + + + + \ No newline at end of file diff --git a/feature/onboarding/src/main/res/layout/dialog_numberpicker_custom.xml b/feature/onboarding/src/main/res/layout/dialog_numberpicker_custom.xml new file mode 100644 index 000000000..4d6a17b74 --- /dev/null +++ b/feature/onboarding/src/main/res/layout/dialog_numberpicker_custom.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/feature/onboarding/src/main/res/values/strings.xml b/feature/onboarding/src/main/res/values/strings.xml new file mode 100644 index 000000000..73862c416 --- /dev/null +++ b/feature/onboarding/src/main/res/values/strings.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/feature/onboarding/src/main/res/values/themes.xml b/feature/onboarding/src/main/res/values/themes.xml new file mode 100644 index 000000000..c167e8f11 --- /dev/null +++ b/feature/onboarding/src/main/res/values/themes.xml @@ -0,0 +1,8 @@ + + + + + \ No newline at end of file diff --git a/feature/onboarding/src/test/java/com/hmh/hamyeonham/feature/onboarding/ExampleUnitTest.kt b/feature/onboarding/src/test/java/com/hmh/hamyeonham/feature/onboarding/ExampleUnitTest.kt new file mode 100644 index 000000000..f726f3406 --- /dev/null +++ b/feature/onboarding/src/test/java/com/hmh/hamyeonham/feature/onboarding/ExampleUnitTest.kt @@ -0,0 +1,17 @@ +package com.hmh.hamyeonham.feature.onboarding + +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/settings.gradle.kts b/settings.gradle.kts index fcc2fc01e..23ea16b58 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -19,3 +19,4 @@ dependencyResolutionManagement { rootProject.name = "HMH-Android" include(":app") include(":core:common") +include(":feature:onboarding")