Conversation
There was a problem hiding this comment.
1주차 미션 완료하시느라 정말 수고 많으셨습니다! 😃 색상 리소스(colors.xml) 분리도 완벽하게 해주셨고, 이미지 파일명도 ic_ 접두어를 써서 아주 깔끔하게 잘 정리해주셨네요!
코드 전반적으로 훌륭하게 동작하지만, 더 완성도 높은 앱을 위해 몇 가지 개선하면 좋을 부분들을 적어두었습니다! 또한 사진같은 요소들을 올리실때에는 마크다운(Markdown)을 활용하면 훨씬 보기 좋게 작성할 수 있습니다!
ex) 파이프 기호(|)로 칸을 나누고 하이픈(---)으로 두 번째 줄을 구분해 주는 방식
나중에 pr제출하실때 사진이 많다면은 표로 정리해서 올려주세요!
| val ivHappy = findViewById<ImageView>(R.id.iv_happy) | ||
| val tvHappy = findViewById<TextView>(R.id.tv_happy) | ||
|
|
||
| val ivExcited = findViewById<ImageView>(R.id.iv_excited) | ||
| val tvExcited = findViewById<TextView>(R.id.tv_excited) | ||
|
|
||
| val ivSoso = findViewById<ImageView>(R.id.iv_soso) | ||
| val tvSoso = findViewById<TextView>(R.id.tv_soso) | ||
|
|
||
| val ivUnrest = findViewById<ImageView>(R.id.iv_unrest) | ||
| val tvUnrest = findViewById<TextView>(R.id.tv_unrest) | ||
|
|
||
| val ivUpset = findViewById<ImageView>(R.id.iv_upset) | ||
| val tvUpset = findViewById<TextView>(R.id.tv_upset) | ||
|
|
||
| val textViews = listOf(tvHappy, tvExcited, tvSoso, tvUnrest, tvUpset) |
There was a problem hiding this comment.
enum~ 안녕하세요 미션아저씨에요 ! findViewById를 10번이나 써서 구현을 해주셨는데 이거는 옛날에 쓰던 방식입니다! 요즘에는 뷰바인딩을 써서 구현을 하는 추세이니 다음 미션때부터는 고려해서 써주세요!
| <ImageView | ||
| android:id="@+id/iv_upset" | ||
| android:layout_width="80dp" | ||
| android:layout_height="90dp" | ||
| android:layout_marginTop="20dp" | ||
| android:src="@drawable/ic_upset" | ||
| app:layout_constraintEnd_toEndOf="parent" | ||
| app:layout_constraintStart_toStartOf="parent" | ||
| app:layout_constraintTop_toBottomOf="@id/tv_unrest" /> | ||
|
|
||
| <TextView | ||
| android:id="@+id/tv_upset" | ||
| android:layout_width="wrap_content" | ||
| android:layout_height="wrap_content" | ||
| android:layout_marginTop="8dp" | ||
| android:text="부글부글 화가 나요" | ||
| android:textColor="@color/black" | ||
| app:layout_constraintEnd_toEndOf="parent" | ||
| app:layout_constraintStart_toStartOf="parent" | ||
| app:layout_constraintTop_toBottomOf="@id/iv_upset" /> | ||
|
|
There was a problem hiding this comment.
맨 아래에 있는 '화가 나요' 텍스트가 화면 밑으로 살짝 잘린 것 같아요! 안드로이드 기기마다 화면 세로 길이가 다르기 때문에 생기는 자연스러운 현상입니다, 복잡하게 코드를 다 뜯어고칠 필요 없이 아주 간단한 설정만으로도 화면 안에 쏙 들어오게 맞출 수 있어요! 예를 들어서
-
- 지금 코드에 layout_marginTop="40dp", "20dp" 처럼 여백이 넉넉하게 들어가 있는데, 이 수치들이나 이미지 크기(80dp)를 전체적으로 살짝만 줄여줘도 밑에 공간이 확보되면서 글자가 위로 쏙 올라올 수 있습니다!
-
- 맨 마지막 텍스트뷰에만 app:layout_constraintBottom_toBottomOf="parent"를 걸고 밑에 layout_marginBottom을 살짝 줘서 화면 안쪽으로 전체 뷰들을 끌어올리는 방법도 편하고 좋습니다. 제일 간단하고 편한 방식으로 수치만 살짝 조정해 보시면 완벽할 것 같습니다!
| android:text="선택한 감정우표를 기반으로 맞춤형 질문이 배달됩니다" | ||
| android:textColor="@color/gray_text" |
There was a problem hiding this comment.
색상은 colors.xml에 아주 잘 분리해주셨는데, xml의 android:text="오늘 하루는 어땠나요?" 같은 텍스트 값들이 아직 하드코딩되어 있습니다!
이런 값들을 res/values/strings.xml로 분리해 두면, 나중에 텍스트를 수정해야 할 때 코드를 일일이 찾아다니며 바꿀 필요 없이 xml 파일 한 곳에서만 싹 수정하면 되기 때문에 훨씬 편리해집니다!
📌feat: 1주차 미션 - 단일 화면 UI 만들기
🔗 관련 이슈
Closes #9
✨ 변경 사항
🔍 테스트
📸 스크린샷 (선택)
🚨 추가 이슈