diff --git a/app/build.gradle b/app/build.gradle index eaa45425..3f9b29bb 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -3,6 +3,7 @@ plugins { id 'org.jetbrains.kotlin.android' id "kotlin-kapt" id "dagger.hilt.android.plugin" + id "com.google.firebase.crashlytics" } android { @@ -73,4 +74,11 @@ dependencies { implementation 'com.facebook.stetho:stetho:1.6.0' implementation 'com.facebook.stetho:stetho-okhttp3:1.6.0' implementation 'com.facebook.stetho:stetho-js-rhino:1.6.0' + + implementation(platform("com.google.firebase:firebase-bom:32.3.1")) + + // Add the dependencies for the Crashlytics and Analytics libraries + // When using the BoM, you don't specify versions in Firebase library dependencies + implementation("com.google.firebase:firebase-crashlytics-ktx") + implementation("com.google.firebase:firebase-analytics-ktx") } diff --git a/build.gradle b/build.gradle index 66acc338..0cea548f 100644 --- a/build.gradle +++ b/build.gradle @@ -17,4 +17,5 @@ plugins { id 'org.jetbrains.kotlin.android' version '1.7.21' apply false id 'org.jetbrains.kotlin.jvm' version '1.8.0' apply false id 'com.google.dagger.hilt.android' version '2.45' apply false + id 'com.google.firebase.crashlytics' version "2.9.9" apply false } \ No newline at end of file diff --git a/presentation/src/main/java/org/gdsc/presentation/view/MainActivity.kt b/presentation/src/main/java/org/gdsc/presentation/view/MainActivity.kt index 50b235da..bdff14bf 100644 --- a/presentation/src/main/java/org/gdsc/presentation/view/MainActivity.kt +++ b/presentation/src/main/java/org/gdsc/presentation/view/MainActivity.kt @@ -69,11 +69,21 @@ class MainActivity : BaseActivity() { navController.addOnDestinationChangedListener { controller, destination, arguments -> // bottomNavigationView Control - if (destination.id == R.id.home_fragment || destination.id == R.id.my_page_fragment || destination.id == R.id.settings_fragment) - slideUpBottomNavigationView() - else - slideDownBottomNavigationView() - + when (destination.id) { + R.id.home_fragment -> { + slideUpBottomNavigationView() + binding.navHostFragment.setPadding(0, 0, 0, 0) + } + R.id.my_page_fragment -> { + slideUpBottomNavigationView() + binding.navHostFragment.setPadding(0, 0, 0, binding.bottomNavigationView.measuredHeight) + } + else -> { + slideDownBottomNavigationView() + binding.navHostFragment.setPadding(0, 0, 0, 0) + } + } + // toolbar visibility Control when(destination.id) { R.id.home_fragment -> { diff --git a/presentation/src/main/res/layout/activity_main.xml b/presentation/src/main/res/layout/activity_main.xml index 022f3e82..816cc4c6 100644 --- a/presentation/src/main/res/layout/activity_main.xml +++ b/presentation/src/main/res/layout/activity_main.xml @@ -30,14 +30,15 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toBottomOf="@id/tool_bar" - app:layout_constraintBottom_toTopOf="@+id/bottom_navigation_view" + app:layout_constraintBottom_toBottomOf="parent" app:defaultNavHost="true" app:navGraph="@navigation/main_nav_graph"/> 36dp 335dp + 80dp + 24dp 0dp