Skip to content

Conversation

@JaeYoung290
Copy link
Owner

7주차 과제 PR입니다.

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.

수고하셨어요! 👍

private val onItemLongClick: (Int) -> Unit
) : RecyclerView.Adapter<NameAdapter.ViewHolder>() {

class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {

Choose a reason for hiding this comment

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

Suggested change
class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
inner class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {


private fun setupAddButton() {
val nameEditText = findViewById<EditText>(R.id.editText)
findViewById<Button>(R.id.addButton).setOnClickListener {

Choose a reason for hiding this comment

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

EditText는 변수로 따로 선언해주시고 Button은 따로 선언 안해주셨네용
기능적으로 문제 있는 거는 아니지만 좀 더 가독성 있는 코드를 작성하기 위해..


AlertDialog.Builder(this)
.setTitle("수정")
.setView(editText)

Choose a reason for hiding this comment

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

edittext가 들어간 커스텀 다이얼로그를 만들어보는 거는 어떨까용??

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.

3 participants