Skip to content

Conversation

@jusang3057
Copy link
Owner

2024 12 02

2024 11 19
실습5
2024-12-02
202024-12-02
Copy link

@skdud0629 skdud0629 left a 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)}

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("")

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)
}

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" />

Choose a reason for hiding this comment

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

Suggested change
android:textColor="@android:color/white" />
android:textColor="@color/white" />

좀 더 간결한 코드를 위해...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants