Skip to content

Commit

Permalink
[chore] #26 코드리뷰 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
Doreminwoo committed Jan 5, 2024
1 parent f6f296a commit 99777da
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -29,7 +30,7 @@ object CustomSnackbar {
marginEnd = 16.toPx()
}

snackbarLayout.run {
with(snackbarLayout) {
removeAllViews()
setPadding(0, 0, 0, 0)
addView(binding.root)
Expand Down
16 changes: 8 additions & 8 deletions app/src/main/res/layout/activity_join_group_code.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
app:layout_constraintGuide_end="@dimen/spacing16" />

<include
android:id="@+id/include_join_group_code_toppbar"
android:id="@+id/include_join_group_code_topbar"
layout="@layout/view_all_topbar_arrow_with_title"
text="@{@string/join_group_code_topbar}"
app:layout_constraintEnd_toEndOf="parent"
Expand All @@ -48,7 +48,7 @@
android:textAppearance="@style/TextAppearance.Pingle.Title.Semi.24"
android:textColor="@color/white"
app:layout_constraintStart_toEndOf="@id/gl_start"
app:layout_constraintTop_toBottomOf="@id/include_join_group_code_toppbar" />
app:layout_constraintTop_toBottomOf="@id/include_join_group_code_topbar" />

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/layout_join_group_code_group_info"
Expand Down Expand Up @@ -91,7 +91,7 @@


<TextView
android:id="@+id/tv_join_group_code_group_type"
android:id="@+id/tv_join_group_code_tag"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:background="@drawable/shape_border_radius_50"
Expand All @@ -110,8 +110,9 @@
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:textAppearance="@style/TextAppearance.Pingle.Title.Semi.24"
android:textColor="@color/black"
app:layout_constraintStart_toEndOf="@id/gl_group_info_start"
app:layout_constraintTop_toBottomOf="@id/tv_join_group_code_group_type"
app:layout_constraintTop_toBottomOf="@id/tv_join_group_code_tag"
tools:text="SOPT" />

<TextView
Expand All @@ -129,7 +130,7 @@
android:id="@+id/tv_join_group_code_participant"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing10"
android:layout_marginTop="@dimen/spacing4"
android:text="@string/join_group_code_participant"
android:textAppearance="@style/TextAppearance.Pingle.Body.Semi.14"
android:textColor="@color/g_11"
Expand All @@ -153,17 +154,16 @@
android:id="@+id/tv_join_group_code_participant_count"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="58dp"
android:text="@string/join_group_code_participant_count"
android:textAppearance="@style/TextAppearance.Pingle.Body.Med.14"
android:textColor="@color/g_08"
app:layout_constraintBottom_toBottomOf="@id/tv_join_group_code_participant"
app:layout_constraintStart_toEndOf="@id/tv_join_group_code_participant"
app:layout_constraintStart_toStartOf="@id/tv_join_group_code_meeting_count"
app:layout_constraintTop_toTopOf="@id/tv_join_group_code_participant" />
</androidx.constraintlayout.widget.ConstraintLayout>

<org.sopt.pingle.util.component.PingleEditText
android:id="@+id/et_join_group_code"
android:id="@+id/et_join_group_code_invitation"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing16"
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/layout/view_snackbar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
app:layout_constraintGuide_end="@dimen/spacing13" />

<ImageView
android:id="@+id/iv_view_snackbar_notice"
android:id="@+id/iv_snackbar_notice"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="17dp"
Expand All @@ -32,14 +32,14 @@
app:layout_constraintTop_toBottomOf="@id/gl_top" />

<TextView
android:id="@+id/tv_view_snackbar"
android:id="@+id/tv_snackbar"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:textAppearance="@style/TextAppearance.Pingle.Body.Semi.14"
android:textColor="@color/white"
app:layout_constraintBottom_toTopOf="@id/gl_bottom"
app:layout_constraintStart_toEndOf="@id/iv_view_snackbar_notice"
app:layout_constraintStart_toEndOf="@id/iv_snackbar_notice"
app:layout_constraintTop_toBottomOf="@id/gl_top"
tools:text="잘못된 초대 코드입니다" />

Expand Down

0 comments on commit 99777da

Please sign in to comment.