Skip to content

Commit

Permalink
Merge branch 'develop' into fix/mypage_design
Browse files Browse the repository at this point in the history
  • Loading branch information
dogdduddy authored Sep 28, 2023
2 parents d32a38e + 75dafb3 commit 2fb7097
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 7 deletions.
8 changes: 8 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ plugins {
id 'org.jetbrains.kotlin.android'
id "kotlin-kapt"
id "dagger.hilt.android.plugin"
id "com.google.firebase.crashlytics"
}

android {
Expand Down Expand Up @@ -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")
}
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Original file line number Diff line number Diff line change
Expand Up @@ -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 -> {
Expand Down
5 changes: 3 additions & 2 deletions presentation/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"/>

<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_navigation_view"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_height="@dimen/bottom_navigation_height"
android:paddingBottom="25dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
Expand Down
2 changes: 2 additions & 0 deletions presentation/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
<dimen name="bottom_sheet_bottom_padding">36dp</dimen>
<dimen name="alert_width">335dp</dimen>

<dimen name="bottom_navigation_height">80dp</dimen>

<dimen name="content_radius">24dp</dimen>

<dimen name="none">0dp</dimen>
Expand Down

0 comments on commit 2fb7097

Please sign in to comment.