Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX/#152] QA 이슈 대응 #153

Merged
merged 6 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package com.going.presentation.entertrip.preferencetag

import androidx.recyclerview.widget.RecyclerView
import com.going.domain.entity.PreferenceData
import com.going.presentation.R
import com.going.presentation.databinding.ItemPreferenceTagBinding

class PreferenceTagViewHolder(
Expand All @@ -17,20 +16,36 @@ class PreferenceTagViewHolder(
tvPreferenceTag1.text = item.leftPrefer
tvPreferenceTag3.text = item.rightPrefer

rgPreferenceTag.setOnCheckedChangeListener { _, checkedId ->
val selectedButtonIdList = listOf(
R.id.rb_preference_1,
R.id.rb_preference_2,
R.id.rb_preference_3,
R.id.rb_preference_4,
R.id.rb_preference_5
)
val selectedButtonList = listOf(
rbPreference1,
rbPreference2,
rbPreference3,
rbPreference4,
rbPreference5
)

val checkedIndex = selectedButtonIdList.indexOf(checkedId)
if (checkedIndex != -1) {
listener.onPreferenceSelected(item, checkedIndex)
val selectedViewList = listOf(
viewRadio1,
viewRadio2,
viewRadio3,
viewRadio4,
viewRadio5
)

selectedButtonList.forEachIndexed { index, radioButton ->
radioButton.setOnClickListener {
if (radioButton.isChecked) {
listener.onPreferenceSelected(item, index)
}
}
}

selectedViewList.forEachIndexed { index, view ->
view.setOnClickListener {
selectedButtonList[index].isChecked = true
listener.onPreferenceSelected(item, index)
}
}
}
}
}
}
8 changes: 4 additions & 4 deletions presentation/src/main/res/layout/activity_profile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
android:layout_height="wrap_content"
android:background="@drawable/shape_rect_10_red300_line"
android:paddingHorizontal="8dp"
android:paddingVertical="1dp"
android:paddingVertical="3dp"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수정 감사합니다!!!!!~

android:text="#tag1"
android:textColor="@color/red_300"
app:layout_constraintEnd_toEndOf="parent"
Expand All @@ -174,7 +174,7 @@
android:layout_height="wrap_content"
android:background="@drawable/shape_rect_10_red300_line"
android:paddingHorizontal="8dp"
android:paddingVertical="1dp"
android:paddingVertical="3dp"
android:text="#tag2"
android:textColor="@color/red_300"
app:layout_constraintEnd_toEndOf="parent"
Expand All @@ -192,7 +192,7 @@
android:layout_height="wrap_content"
android:background="@drawable/shape_rect_10_red300_line"
android:paddingHorizontal="8dp"
android:paddingVertical="1dp"
android:paddingVertical="3dp"
android:text="#tag3"
android:textColor="@color/red_300"
app:layout_constraintEnd_toEndOf="parent"
Expand Down Expand Up @@ -481,8 +481,8 @@
<androidx.legacy.widget.Space
android:layout_width="0dp"
android:layout_height="17dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_profile_restart" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
Expand Down
6 changes: 3 additions & 3 deletions presentation/src/main/res/layout/activity_tendency_result.xml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
android:layout_height="wrap_content"
android:background="@drawable/shape_rect_10_red300_line"
android:paddingHorizontal="8dp"
android:paddingVertical="2dp"
android:paddingVertical="3dp"
android:textColor="@color/red_300"
app:layout_constraintHorizontal_weight="1" />

Expand All @@ -150,7 +150,7 @@
android:layout_height="wrap_content"
android:background="@drawable/shape_rect_10_red300_line"
android:paddingHorizontal="8dp"
android:paddingVertical="2dp"
android:paddingVertical="3dp"
android:textColor="@color/red_300"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintHorizontal_weight="1" />
Expand All @@ -162,7 +162,7 @@
android:layout_height="wrap_content"
android:background="@drawable/shape_rect_10_red300_line"
android:paddingHorizontal="8dp"
android:paddingVertical="2dp"
android:paddingVertical="3dp"
android:textColor="@color/red_300"
app:layout_constraintHorizontal_chainStyle="packed" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
android:id="@+id/tab_dashboard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white_000"
android:background="@drawable/layer_list_todo_unselected_indicator"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/layout_dashboard_toolbar"
app:tabIndicatorColor="@color/gray_500"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="14dp">
android:paddingBottom="6dp">

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/layout_dashboard"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="14dp">
android:paddingBottom="6dp">

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/layout_dashboard"
Expand Down
66 changes: 62 additions & 4 deletions presentation/src/main/res/layout/item_preference_tag.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
<ImageView
android:id="@+id/iv_preference_number"
android:layout_width="wrap_content"
android:adjustViewBounds="true"
android:layout_height="0dp"
android:adjustViewBounds="true"
android:paddingVertical="2dp"
android:src="@drawable/ic_preference_union"
app:layout_constraintTop_toTopOf="@id/tv_preference_number"
app:layout_constraintBottom_toBottomOf="@id/tv_preference_number"
app:layout_constraintEnd_toEndOf="@id/tv_preference_number"
app:layout_constraintStart_toStartOf="@id/tv_preference_number"
app:layout_constraintEnd_toEndOf="@id/tv_preference_number"/>
app:layout_constraintTop_toTopOf="@id/tv_preference_number" />

<TextView
android:id="@+id/tv_preference_number"
Expand Down Expand Up @@ -66,6 +66,64 @@
app:layout_constraintTop_toBottomOf="@id/layout_preference_number"
tools:text="계획은 얼만큼 짤까요?" />

<LinearLayout
android:id="@+id/layout_preference_radio"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginHorizontal="16dp"
android:orientation="horizontal"
app:layout_constraintBottom_toTopOf="@id/rg_preference_tag"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_preference_question">

<View
android:id="@+id/view_preference_radio_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="5dp"
android:layout_weight="1"
android:background="@color/white_000"
app:layout_constraintBottom_toTopOf="@id/rg_preference_tag" />

<View
android:id="@+id/view_preference_radio_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="5dp"
android:layout_weight="1"
android:background="@color/white_000"
app:layout_constraintBottom_toTopOf="@id/rg_preference_tag" />

<View
android:id="@+id/view_preference_radio_3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="5dp"
android:layout_weight="1"
android:background="@color/white_000"
app:layout_constraintBottom_toTopOf="@id/rg_preference_tag" />

<View
android:id="@+id/view_preference_radio_4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="5dp"
android:layout_weight="1"
android:background="@color/white_000"
app:layout_constraintBottom_toTopOf="@id/rg_preference_tag" />

<View
android:id="@+id/view_preference_radio_5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="5dp"
android:layout_weight="1"
android:background="@color/white_000"
app:layout_constraintBottom_toTopOf="@id/rg_preference_tag" />

</LinearLayout>

<RadioGroup
android:id="@+id/rg_preference_tag"
android:layout_width="0dp"
Expand Down Expand Up @@ -171,4 +229,4 @@

</androidx.constraintlayout.widget.ConstraintLayout>

</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
2 changes: 1 addition & 1 deletion presentation/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<string name="will_be_update">해당 기능은 추후 업데이트 예정이에요 :)</string>

<string name ="sign_in_tv_btn">카카오 로그인</string>
<string name="sign_in_tv_title">우리만의 여행을 하다</string>
<string name="sign_in_tv_title">우리다운 여행을 하다</string>

<string name="sign_in_tv_terms">개인정보처리방침</string>

Expand Down