diff --git a/app/src/main/java/org/sopt/pingle/presentation/ui/joingroup/JoinGroupCodeActivity.kt b/app/src/main/java/org/sopt/pingle/presentation/ui/joingroup/JoinGroupCodeActivity.kt index 484d9e21..71fe659c 100644 --- a/app/src/main/java/org/sopt/pingle/presentation/ui/joingroup/JoinGroupCodeActivity.kt +++ b/app/src/main/java/org/sopt/pingle/presentation/ui/joingroup/JoinGroupCodeActivity.kt @@ -18,16 +18,17 @@ class JoinGroupCodeActivity : } private fun addObservers() { - joinViewModel.run { - joinGroupData.observe(this@JoinGroupCodeActivity) { - binding.run { - tvJoinGroupCodeGroupType.text = it.keyword - tvJoinGroupCodeGroupName.text = it.name - tvJoinGroupCodeMeetingCount.text = - getString(R.string.join_group_code_meeting_count, it.meetingCount) - tvJoinGroupCodeParticipantCount.text = - getString(R.string.join_group_code_participant_count, it.participantCount) - } + joinViewModel.joinGroupData.observe(this) { joinGroupData -> + with(binding) { + tvJoinGroupCodeTag.text = joinGroupData.keyword + tvJoinGroupCodeGroupName.text = joinGroupData.name + tvJoinGroupCodeMeetingCount.text = + getString(R.string.join_group_code_meeting_count, joinGroupData.meetingCount) + tvJoinGroupCodeParticipantCount.text = + getString( + R.string.join_group_code_participant_count, + joinGroupData.participantCount + ) } } } diff --git a/app/src/main/java/org/sopt/pingle/util/component/CustomSnackbar.kt b/app/src/main/java/org/sopt/pingle/util/component/CustomSnackbar.kt index a6cebeeb..7c8ae87f 100644 --- a/app/src/main/java/org/sopt/pingle/util/component/CustomSnackbar.kt +++ b/app/src/main/java/org/sopt/pingle/util/component/CustomSnackbar.kt @@ -14,12 +14,13 @@ object CustomSnackbar { val inflater = LayoutInflater.from(view.context) val binding = ViewSnackbarBinding.inflate(inflater, null, false) - binding.tvViewSnackbar.text = message + binding.tvSnackbar.text = message val snackbar = Snackbar.make(view, message, Snackbar.LENGTH_SHORT) val snackbarLayout = snackbar.view as ViewGroup val layoutParams = snackbarLayout.layoutParams as FrameLayout.LayoutParams + snackbarLayout.layoutParams = layoutParams.apply { width = ViewGroup.LayoutParams.MATCH_PARENT height = ViewGroup.LayoutParams.WRAP_CONTENT @@ -29,7 +30,7 @@ object CustomSnackbar { marginEnd = 16.toPx() } - snackbarLayout.run { + with(snackbarLayout) { removeAllViews() setPadding(0, 0, 0, 0) addView(binding.root) diff --git a/app/src/main/res/layout/activity_join_group_code.xml b/app/src/main/res/layout/activity_join_group_code.xml index e2915ccc..f21b8699 100644 --- a/app/src/main/res/layout/activity_join_group_code.xml +++ b/app/src/main/res/layout/activity_join_group_code.xml @@ -31,7 +31,7 @@ app:layout_constraintGuide_end="@dimen/spacing16" /> + app:layout_constraintTop_toBottomOf="@id/include_join_group_code_topbar" />