Skip to content

Commit

Permalink
[ADD/#30] 기록 저장 성공 시 토스트 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Marchbreeze committed Jul 30, 2024
1 parent b8c9aa0 commit cdcbead
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ class RhythmFragment : BaseFragment<FragmentRhythmBinding>(R.layout.fragment_rhy
when (state) {
is UiState.Success -> {
// TODO : 여기에서 기존 걸음 0으로 만드는 로직 필요
toast(stringOf(R.string.rhythm_toast_save_success))
}

is UiState.Failure -> toast(stringOf(R.string.error_msg))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class RhythmSaveDialog :
super.onStart()
dialog?.window?.apply {
setLayout(
WindowManager.LayoutParams.MATCH_PARENT,
WindowManager.LayoutParams.WRAP_CONTENT,
WindowManager.LayoutParams.WRAP_CONTENT,
)
setBackgroundDrawableResource(R.color.transparent)
Expand Down
10 changes: 6 additions & 4 deletions presentation/src/main/res/layout/dialog_rhythm_save.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
</data>

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="30dp"
android:background="@drawable/shape_white_fill_16_rect"
android:paddingBottom="16dp">

Expand All @@ -19,6 +18,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:lineSpacingMultiplier="1.3"
android:layout_marginTop="32dp"
android:gravity="center"
android:text="@string/rhythm_stop_tv_title"
Expand All @@ -29,12 +29,13 @@
<TextView
android:id="@+id/btn_save"
style="@style/TextAppearance.Stempo.Head4"
android:layout_width="0dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:layout_marginEnd="6dp"
android:background="@drawable/shape_purple10_fill_12_rect"
android:gravity="center"
android:paddingHorizontal="36dp"
android:paddingVertical="15dp"
android:text="@string/rhythm_stop_btn_save"
android:textColor="@color/purple_50"
Expand All @@ -45,12 +46,13 @@
<TextView
android:id="@+id/btn_pause"
style="@style/TextAppearance.Stempo.Head4"
android:layout_width="0dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:layout_marginTop="32dp"
android:background="@drawable/shape_purple50_fill_12_rect"
android:gravity="center"
android:paddingHorizontal="36dp"
android:paddingVertical="15dp"
android:text="@string/rhythm_stop_btn_pause"
android:textColor="@color/purple_10"
Expand Down
1 change: 1 addition & 0 deletions presentation/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<string name="rhythm_tv_title">리듬에 맞춰 걸어주세요!</string>
<string name="rhythm_btn_change_level">단계 변경하기</string>
<string name="rhythm_btn_submit_level">완료하기</string>
<string name="rhythm_toast_save_success">기록 저장이 완료되었어요!</string>

<string name="rhythm_stop_tv_title">종료하기를 누르면\n지금까지의 걸음이 기록돼요.\n잠시 멈추시는거라면\n정지하기를 눌러주세요.</string>
<string name="rhythm_stop_btn_save">종료하기</string>
Expand Down

0 comments on commit cdcbead

Please sign in to comment.