diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/InputInfoActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/InputInfoActivity.kt index 4141b232..625e40d1 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/InputInfoActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/InputInfoActivity.kt @@ -51,6 +51,7 @@ class InputInfoActivity : BindingActivity(R.layout.act layoutInputName.error = null } } + override fun afterTextChanged(p0: Editable?) {} }) } @@ -70,6 +71,7 @@ class InputInfoActivity : BindingActivity(R.layout.act layoutInputYear.error = null } } + override fun afterTextChanged(p0: Editable?) {} }) } @@ -98,16 +100,18 @@ class InputInfoActivity : BindingActivity(R.layout.act } private fun saveInfo(user: User) { - user.name = binding.etName.text.toString() - user.gender = - if (binding.chip1.isChecked) { - binding.chip1.text.toString() - } else if (binding.chip2.isChecked){ - binding.chip2.text.toString() - } else { - null - } - user.bornYear = binding.etYear.text.toString().toInt() + with(binding) { + user.name = etName.text.toString() + user.gender = + if (chip1.isChecked) { + chip1.text.toString() + } else if (chip2.isChecked) { + chip2.text.toString() + } else { + null + } + user.bornYear = etYear.text.toString().toInt() + } } private fun goSelectFamilyActivity() { @@ -120,12 +124,18 @@ class InputInfoActivity : BindingActivity(R.layout.act if (userData != null) { saveInfo(userData) if (!userData.isReceiver) { //초대하는 사람 - Log.e("yeonjin", "inputInfo parcelable : ${userData?.isReceiver} + ${userData?.name} + ${userData?.gender} + ${userData?.bornYear}") + Log.e( + "yeonjin", + "inputInfo parcelable : ${userData?.isReceiver} + ${userData?.name} + ${userData?.gender} + ${userData?.bornYear}" + ) startActivity(Intent(this, SelectFamilyActivity::class.java).apply { putExtra("userData", userData) }) } else { //초대받는 사람 - Log.e("yeonjin", "inputInfo parcelable : ${userData?.isReceiver} + ${userData?.name} + ${userData?.gender} + ${userData?.bornYear}") + Log.e( + "yeonjin", + "inputInfo parcelable : ${userData?.isReceiver} + ${userData?.name} + ${userData?.gender} + ${userData?.bornYear}" + ) startActivity(Intent(this, QuestActivity::class.java).apply { putExtra("userData", userData) }) diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/SelectFamilyActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/SelectFamilyActivity.kt index 85e1f9fd..37eea778 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/SelectFamilyActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/SelectFamilyActivity.kt @@ -72,13 +72,16 @@ class SelectFamilyActivity : } private fun saveInfo(user: User) { - user.isInvitorChild = binding.chip1.isChecked - user.relationInfo = - if (binding.chip3.isChecked) { - binding.chip3.text.toString() - } else { - binding.chip4.text.toString() - } + with(binding) { + user.isInvitorChild = chip1.isChecked + user.relationInfo = + if (chip3.isChecked) { + chip3.text.toString() + } else { + chip4.text.toString() + } + } + } private fun goQuestActivity() {