diff --git a/app/src/main/java/com/lighthouse/ui/MainActivity.kt b/app/src/main/java/com/lighthouse/ui/MainActivity.kt index 046a1c4ca..dc384855a 100644 --- a/app/src/main/java/com/lighthouse/ui/MainActivity.kt +++ b/app/src/main/java/com/lighthouse/ui/MainActivity.kt @@ -5,7 +5,6 @@ import androidx.activity.viewModels import androidx.appcompat.app.AppCompatActivity import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen import androidx.databinding.DataBindingUtil -import androidx.navigation.findNavController import com.lighthouse.beep.R import com.lighthouse.beep.databinding.ActivityMainBinding import com.lighthouse.features.common.ext.repeatOnStarted @@ -26,7 +25,7 @@ class MainActivity : AppCompatActivity() { } private fun setUpIsLogin() { - val navController = findNavController(R.id.fcv) +// val navController = findNavController(R.id.fcv) repeatOnStarted { viewModel.isLogin().collect { isLogin -> if (isLogin) { diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index dff29de81..5502607ff 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -15,8 +15,5 @@ android:layout_width="match_parent" android:layout_height="match_parent" app:defaultNavHost="true" - app:layout_constraintBottom_toTopOf="@id/bnv" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" /> + app:navGraph="@navigation/main_graph"/> diff --git a/app/src/main/res/navigation/main_graph.xml b/app/src/main/res/navigation/main_graph.xml index f714a424e..75471329a 100644 --- a/app/src/main/res/navigation/main_graph.xml +++ b/app/src/main/res/navigation/main_graph.xml @@ -3,4 +3,5 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/main_graph"> + \ No newline at end of file diff --git a/features/ui-gifticonlist/build.gradle.kts b/features/ui-gifticonlist/build.gradle.kts index e99115469..577a8c48c 100644 --- a/features/ui-gifticonlist/build.gradle.kts +++ b/features/ui-gifticonlist/build.gradle.kts @@ -20,6 +20,8 @@ dependencies { implementation(libs.androidX.appcompat) implementation(libs.androidX.constraintlayout) implementation(libs.androidX.fragment.ktx) + implementation(libs.androidX.navigation.fragment.ktx) + implementation(libs.androidX.navigation.ui.ktx) implementation(libs.material) diff --git a/features/ui-gifticonlist/src/main/java/com/lighthouse/features/gifticonlist/ui/GifticonListFragment.kt b/features/ui-gifticonlist/src/main/java/com/lighthouse/features/gifticonlist/ui/GifticonListFragment.kt new file mode 100644 index 000000000..cdf67925d --- /dev/null +++ b/features/ui-gifticonlist/src/main/java/com/lighthouse/features/gifticonlist/ui/GifticonListFragment.kt @@ -0,0 +1,5 @@ +package com.lighthouse.features.gifticonlist.ui + +import androidx.fragment.app.Fragment + +class GifticonListFragment : Fragment() diff --git a/features/ui-gifticonlist/src/main/res/navigation/gifticon_list_nav_graph.xml b/features/ui-gifticonlist/src/main/res/navigation/gifticon_list_nav_graph.xml new file mode 100644 index 000000000..ac176a8e9 --- /dev/null +++ b/features/ui-gifticonlist/src/main/res/navigation/gifticon_list_nav_graph.xml @@ -0,0 +1,10 @@ + + + + + \ No newline at end of file diff --git a/features/ui-home/src/main/java/com/lighthouse/features/home/ui/HomeLoadingFragment.kt b/features/ui-home/src/main/java/com/lighthouse/features/home/ui/HomeLoadingFragment.kt new file mode 100644 index 000000000..3fd9b8213 --- /dev/null +++ b/features/ui-home/src/main/java/com/lighthouse/features/home/ui/HomeLoadingFragment.kt @@ -0,0 +1,5 @@ +package com.lighthouse.features.home.ui + +import androidx.fragment.app.Fragment + +class HomeLoadingFragment : Fragment() diff --git a/features/ui-home/src/main/res/navigation/home_container_nav_graph.xml b/features/ui-home/src/main/res/navigation/home_container_nav_graph.xml new file mode 100644 index 000000000..8d777b390 --- /dev/null +++ b/features/ui-home/src/main/res/navigation/home_container_nav_graph.xml @@ -0,0 +1,18 @@ + + + + + + + + + \ No newline at end of file diff --git a/features/ui-home/src/main/res/navigation/home_nav_graph.xml b/features/ui-home/src/main/res/navigation/home_nav_graph.xml index 5a9ccde1e..b7113eb03 100644 --- a/features/ui-home/src/main/res/navigation/home_nav_graph.xml +++ b/features/ui-home/src/main/res/navigation/home_nav_graph.xml @@ -1,6 +1,10 @@ + android:id="@+id/home_nav_graph" + app:startDestination="@id/home_container_fragment"> + \ No newline at end of file diff --git a/features/ui-intro/build.gradle.kts b/features/ui-intro/build.gradle.kts index 879d4d4ad..80a144811 100644 --- a/features/ui-intro/build.gradle.kts +++ b/features/ui-intro/build.gradle.kts @@ -22,6 +22,8 @@ dependencies { implementation(libs.androidX.appcompat) implementation(libs.androidX.constraintlayout) implementation(libs.androidX.fragment.ktx) + implementation(libs.androidX.navigation.fragment.ktx) + implementation(libs.androidX.navigation.ui.ktx) implementation(libs.material) diff --git a/features/ui-intro/src/main/res/navigation/intro_nav_graph.xml b/features/ui-intro/src/main/res/navigation/intro_nav_graph.xml new file mode 100644 index 000000000..79def7639 --- /dev/null +++ b/features/ui-intro/src/main/res/navigation/intro_nav_graph.xml @@ -0,0 +1,10 @@ + + + + + \ No newline at end of file diff --git a/features/ui-main/src/main/res/navigation/main_nav_graph.xml b/features/ui-main/src/main/res/navigation/main_nav_graph.xml new file mode 100644 index 000000000..3f5e85f5f --- /dev/null +++ b/features/ui-main/src/main/res/navigation/main_nav_graph.xml @@ -0,0 +1,10 @@ + + + + + \ No newline at end of file diff --git a/features/ui-setting/build.gradle.kts b/features/ui-setting/build.gradle.kts index 37de26fd8..109972e01 100644 --- a/features/ui-setting/build.gradle.kts +++ b/features/ui-setting/build.gradle.kts @@ -21,6 +21,8 @@ dependencies { implementation(libs.androidX.appcompat) implementation(libs.androidX.constraintlayout) implementation(libs.androidX.fragment.ktx) + implementation(libs.androidX.navigation.fragment.ktx) + implementation(libs.androidX.navigation.ui.ktx) implementation(libs.material) diff --git a/features/ui-setting/src/main/res/navigation/setting_nav_graph.xml b/features/ui-setting/src/main/res/navigation/setting_nav_graph.xml new file mode 100644 index 000000000..9e44f0cc3 --- /dev/null +++ b/features/ui-setting/src/main/res/navigation/setting_nav_graph.xml @@ -0,0 +1,10 @@ + + + + + \ No newline at end of file