Skip to content

Commit

Permalink
Feat: 홈에서 더보기 클릭 시 졸업 요건 페이지로 이동 #5
Browse files Browse the repository at this point in the history
  • Loading branch information
dkyuuum committed Jan 14, 2024
1 parent 5afd759 commit 85c952d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
10 changes: 7 additions & 3 deletions app/src/main/java/umc/com/mobile/project/ui/home/HomeFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class HomeFragment : Fragment() {
): View {
_binding = FragmentHomeBinding.inflate(inflater, container, false)

navigateGradDateFragment() // 졸업 예정일로 이동
saveCheeringMemo() // 응원의 한마디
navigateFragment() // 페이지 이동
saveCheeringMemo() // 응원의 한마디 연결

return binding.root
}
Expand All @@ -46,10 +46,14 @@ class HomeFragment : Fragment() {
_binding = null
}

private fun navigateGradDateFragment() {
private fun navigateFragment() {
binding.btnCheeringWordMove.setOnClickListener {
navigate(R.id.action_fragment_home_to_fragment_date)
}

binding.btnNavigateGradInfo.setOnClickListener {
navigate(R.id.action_fragment_home_to_fragment_grad_info)
}
}

private fun saveCheeringMemo() {
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/layout/fragment_home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@

<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/btn_cheering_word_move"
style="@style/MediumFont.10"
style="@style/MediumFont.12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="15dp"
Expand Down Expand Up @@ -226,8 +226,8 @@
app:layout_constraintTop_toTopOf="parent" />

<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_home_etc"
style="@style/MediumFont.12"
android:id="@+id/btn_navigate_grad_info"
style="@style/MediumFont.14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="20dp"
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/navigation/mobile_navigation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
<action
android:id="@+id/action_fragment_home_to_fragment_date"
app:destination="@id/fragment_date" />
<action
android:id="@+id/action_fragment_home_to_fragment_grad_info"
app:destination="@id/fragment_grad_info" />
</fragment>

<fragment
Expand Down

0 comments on commit 85c952d

Please sign in to comment.