[정현수_Android] 6-1주차 과제 제출#5
Open
Rickettsia1234 wants to merge 1 commit into
Open
Conversation
JaeYoung290
reviewed
Jul 8, 2026
|
|
||
| binding.floatingActionButton.setOnClickListener { | ||
| val inputName = binding.editTextText.text.toString() | ||
| if (inputName.isNotEmpty()) { |
Collaborator
There was a problem hiding this comment.
요구 사항에는 없었지만 isNotEmpty()는 공백이 있을 경우 검증하지 못합니다. 따라서 trim()을 사용해서 공백 제거 후 검증하는 것이 좋아보입니다.
| holder.binding.tvName.text = nameList[position] | ||
|
|
||
| holder.itemView.setOnClickListener { | ||
| onItemClick(position) |
Collaborator
There was a problem hiding this comment.
중간에 있는 아이템을 삭제하고 그 뒤에 있는 아이템을 빠르게 클릭했을 때, 만약 뒤에 있는 아이템이 재바인딩되지 않은 상태라면 유효하지 않은 position이 전달되어 버그가 발생할 수 있습니다. 클릭했을 때 유효성 검사를 하는 것이 좋아보입니다.
Comment on lines
+34
to
+35
| android:layout_width="409dp" | ||
| android:layout_height="610dp" |
Collaborator
There was a problem hiding this comment.
dp 고정값을 주신 이유가 따로 있으실까요?
보통은 제약 조건으로 조절하는 것이 좋습니다.
Comment on lines
+5
to
+8
| android:layout_marginStart="16dp" | ||
| android:layout_marginTop="4dp" | ||
| android:layout_marginEnd="16dp" | ||
| android:layout_marginBottom="4dp" |
Collaborator
There was a problem hiding this comment.
layout_marginHorizontal, layout_marginVertical도 사용해보시면 좋을 것 같습니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.