From eff09782e0c309e084267141e570d61aa7f070ce Mon Sep 17 00:00:00 2001 From: dkyuuum Date: Tue, 20 Feb 2024 22:35:42 +0900 Subject: [PATCH 1/2] =?UTF-8?q?Design:=20=EC=84=A4=EC=A0=95=20=EA=B0=9C?= =?UTF-8?q?=EC=9D=B8=EC=A0=95=EB=B3=B4=EC=B2=98=EB=A6=AC=EB=B0=A9=EC=B9=A8?= =?UTF-8?q?,=20=EC=84=9C=EB=B9=84=EC=8A=A4=20=EC=9D=B4=EC=9A=A9=EC=95=BD?= =?UTF-8?q?=EA=B4=80=20=ED=85=8D=EC=8A=A4=ED=8A=B8=20=EC=83=89=EC=83=81=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/res/layout/fragment_setting_policy_privacy.xml | 1 + app/src/main/res/layout/fragment_setting_service_terms.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/app/src/main/res/layout/fragment_setting_policy_privacy.xml b/app/src/main/res/layout/fragment_setting_policy_privacy.xml index a21bdb7..5a0ed55 100644 --- a/app/src/main/res/layout/fragment_setting_policy_privacy.xml +++ b/app/src/main/res/layout/fragment_setting_policy_privacy.xml @@ -46,6 +46,7 @@ Date: Wed, 21 Feb 2024 00:12:36 +0900 Subject: [PATCH 2/2] =?UTF-8?q?Fix:=20=EC=A1=B8=EC=97=85=EC=9A=94=EA=B1=B4?= =?UTF-8?q?/=EA=B0=9C=EC=9D=B8=EB=B3=84=20=EC=9D=B4=EC=88=98=20=ED=98=84?= =?UTF-8?q?=ED=99=A9=20=EB=B2=84=EA=B7=B8=20=ED=95=B4=EA=B2=B0=20=EC=9E=84?= =?UTF-8?q?=EC=8B=9C=20=EC=BD=94=EB=93=9C=20#21?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/gradInfo/CompletionStateFragment.kt | 42 +++++++++++++++++-- app/src/main/res/layout/fragment_home.xml | 13 +----- 2 files changed, 40 insertions(+), 15 deletions(-) diff --git a/app/src/main/java/umc/com/mobile/project/ui/gradInfo/CompletionStateFragment.kt b/app/src/main/java/umc/com/mobile/project/ui/gradInfo/CompletionStateFragment.kt index 675c6d0..a7805d8 100644 --- a/app/src/main/java/umc/com/mobile/project/ui/gradInfo/CompletionStateFragment.kt +++ b/app/src/main/java/umc/com/mobile/project/ui/gradInfo/CompletionStateFragment.kt @@ -24,13 +24,13 @@ class CompletionStateFragment : Fragment() { _binding = FragmentCompletionStateBinding.inflate(inflater, container, false) viewModel.getCompletionInfo() // 사용자 개인별 이수 현황 조회 api - viewModel.completionInfo.observe(viewLifecycleOwner, Observer { + viewModel.completionInfo.observe(viewLifecycleOwner, Observer { it -> val completionDtoMap: List>>? = it?.result?.completionDtoMap - + val basicKeyList = listOf("필수교양(기초)", "필수(기초)교양", "필수교양") /** * 필수 교양 (기초) */ - completionDtoMap?.firstOrNull { it.containsKey("필수교양(기초)") }?.get("필수교양(기초)")?.let { requiredBasicCourses1 -> +/* completionDtoMap?.firstOrNull { it.containsKey("필수교양(기초)") }?.get("필수교양(기초)")?.let { requiredBasicCourses1 -> binding.tvBasic1.text = requiredBasicCourses1[0] binding.tvBasic1Content.text = requiredBasicCourses1[1] binding.tvBasic2.text = requiredBasicCourses1[2] @@ -44,10 +44,29 @@ class CompletionStateFragment : Fragment() { // binding.tvBasic5Content.text = requiredBasicCourses1[9] // binding.tvBasic6.text = requiredBasicCourses1[10] // binding.tvBasic6Content.text = requiredBasicCourses1[11] + }*/ + val requiredBasicCourses = basicKeyList.mapNotNull { key -> + completionDtoMap?.firstOrNull { it.containsKey(key) }?.get(key) + } + + if (requiredBasicCourses.isNotEmpty()) { + val requiredBasicCourses1 = requiredBasicCourses.first() + binding.tvBasic1.text = requiredBasicCourses1[0] + binding.tvBasic1Content.text = requiredBasicCourses1[1] + + if (requiredBasicCourses1.size > 2) { + binding.tvBasic2.text = requiredBasicCourses1[2] + binding.tvBasic2Content.text = requiredBasicCourses1[3] + } + + if (requiredBasicCourses1.size > 4) { + binding.tvBasic3.text = requiredBasicCourses1[4] + binding.tvBasic3Content.text = requiredBasicCourses1[5] + } } /** - * 필수 교양 (소양) + * 필수 교양 (소양) - 나단 */ completionDtoMap?.firstOrNull { it.containsKey("필수교양(소양)") }?.get("필수교양(소양)")?.let { requiredBasicCourses2 -> binding.tvSoyang1.text = requiredBasicCourses2[0] @@ -57,6 +76,21 @@ class CompletionStateFragment : Fragment() { binding.tvTotalScore.text = requiredBasicCourses2[5] } + /** + * 필수 교양 (소양) - 준현 + */ + /* + completionDtoMap?.firstOrNull { it.containsKey("토대교양") }?.get("토대교양")?.let { requiredBasicCourses2 -> + binding.tvSoyang1.text = requiredBasicCourses2[0] + binding.tvSoyang1Content.text = requiredBasicCourses2[1] + binding.tvSoyang2.text = requiredBasicCourses2[2] + binding.tvSoyang2Content.text = requiredBasicCourses2[3] + } + completionDtoMap?.firstOrNull { it.containsKey("소 계") }?.get("소 계")?.let { + binding.tvTotalScore.text = it[0] + } + */ + /** * 트랙 1, 트랙 2 */ diff --git a/app/src/main/res/layout/fragment_home.xml b/app/src/main/res/layout/fragment_home.xml index f2c0a06..fc275bd 100644 --- a/app/src/main/res/layout/fragment_home.xml +++ b/app/src/main/res/layout/fragment_home.xml @@ -50,20 +50,11 @@ android:id="@+id/iv_home_notification" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginEnd="18dp" + android:layout_marginEnd="22dp" android:src="@drawable/ic_notification_white_24" app:layout_constraintBottom_toBottomOf="@+id/iv_home_logo" - app:layout_constraintEnd_toStartOf="@+id/iv_home_my_page" - app:layout_constraintTop_toTopOf="@+id/iv_home_logo" /> - - + app:layout_constraintTop_toTopOf="@+id/iv_home_logo" />