-
Notifications
You must be signed in to change notification settings - Fork 2
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
[UI/#9] 취향 태그 뷰 / UI 구현 #24
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생했어요~! 첫 PR인데 야무지네용 ㅎㅎ
다만 레이아웃 내에 고정값으로 박힌 크기들이 많이 보이네요 ㅜㅜ 이 친구들이랑 그래들 부분 수정 부탁드려욥
app/src/main/AndroidManifest.xml
Outdated
<activity | ||
android:name="com.going.presentation.preferencetag.PreferenceTagActivity" | ||
android:exported="true" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요기 다른 애들처럼 화면회전 막아주시고, pr 올릴때는 exported false로 해서 올려주셍요 ~
build.gradle.kts
Outdated
@@ -9,6 +9,7 @@ buildscript { | |||
classpath(ClassPathPlugins.kotlinGradle) | |||
classpath(ClassPathPlugins.hilt) | |||
classpath(ClassPathPlugins.oss) | |||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.20") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
엇 요친구 없으면 안돌아가나요? 이미 들어가있는것처럼 보이는데!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
빼도 잘 돌아가네용 코끼리와 친해지기,,메모,,,
presentation/build.gradle.kts
Outdated
implementation("androidx.appcompat:appcompat:1.6.1") | ||
implementation("com.google.android.material:material:1.5.0") | ||
implementation("androidx.constraintlayout:constraintlayout:2.1.4") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요 친구들도 이미 들어가있어 보이는데 확인해주세요 ~
private var _adapter: PreferenceTagAdapter? = null | ||
private val adapter get() = requireNotNull(_adapter) { getString(R.string.adapter_not_initialized_error_msg) } | ||
private val viewModel by viewModels<PreferenceTagViewModel>() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
사소한거긴 한데, 저는 용도가 다른 변수들 사이에는 한줄 띄워두어용 ! 지금 보면 15,16 / 17 느낌으로?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
사소한 피드백 좋습니다!
context: Context, | ||
private val listener: OnPreferenceSelectedListener | ||
) : | ||
ListAdapter<PreferenceData, PreferenceTagViewHolder>(diffUtil) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
히야 굿굿 !
android:layout_width="48dp" | ||
android:layout_height="48dp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
라디오 버튼들도 크기를 고정해두면 안될 것 같아요 ! 5개를 chain을 걸어서 packed 상태로 두던가, 아니면 weight를 활용하던가 해서 반응성 있는 레이아웃으로 구현해주세요 ~
<item name="android:layout_width">48dp</item> | ||
<item name="android:layout_height">48dp</item> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여기도 고정해두면 안될 것 같아요 ~~
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="177dp" | ||
android:height="2dp" | ||
android:viewportWidth="177" | ||
android:viewportHeight="2"> | ||
<path | ||
android:pathData="M0,1L177,1" | ||
android:strokeWidth="0.5" | ||
android:fillColor="#00000000" | ||
android:strokeColor="#000000"/> | ||
</vector> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
선을 이미지로 활용하기 보다는, View의 색상을 검정색으로 두고 고정 height를 줘서 선처럼 보이도록 하는 방법, Material Divider를 활용하는 방법 중에 선택해서 활용하는게 더 바람직해보입니당
android:id="@+id/btn_preference_start" | ||
style="@style/button_style" | ||
android:layout_width="0dp" | ||
android:layout_height="50dp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여기도 wrap_content와 padding 값으로 구현해봅시다 ~
만약 내부 텍스트가 엄청 커지면 아마 잘릴거에요
android:layout_width="24dp" | ||
android:layout_height="24dp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여기도 고정 dp 금지 ~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
코드 완전 잘 보고갑니다!!!
너무 잘했구 고생한게 많이 보여서 고맙네욤 ㅎㅎ
rgPreferenceTag.setOnCheckedChangeListener { group, 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 | ||
) | ||
|
||
if (checkedId in selectedButtonIdList) { | ||
listener.onPreferenceSelected(item) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
group의 경우 사용하지 않는 변수기때문에 _ 로 바꾸면 좋을 것 같습니다!
아마 그렇게 하라고 가이드도 뜰거에요 :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오호 좋은 정보 감사합니당
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item android:color="@color/white_000" android:state_checked="true" /> | ||
<item android:color="@color/black_000" /> | ||
</selector> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
개인적인 생각이긴 하지만 저는 checked="false" 도 써두는게 명확하게 표시할 수 있어서 좋다고 생각해요!
true일때는 이거, false일때는 저거 이렇게 표기돼있는게 더 명확하고 한눈에 볼 수 있다고 생각합니당 :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
코리 대응 야무지게 해주셔서 감사합니닷 :)
app:layout_constraintTop_toTopOf="parent" | ||
tools:text="관광" /> | ||
|
||
<RadioGroup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여기 width에 chain 추후에 디자인 나온거 수정할때 꼭 걸어주세요~
app:layout_constraintTop_toTopOf="parent" | ||
tools:text="휴식" /> | ||
|
||
<TextView |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요거 그냥 view로 바꾸고 tv 대신 view_ 로 가도 될거가타용 ~
android:layout_marginStart="31dp" | ||
android:layout_marginTop="27dp" | ||
android:fontFamily="@font/pretendard_bold" | ||
android:textColor="@color/black_000" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요친구들도 디잔대로 바꿀때 textView의 style로 적용시켜주세요~
⛳️ Work Description
📸 Screenshot
device-2024-01-06-004809.mp4
📢 To Reviewers
버튼 눌렀을 때 텍스트 색상도 바뀌게 다시 수정했습니다!