Skip to content

Commit 1bbce31

Browse files
committed
🐛 러닝종료 화면 종료시 지도 깜빡임 현상 수정
1 parent cde006c commit 1bbce31

File tree

2 files changed

+12
-25
lines changed

2 files changed

+12
-25
lines changed

presentation/src/main/java/com/whyranoid/presentation/runningfinish/RunningFinishFragment.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,16 @@ internal class RunningFinishFragment :
8484

8585
private fun handleEvent(event: Event) {
8686
when (event) {
87-
is Event.NegativeButtonButtonClick -> findNavController().popBackStack()
87+
is Event.NegativeButtonButtonClick -> handleNegativeButtonClicked()
8888
is Event.PositiveButtonClick -> handlePositiveButtonClicked(event.runningHistory)
8989
}
9090
}
9191

92+
private fun handleNegativeButtonClicked() {
93+
binding.mapFragmentLayout.visibility = View.INVISIBLE
94+
findNavController().popBackStack()
95+
}
96+
9297
private fun handlePositiveButtonClicked(runningHistory: RunningHistoryUiModel) {
9398
val direction = RunningFinishFragmentDirections.actionRunningFinishFragmentToCreateRunningPostFragment(
9499
runningHistory

presentation/src/main/res/layout/fragment_running_finish.xml

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
xmlns:app="http://schemas.android.com/apk/res-auto">
44

55
<data>
6-
<import type="com.whyranoid.presentation.model.UiState"/>
7-
<import type="android.view.View"/>
6+
7+
<import type="com.whyranoid.presentation.model.UiState" />
8+
9+
<import type="android.view.View" />
810

911
<variable
1012
name="vm"
@@ -32,12 +34,13 @@
3234
</com.google.android.material.appbar.AppBarLayout>
3335

3436
<androidx.constraintlayout.widget.ConstraintLayout
37+
android:id="@+id/map_fragment_layout"
3538
android:layout_width="match_parent"
3639
android:layout_height="0dp"
3740
app:layout_constraintBottom_toTopOf="@id/running_history_item"
3841
app:layout_constraintTop_toBottomOf="@id/tool_bar">
3942

40-
<fragment xmlns:app="http://schemas.android.com/apk/res-auto"
43+
<fragment
4144
android:id="@+id/map_fragment"
4245
android:name="com.naver.maps.map.MapFragment"
4346
android:layout_width="match_parent"
@@ -82,26 +85,5 @@
8285
app:layout_constraintEnd_toEndOf="parent"
8386
app:layout_constraintStart_toEndOf="@id/btn_positive" />
8487

85-
<FrameLayout
86-
android:id="@+id/frame_progress_running"
87-
android:layout_width="match_parent"
88-
android:layout_height="match_parent"
89-
android:background="@color/black"
90-
android:alpha="0.8"
91-
android:translationZ="@{vm.runningFinishDataState instanceof UiState.Success ? 0f : 10f }"
92-
android:visibility="@{vm.runningFinishDataState instanceof UiState.Success ? View.GONE : View.VISIBLE }">
93-
94-
<com.google.android.material.progressindicator.CircularProgressIndicator
95-
android:id="@+id/progressindicator_running"
96-
android:layout_width="wrap_content"
97-
android:layout_height="wrap_content"
98-
android:layout_gravity="center"
99-
android:contentDescription="@string/running_finish_progress_description"
100-
android:indeterminate="true"
101-
android:visibility="@{vm.runningFinishDataState instanceof UiState.Success ? View.GONE : View.VISIBLE }"
102-
app:indicatorColor="?attr/colorOnPrimary" />
103-
104-
</FrameLayout>
105-
10688
</androidx.constraintlayout.widget.ConstraintLayout>
10789
</layout>

0 commit comments

Comments
 (0)