-
Notifications
You must be signed in to change notification settings - Fork 0
Assignment06 #3
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
base: 실습4
Are you sure you want to change the base?
Assignment06 #3
Conversation
2024 11 19
실습 5
skdud0629
left a comment
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.
수고하셨습니다! 👍
|
|
||
| name_text = findViewById(R.id.name_text) | ||
| recycler_view = findViewById(R.id.recycler_view) | ||
| nameAdapter = NameAdapter(nameList) { position ->showDeleteDialog(position)} |
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 fun showEditDialog(position: Int) { | ||
| val editText = EditText(this).apply { | ||
| hint = "수정할 이름을 입력하세요." | ||
| setText("") |
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.
커스텀 다이얼로그 활용해보시면 좋을 것 같습니다!
| holder.name_text.text = nameList[position] | ||
| holder.itemView.setOnClickListener { | ||
| onItemClick(position) | ||
| } |
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.
NameViewHolder에서 ui 로직 처리하는 걸 권장드려요!
ui가 복잡해지면 성능이 저하될 수 있습니다.
| android:layout_width="match_parent" | ||
| android:layout_height="wrap_content" | ||
| android:textSize="16sp" | ||
| android:textColor="@android:color/white" /> |
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:textColor="@android:color/white" /> | |
| android:textColor="@color/white" /> |
좀 더 간결한 코드를 위해...
2024 12 02