Skip to content

Commit

Permalink
Refactor/#391 모험 기록 뷰 디자인 변경 (#396)
Browse files Browse the repository at this point in the history
* design: color resource 추가

* design: 성공, 실패를 보여주는 라벨 추가

* design: 뷰 제목 변경을 위해 strings resource 변경

* design: drawable resource 이름변경으로 인한 코드 수정

* design: 폰트 변경

* design: color resource 이름 변경
  • Loading branch information
hyunji1203 authored Oct 4, 2023
1 parent c6c3a09 commit 4e6ea20
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ class AdventureHistoryViewHolder(private val binding: ItemHistoryBinding) : Recy

private fun setSuccessOrFailure(resultType: AdventureResultType) {
when (resultType) {
AdventureResultType.SUCCESS -> binding.ivAdventureHistoryStamp.setImageResource(R.drawable.ic_success_lable)
AdventureResultType.FAIL -> binding.ivAdventureHistoryStamp.setImageResource(R.drawable.ic_fail_lable)
AdventureResultType.SUCCESS -> binding.ivAdventureHistoryStamp.setImageResource(R.drawable.ic_success_label)
AdventureResultType.FAIL -> binding.ivAdventureHistoryStamp.setImageResource(R.drawable.ic_fail_label)
AdventureResultType.NONE -> {}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ class AdventureResultActivity : AppCompatActivity(), AnalyticsDelegate by Defaul
}

private fun setSuccessTypeView(destinationName: String) {
binding.ivAdventureResultStamp.setImageResource(R.drawable.ic_success_lable)
binding.ivAdventureResultStamp.setImageResource(R.drawable.ic_success_label)
binding.tvAdventureResultDestination.text = destinationName
}

private fun setFailTypeView() {
binding.ivAdventureResultStamp.setImageResource(R.drawable.ic_fail_lable)
binding.ivAdventureResultStamp.setImageResource(R.drawable.ic_fail_label)
binding.tvAdventureResultDestination.text = getString(R.string.adventureResult_fail_destination_name)
}

Expand Down
6 changes: 6 additions & 0 deletions android/app/src/main/res/drawable/ic_success_label.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<vector android:alpha="0.8" android:height="132dp"
android:viewportHeight="132" android:viewportWidth="262"
android:width="262dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF0000" android:pathData="M0,58.67L262,0V73.33L0,132V58.67Z"/>
<path android:fillColor="#ffffff" android:pathData="M31.81,82.36C31.51,81.22 30.91,80.41 30.02,79.92C29.14,79.44 27.92,79.37 26.36,79.71C25.36,79.93 24.57,80.23 23.98,80.62C23.39,80.99 22.99,81.41 22.76,81.88C22.54,82.36 22.46,82.86 22.55,83.38C22.6,83.82 22.75,84.19 22.98,84.5C23.23,84.8 23.57,85.05 24.01,85.24C24.46,85.42 25,85.56 25.66,85.64C26.31,85.73 27.07,85.77 27.95,85.76L30.97,85.74C33.01,85.73 34.8,85.92 36.32,86.3C37.84,86.68 39.13,87.23 40.19,87.97C41.24,88.7 42.08,89.59 42.71,90.65C43.34,91.71 43.79,92.92 44.04,94.28C44.45,96.64 44.23,98.76 43.36,100.64C42.5,102.53 41.07,104.13 39.07,105.46C37.09,106.78 34.59,107.77 31.59,108.43C28.5,109.11 25.72,109.24 23.26,108.82C20.8,108.4 18.77,107.38 17.15,105.75C15.55,104.1 14.47,101.79 13.92,98.79L23.08,96.78C23.33,97.86 23.77,98.72 24.39,99.36C25.01,100 25.79,100.42 26.74,100.61C27.7,100.8 28.79,100.76 30.02,100.49C31.04,100.26 31.88,99.94 32.53,99.54C33.18,99.13 33.64,98.66 33.92,98.12C34.19,97.59 34.29,97.03 34.19,96.45C34.08,95.9 33.82,95.46 33.4,95.13C32.99,94.78 32.37,94.53 31.53,94.38C30.7,94.21 29.59,94.13 28.22,94.12L24.55,94.13C21.28,94.14 18.59,93.53 16.49,92.32C14.4,91.1 13.1,89.09 12.61,86.29C12.19,84.02 12.44,81.9 13.35,79.94C14.26,77.95 15.72,76.25 17.71,74.82C19.71,73.38 22.12,72.36 24.93,71.74C27.79,71.11 30.36,71.05 32.63,71.56C34.89,72.06 36.75,73.07 38.2,74.58C39.66,76.08 40.6,78 41.03,80.34L31.81,82.36ZM64.2,63.62L73.84,61.5L77.96,84.43C78.45,87.16 78.22,89.66 77.29,91.93C76.36,94.2 74.84,96.12 72.73,97.71C70.63,99.29 68.05,100.41 65.01,101.08C61.95,101.75 59.17,101.81 56.68,101.24C54.18,100.66 52.11,99.53 50.47,97.83C48.85,96.11 47.79,93.89 47.3,91.17L43.18,68.24L52.82,66.12L56.79,88.21C56.99,89.32 57.41,90.25 58.05,91.02C58.69,91.78 59.48,92.31 60.43,92.61C61.38,92.91 62.41,92.93 63.51,92.69C64.62,92.45 65.55,91.99 66.32,91.31C67.09,90.63 67.64,89.81 67.97,88.84C68.3,87.86 68.36,86.82 68.16,85.71L64.2,63.62ZM113.99,66.63L104.21,68.78C103.99,67.98 103.68,67.28 103.26,66.68C102.85,66.08 102.34,65.6 101.73,65.24C101.14,64.86 100.45,64.62 99.68,64.53C98.9,64.42 98.05,64.46 97.13,64.67C95.51,65.02 94.21,65.72 93.23,66.76C92.26,67.8 91.62,69.12 91.31,70.72C91.01,72.33 91.04,74.17 91.42,76.24C91.81,78.43 92.43,80.2 93.27,81.56C94.13,82.89 95.17,83.81 96.42,84.32C97.66,84.81 99.06,84.88 100.62,84.54C101.51,84.34 102.29,84.05 102.96,83.68C103.62,83.29 104.17,82.82 104.61,82.28C105.06,81.73 105.39,81.12 105.6,80.44C105.82,79.75 105.93,79.01 105.9,78.22L115.7,76.14C115.85,77.68 115.71,79.31 115.26,81.05C114.82,82.77 114.04,84.44 112.94,86.06C111.84,87.67 110.39,89.09 108.57,90.33C106.75,91.57 104.53,92.47 101.93,93.04C98.67,93.76 95.62,93.69 92.78,92.85C89.95,92.01 87.53,90.39 85.54,87.98C83.56,85.57 82.21,82.38 81.5,78.42C80.78,74.44 80.94,70.91 81.98,67.85C83.01,64.78 84.7,62.26 87.04,60.29C89.37,58.31 92.14,56.97 95.33,56.27C97.57,55.78 99.69,55.63 101.69,55.84C103.68,56.04 105.5,56.58 107.13,57.46C108.77,58.32 110.17,59.52 111.35,61.05C112.53,62.59 113.41,64.45 113.99,66.63ZM151.52,58.38L141.74,60.53C141.53,59.73 141.21,59.03 140.79,58.43C140.38,57.83 139.87,57.35 139.27,56.99C138.67,56.61 137.98,56.37 137.21,56.28C136.43,56.17 135.58,56.22 134.66,56.42C133.04,56.78 131.74,57.47 130.76,58.51C129.79,59.55 129.15,60.87 128.84,62.48C128.54,64.08 128.58,65.92 128.95,67.99C129.34,70.18 129.96,71.96 130.8,73.31C131.66,74.65 132.71,75.57 133.95,76.07C135.19,76.56 136.59,76.63 138.15,76.29C139.04,76.09 139.82,75.81 140.49,75.43C141.15,75.04 141.7,74.58 142.15,74.03C142.59,73.49 142.92,72.87 143.13,72.2C143.36,71.51 143.46,70.76 143.44,69.97L153.23,67.89C153.39,69.43 153.24,71.07 152.79,72.8C152.35,74.52 151.57,76.19 150.47,77.81C149.38,79.42 147.92,80.85 146.1,82.08C144.28,83.32 142.07,84.22 139.46,84.79C136.2,85.51 133.15,85.45 130.31,84.61C127.48,83.76 125.07,82.14 123.07,79.73C121.09,77.32 119.74,74.13 119.03,70.17C118.31,66.19 118.47,62.67 119.51,59.6C120.54,56.53 122.23,54.01 124.57,52.04C126.91,50.06 129.67,48.72 132.86,48.02C135.1,47.53 137.22,47.39 139.22,47.59C141.21,47.79 143.03,48.33 144.66,49.21C146.3,50.07 147.7,51.27 148.88,52.8C150.06,54.34 150.94,56.2 151.52,58.38ZM159.91,79.79L153.49,44L179.08,38.37L180.49,46.2L164.54,49.71L165.64,55.86L180.28,52.65L181.68,60.47L167.04,63.69L168.15,69.84L184.04,66.35L185.44,74.18L159.91,79.79ZM205.02,44.3C204.72,43.16 204.12,42.34 203.23,41.86C202.35,41.38 201.13,41.31 199.57,41.65C198.57,41.87 197.78,42.17 197.19,42.55C196.61,42.92 196.2,43.34 195.97,43.82C195.75,44.29 195.67,44.79 195.76,45.32C195.81,45.76 195.96,46.13 196.19,46.44C196.44,46.74 196.78,46.98 197.23,47.18C197.67,47.36 198.21,47.49 198.87,47.58C199.52,47.67 200.28,47.7 201.16,47.69L204.18,47.68C206.23,47.67 208.01,47.85 209.53,48.23C211.05,48.61 212.34,49.17 213.4,49.91C214.45,50.63 215.29,51.53 215.92,52.59C216.55,53.65 217,54.86 217.25,56.22C217.66,58.57 217.44,60.69 216.57,62.58C215.71,64.46 214.28,66.07 212.28,67.39C210.3,68.71 207.8,69.7 204.8,70.36C201.71,71.04 198.93,71.17 196.47,70.76C194.01,70.34 191.98,69.32 190.36,67.69C188.76,66.04 187.68,63.72 187.13,60.73L196.29,58.72C196.54,59.8 196.98,60.66 197.6,61.3C198.22,61.94 199,62.35 199.95,62.55C200.91,62.73 202,62.69 203.23,62.42C204.26,62.2 205.09,61.88 205.74,61.47C206.39,61.06 206.85,60.59 207.13,60.06C207.4,59.53 207.5,58.97 207.4,58.38C207.29,57.84 207.03,57.4 206.61,57.07C206.2,56.72 205.58,56.47 204.74,56.31C203.91,56.15 202.8,56.06 201.43,56.06L197.76,56.07C194.49,56.07 191.8,55.47 189.7,54.26C187.61,53.04 186.31,51.03 185.82,48.23C185.4,45.96 185.65,43.84 186.56,41.87C187.48,39.89 188.93,38.18 190.92,36.75C192.92,35.32 195.33,34.3 198.14,33.68C201,33.05 203.57,32.99 205.84,33.49C208.1,34 209.96,35.01 211.41,36.52C212.87,38.02 213.81,39.93 214.24,42.27L205.02,44.3ZM237.54,37.15C237.24,36.01 236.65,35.2 235.75,34.71C234.87,34.23 233.65,34.16 232.09,34.5C231.1,34.72 230.3,35.02 229.71,35.4C229.13,35.78 228.73,36.2 228.5,36.67C228.27,37.14 228.2,37.65 228.28,38.17C228.34,38.61 228.48,38.98 228.72,39.29C228.96,39.59 229.31,39.84 229.75,40.03C230.19,40.21 230.74,40.34 231.39,40.43C232.04,40.52 232.81,40.56 233.68,40.55L236.71,40.53C238.75,40.52 240.53,40.71 242.05,41.09C243.58,41.47 244.87,42.02 245.92,42.76C246.98,43.49 247.82,44.38 248.44,45.44C249.08,46.5 249.52,47.71 249.78,49.07C250.19,51.43 249.96,53.55 249.1,55.43C248.24,57.32 246.81,58.92 244.81,60.24C242.82,61.57 240.33,62.56 237.32,63.22C234.23,63.89 231.46,64.03 228.99,63.61C226.54,63.19 224.5,62.17 222.89,60.54C221.28,58.89 220.21,56.57 219.66,53.58L228.81,51.57C229.07,52.65 229.5,53.51 230.12,54.15C230.74,54.79 231.53,55.21 232.47,55.4C233.43,55.59 234.53,55.55 235.75,55.28C236.78,55.05 237.62,54.73 238.27,54.33C238.91,53.92 239.38,53.45 239.65,52.91C239.93,52.38 240.02,51.82 239.93,51.24C239.82,50.69 239.55,50.25 239.13,49.92C238.72,49.57 238.1,49.32 237.27,49.17C236.43,49 235.33,48.92 233.96,48.91L230.28,48.92C227.01,48.93 224.33,48.32 222.23,47.11C220.13,45.89 218.84,43.88 218.35,41.08C217.93,38.81 218.17,36.69 219.08,34.73C220,32.74 221.45,31.04 223.44,29.61C225.45,28.17 227.85,27.15 230.66,26.53C233.53,25.9 236.1,25.84 238.36,26.35C240.63,26.85 242.49,27.86 243.93,29.37C245.39,30.87 246.34,32.79 246.77,35.13L237.54,37.15Z"/>
</vector>
6 changes: 0 additions & 6 deletions android/app/src/main/res/drawable/ic_success_lable.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,19 @@
android:id="@+id/tv_adventureHistory_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:fontFamily="@font/pretendard_bold"
android:text="@string/history_title"
android:textColor="@color/white"
android:textSize="30sp"
app:layout_constraintBottom_toBottomOf="@+id/iv_adventureHistory_back"
app:layout_constraintStart_toEndOf="@id/iv_adventureHistory_back"
app:layout_constraintTop_toTopOf="@+id/iv_adventureHistory_back"
app:layout_constraintBottom_toBottomOf="@+id/iv_adventureHistory_back" />
app:layout_constraintTop_toTopOf="@+id/iv_adventureHistory_back" />

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_adventureHistory_visitedPlaces"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="24dp"
android:layout_marginHorizontal="12dp"
android:layout_marginTop="16dp"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
Expand Down
10 changes: 4 additions & 6 deletions android/app/src/main/res/layout/item_history.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/rect_radius_small_white"
android:backgroundTint="@color/purple_white"
android:backgroundTint="@color/white"
android:elevation="4dp"
android:layout_marginVertical="8dp"
android:layout_marginHorizontal="8dp">
Expand All @@ -39,7 +39,6 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:fontFamily="@font/pretendard_bold"
android:textColor="@color/black"
android:textSize="16sp"
android:ellipsize="end"
Expand All @@ -57,7 +56,7 @@
android:layout_marginTop="12dp"
android:adjustViewBounds="true"
android:layout_marginBottom="12dp"
android:src="@drawable/ic_success_adventure"
android:src="@drawable/ic_success_label"
app:layout_constraintWidth_percent="0.4"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_adventureHistory_name"
Expand All @@ -69,9 +68,8 @@
android:layout_height="wrap_content"
android:layout_marginEnd="12dp"
android:layout_marginBottom="12dp"
android:fontFamily="@font/pretendard_medium"
android:textColor="@color/black"
android:textSize="16sp"
android:textColor="@color/main_gray"
android:textSize="12sp"
android:text="@{adventureResult.beginTime.toLocalDate().toString()}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
Expand Down
3 changes: 2 additions & 1 deletion android/app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<color name="purple_white">#F6EBF9</color>
<color name="main_mint">#FFA5E4DB</color>
<color name="light_gray">#BDBDBD</color>
<color name="main_gray">#989898</color>
<color name="main_gray">#616161</color>
<color name="main_gray_opacity_medium">#80989898</color>
<color name="main_red">#E4A5A5</color>
<!-- <color name="main_pink">#DBB2E8</color>-->
Expand All @@ -19,4 +19,5 @@
<color name="main_yellow">#F6BF0C</color>
<color name="main_blue">#10C1FD</color>
<color name="main_pink">#E93394</color>

</resources>
Loading

0 comments on commit 4e6ea20

Please sign in to comment.