Skip to content

Commit

Permalink
[Feat] #187 - 카페 상세 정보에서 매장 위치 보기 클릭 시
Browse files Browse the repository at this point in the history
- 기술적인 문제로 상세페이지에서 지도 눌렀을 경우 튕김 현상이 있음.
- 현재는 주석처리(비활성화)
  • Loading branch information
WooBinHam committed Sep 20, 2023
1 parent 4be9473 commit 173adc7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app/src/main/java/org/cazait/ui/cafeinfo/CafeInfoFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ class CafeInfoFragment : Fragment() {
private fun setupButtons() {
initBackPressButton()
initFavoriteButton()
// initMapButton()
}

private fun initBackPressButton() {
Expand All @@ -117,6 +118,12 @@ class CafeInfoFragment : Fragment() {
}
}

private fun initMapButton() {
binding.tvMap.setOnClickListener {
navigateToCafeMapFragment()
}
}

private fun initDotIndicator(imgViewPager: ViewPager2) {
binding.dotsIndicator.attachTo(imgViewPager)
}
Expand Down Expand Up @@ -177,6 +184,7 @@ class CafeInfoFragment : Fragment() {
private fun observeToast(event: LiveData<SingleEvent<Any>>) {
binding.root.showToast(this, event, Snackbar.LENGTH_LONG)
}

private fun handleFavorite(status: Resource<String>) {
when (status) {
is Resource.Loading -> {}
Expand All @@ -187,4 +195,8 @@ class CafeInfoFragment : Fragment() {
is Resource.Error -> {}
}
}

private fun navigateToCafeMapFragment() {
findNavController().navigate(CafeInfoFragmentDirections.actionCafeInfoFragmentToCafeMapFragment())
}
}
3 changes: 3 additions & 0 deletions app/src/main/res/navigation/nav_graph.xml
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,9 @@
<action
android:id="@+id/action_cafeInfoFragment_to_reviewWriteFragment"
app:destination="@+id/reviewWriteFragment" />
<action
android:id="@+id/action_cafeInfoFragment_to_cafeMapFragment"
app:destination="@+id/cafeMapFragment" />
</fragment>
<fragment
android:id="@+id/reviewWriteFragment"
Expand Down

0 comments on commit 173adc7

Please sign in to comment.