Skip to content

Commit

Permalink
[FEAT] 운영 프로덕트 mds 적용 (#474)
Browse files Browse the repository at this point in the history
* [feature/#471] 출석 화면 딤드 적용

* [feature/#471] 출석 다이얼로그 mds 적용

* [feature/#471] 출석 화면 mds 적용
  • Loading branch information
hjh1161514 authored Dec 3, 2023
1 parent a0d8a72 commit 372f9d0
Show file tree
Hide file tree
Showing 28 changed files with 202 additions and 111 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class AttendanceActivity : AppCompatActivity() {
viewModel.isFirstProgressBarActive.observe(this) {
binding.ivAttendanceProgress1Check.isInvisible = !it
binding.tvAttendanceProgress1.setTextColor(
if (it) colorOf(SoptColors.white_100) else colorOf(SoptColors.gray_100)
if (it) colorOf(SoptColors.mds_gray_10) else colorOf(SoptColors.mds_gray_500)
)
}
viewModel.isSecondProgressBarAttendance.observe(this) {
Expand All @@ -106,7 +106,7 @@ class AttendanceActivity : AppCompatActivity() {
viewModel.isSecondProgressBarActive.observe(this) {
binding.ivAttendanceProgress2Check.isInvisible = !it
binding.tvAttendanceProgress2.setTextColor(
if (it) colorOf(SoptColors.white_100) else colorOf(SoptColors.gray_100)
if (it) colorOf(SoptColors.mds_gray_10) else colorOf(SoptColors.mds_gray_500)
)
}
viewModel.isThirdProgressBarVisible.observe(this) {
Expand All @@ -122,7 +122,7 @@ class AttendanceActivity : AppCompatActivity() {
if (it) R.string.attendance_progress_third_absent else R.string.attendance_progress_before
)
binding.tvAttendanceProgress3Attendance.setTextColor(
if (it) colorOf(SoptColors.white_100) else colorOf(SoptColors.gray_100)
if (it) colorOf(SoptColors.mds_gray_10) else colorOf(SoptColors.mds_gray_500)
)
}
viewModel.isThirdProgressBarBeforeAttendance.observe(this) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class AttendanceCodeDialog : DialogFragment() {
val inset = InsetDrawable(back, 24, 0, 24, 0)
dialog?.window?.run {
setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
setDimAmount(0.70f)
setDimAmount(0.85f)
setBackgroundDrawable(inset)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,23 @@ class LogViewHolder(private val binding: ItemAttendanceHistoryLogBinding) : Recy
textAttendanceState.text = log.attendanceState
when (log.attendanceState) {
AttendanceStatus.ATTENDANCE.statusKorean -> {
textAttendanceState.backgroundTintList = ContextCompat.getColorStateList(root.context, SoptColors.sopt_green)
textAttendanceState.setTextColor(root.context.getColor(SoptColors.on_sopt_green))
textAttendanceState.backgroundTintList = ContextCompat.getColorStateList(root.context, SoptColors.mds_green_900)
textAttendanceState.setTextColor(root.context.getColor(SoptColors.mds_information))
}

AttendanceStatus.TARDY.statusKorean -> {
textAttendanceState.backgroundTintList = ContextCompat.getColorStateList(root.context, SoptColors.sopt_yellow)
textAttendanceState.setTextColor(root.context.getColor(SoptColors.on_sopt_yellow))
textAttendanceState.backgroundTintList = ContextCompat.getColorStateList(root.context, SoptColors.mds_yellow_900)
textAttendanceState.setTextColor(root.context.getColor(SoptColors.mds_attention))
}

AttendanceStatus.ABSENT.statusKorean -> {
textAttendanceState.backgroundTintList = ContextCompat.getColorStateList(root.context, SoptColors.sopt_red)
textAttendanceState.setTextColor(root.context.getColor(SoptColors.on_sopt_red))
textAttendanceState.backgroundTintList = ContextCompat.getColorStateList(root.context, SoptColors.mds_red_800)
textAttendanceState.setTextColor(root.context.getColor(SoptColors.mds_red_300))
}

AttendanceStatus.PARTICIPATE.statusKorean -> {
textAttendanceState.backgroundTintList = ContextCompat.getColorStateList(root.context, SoptColors.gray_30)
textAttendanceState.setTextColor(root.context.getColor(SoptColors.gray_100))
textAttendanceState.backgroundTintList = ContextCompat.getColorStateList(root.context, SoptColors.mds_gray_700)
textAttendanceState.setTextColor(root.context.getColor(SoptColors.mds_gray_200))
}

else -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import android.view.ViewGroup
import android.widget.Toast
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.RecyclerView
import org.sopt.official.R
import org.sopt.official.databinding.ItemAttendanceHistoryUserInfoBinding
import org.sopt.official.domain.entity.attendance.AttendanceUserInfo
import org.sopt.official.type.SoptColors
Expand All @@ -54,7 +53,7 @@ class UserInfoViewHolder(private val binding: ItemAttendanceHistoryUserInfoBindi
textUserAttendancePoint.text = "현재 출석점수는 ${userInfo.attendancePoint}점 입니다!"
(textUserAttendancePoint.text as Spannable).run {
setSpan(
(ForegroundColorSpan(ContextCompat.getColor(textUserAttendancePoint.context, SoptColors.orange_100))),
(ForegroundColorSpan(ContextCompat.getColor(textUserAttendancePoint.context, SoptColors.mds_secondary))),
9,
9 + "${userInfo.attendancePoint}".length + 1,
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/color/attendance_button.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
SOFTWARE.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/white_100" android:state_enabled="true" />
<item android:color="@color/black_40" />
<item android:color="@color/mds_gray_10" android:state_enabled="true" />
<item android:color="@color/mds_gray_600" />
</selector>
4 changes: 2 additions & 2 deletions app/src/main/res/color/attendance_button_text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
SOFTWARE.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/black_100" android:state_enabled="true" />
<item android:color="@color/gray_60" />
<item android:color="@color/mds_gray_950" android:state_enabled="true" />
<item android:color="@color/mds_gray_300" />
</selector>
10 changes: 5 additions & 5 deletions app/src/main/res/drawable/ic_attendance_arrow_left_white.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M19,12H5M5,12L12,19M5,12L12,5"
android:strokeLineJoin="round"
android:strokeWidth="1.5"
android:fillColor="#00000000"
android:pathData="M15,19L8,12L15,5"
android:strokeWidth="2"
android:strokeColor="#FCFCFC"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
android:strokeColor="#ffffff"
android:strokeLineCap="round"/>
</vector>
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/ic_attendance_check_gray.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
android:pathData="M3.833,8.667L6.5,11.333L13.166,4.667"
android:strokeLineJoin="round"
android:fillColor="#00000000"
android:strokeColor="#989BA0"
android:strokeColor="#808087"
android:strokeLineCap="round"/>
</vector>
4 changes: 2 additions & 2 deletions app/src/main/res/drawable/ic_attendance_close_gray.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
android:pathData="M12.5,4.5L4.5,12.5"
android:strokeLineJoin="round"
android:fillColor="#00000000"
android:strokeColor="#989BA0"
android:strokeColor="#808087"
android:strokeLineCap="round"/>
<path
android:strokeWidth="1"
android:pathData="M4.5,4.5L12.5,12.5"
android:strokeLineJoin="round"
android:fillColor="#00000000"
android:strokeColor="#989BA0"
android:strokeColor="#808087"
android:strokeLineCap="round"/>
</vector>
4 changes: 2 additions & 2 deletions app/src/main/res/drawable/ic_attendance_event_date.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
android:viewportWidth="16"
android:viewportHeight="16">
<path
android:fillColor="#808388"
android:fillColor="#66666D"
android:pathData="M5.167,2.667C5.167,2.39 4.943,2.167 4.667,2.167C4.391,2.167 4.167,2.39 4.167,2.667V3.877C3.171,4.018 2.385,4.805 2.252,5.81L2.194,6.245C2.184,6.319 2.175,6.393 2.166,6.467C2.142,6.663 2.297,6.833 2.494,6.833H13.506C13.703,6.833 13.858,6.663 13.834,6.467C13.825,6.393 13.816,6.319 13.806,6.245L13.748,5.81C13.615,4.805 12.829,4.018 11.833,3.877V2.667C11.833,2.39 11.609,2.167 11.333,2.167C11.057,2.167 10.833,2.39 10.833,2.667V3.778C8.948,3.61 7.052,3.61 5.167,3.778V2.667Z" />
<path
android:fillColor="#808388"
android:fillColor="#66666D"
android:pathData="M13.963,8.15C13.957,7.973 13.81,7.833 13.633,7.833H2.367C2.19,7.833 2.043,7.973 2.037,8.15C1.997,9.355 2.071,10.563 2.256,11.757C2.397,12.661 3.131,13.356 4.042,13.445L4.837,13.524C6.941,13.731 9.059,13.731 11.163,13.524L11.958,13.445C12.868,13.356 13.603,12.661 13.744,11.757C13.929,10.563 14.003,9.355 13.963,8.15Z" />
</vector>
4 changes: 2 additions & 2 deletions app/src/main/res/drawable/ic_attendance_event_location.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
android:viewportWidth="16"
android:viewportHeight="16">
<path
android:fillColor="#808388"
android:fillColor="#66666D"
android:pathData="M5.833,6.667C5.833,5.47 6.803,4.5 8,4.5C9.197,4.5 10.167,5.47 10.167,6.667C10.167,7.863 9.197,8.833 8,8.833C6.803,8.833 5.833,7.863 5.833,6.667Z" />
<path
android:fillColor="#808388"
android:fillColor="#66666D"
android:fillType="evenOdd"
android:pathData="M2.516,5.918C2.745,3.139 5.067,1 7.856,1H8.144C10.933,1 13.255,3.139 13.484,5.918C13.608,7.415 13.146,8.901 12.195,10.063L9,13.971C8.483,14.603 7.517,14.603 7,13.971L3.805,10.063C2.855,8.901 2.392,7.415 2.516,5.918ZM8,3.5C6.251,3.5 4.833,4.918 4.833,6.667C4.833,8.416 6.251,9.833 8,9.833C9.749,9.833 11.167,8.416 11.167,6.667C11.167,4.918 9.749,3.5 8,3.5Z" />
</vector>
4 changes: 2 additions & 2 deletions app/src/main/res/drawable/ic_close.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="#FCFCFC"
android:strokeColor="@color/mds_gray_300"
android:strokeLineCap="round"/>
<path
android:pathData="M6,6L18,18"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="#FCFCFC"
android:strokeColor="@color/mds_gray_300"
android:strokeLineCap="round"/>
</vector>
21 changes: 7 additions & 14 deletions app/src/main/res/drawable/ic_refresh.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,11 @@
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M3.9,5.513V10.374H8.761"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="#FCFCFC"
android:strokeLineCap="round"/>
<path
android:pathData="M5.933,14.425C6.459,15.916 7.454,17.196 8.771,18.072C10.087,18.948 11.652,19.372 13.23,19.281C14.808,19.191 16.314,18.589 17.521,17.568C18.728,16.547 19.57,15.161 19.921,13.62C20.272,12.078 20.112,10.465 19.466,9.022C18.82,7.579 17.722,6.385 16.339,5.62C14.955,4.855 13.361,4.561 11.795,4.781C10.229,5.001 8.778,5.724 7.659,6.841L3.9,10.374"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="#FCFCFC"
android:strokeLineCap="round"/>
<path
android:pathData="M8.547,19.768C10.946,20.832 13.803,20.774 16.25,19.361C20.316,17.014 21.709,11.816 19.361,7.75L19.111,7.317M4.639,16.25C2.291,12.185 3.684,6.986 7.75,4.639C10.197,3.226 13.054,3.169 15.453,4.233M2.493,16.334L5.225,17.066L5.958,14.334M18.043,9.666L18.775,6.934L21.507,7.666"
android:strokeLineJoin="round"
android:strokeWidth="1.5"
android:fillColor="#00000000"
android:strokeColor="#ffffff"
android:strokeLineCap="round"/>
</vector>
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
<size
android:width="24dp"
android:height="24dp" />
<solid android:color="@color/white_100" />
<solid android:color="@color/mds_gray_500" />
<stroke
android:width="1dp"
android:color="@color/gray_60" />
android:color="@color/mds_gray_400" />
</shape>
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
<size
android:width="24dp"
android:height="24dp" />
<solid android:color="@color/gray_100" />
<solid android:color="@color/mds_gray_10" />
<stroke
android:width="1dp"
android:color="@color/gray_80" />
android:color="@color/mds_gray_300" />
</shape>
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
<size
android:width="24dp"
android:height="24dp" />
<solid android:color="@color/black_60" />
<solid android:color="@color/mds_gray_700" />
<stroke
android:width="1dp"
android:color="@color/white_100" />
android:color="@color/mds_gray_10" />
</shape>
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,5 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="8dp" />
<stroke
android:width="1dp"
android:color="@color/gray_100" />
<solid android:color="@color/black_40" />
<solid android:color="@color/mds_gray_600" />
</shape>
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="8dp" />
<stroke
android:width="1dp"
android:color="@color/gray_40" />
<solid android:color="@color/black_80" />
<solid android:color="@color/mds_gray_700" />
</shape>
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
SOFTWARE.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/rectangle_border_gray40_radius_8" android:state_focused="true" />
<item android:drawable="@drawable/rectangle_border_gray40_radius_8" android:state_enabled="false" />
<item android:drawable="@drawable/rectangle_black40_radius_8" />
<item android:drawable="@drawable/rectangle_gray600_radius_8" android:state_focused="true" />
<item android:drawable="@drawable/rectangle_gray600_radius_8" android:state_enabled="false" />
<item android:drawable="@drawable/rectangle_gray700_radius_8" />
</selector>
31 changes: 31 additions & 0 deletions app/src/main/res/drawable/shape_gradient_black.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
MIT License
Copyright (c) 2023 SOPT Makers
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:startColor="#0F1012"
android:endColor="#00FFFFFF"
android:type="linear"
android:angle="90"/>
</shape>
Loading

0 comments on commit 372f9d0

Please sign in to comment.