Skip to content

Commit

Permalink
Merge pull request #85 from team-JMT/fix/webview_bridge
Browse files Browse the repository at this point in the history
웹뷰 및 네비게이션 크기 수정
  • Loading branch information
soopeach authored Sep 27, 2023
2 parents 91c577b + 8d7ee51 commit b0f8505
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,20 @@ class MainActivity : BaseActivity() {
navController.addOnDestinationChangedListener { controller, destination, arguments ->

// bottomNavigationView Control
if (destination.id == R.id.home_fragment || destination.id == R.id.my_page_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) {
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 @@ -13,6 +13,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 b0f8505

Please sign in to comment.