diff --git a/app/src/main/java/org/android/go/sopt/presentation/auth/SignUpActivity.kt b/app/src/main/java/org/android/go/sopt/presentation/auth/SignUpActivity.kt index 163cde2..6b826b2 100644 --- a/app/src/main/java/org/android/go/sopt/presentation/auth/SignUpActivity.kt +++ b/app/src/main/java/org/android/go/sopt/presentation/auth/SignUpActivity.kt @@ -31,7 +31,7 @@ class SignUpActivity : BindingActivity(R.layout.activity_ // SignUp 버튼 클릭 binding.btnSignUp.setOnClickListener { - signUpWithServer() + viewModel.signUp() } // 화면 터치로 키보드 내리기 @@ -69,15 +69,6 @@ class SignUpActivity : BindingActivity(R.layout.activity_ } } - private fun signUpWithServer() { - viewModel.signUp( - binding.etSignUpId.text.toString(), - binding.etSignUpPw.text.toString(), - binding.etSignUpName.text.toString(), - binding.etSignUpSkill.text.toString() - ) - } - private fun hideKeyboard(activity: Activity) { val keyboard = activity.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager keyboard.hideSoftInputFromWindow(activity.window.decorView.applicationWindowToken, 0) diff --git a/app/src/main/java/org/android/go/sopt/presentation/auth/SignUpViewModel.kt b/app/src/main/java/org/android/go/sopt/presentation/auth/SignUpViewModel.kt index af45427..4405952 100644 --- a/app/src/main/java/org/android/go/sopt/presentation/auth/SignUpViewModel.kt +++ b/app/src/main/java/org/android/go/sopt/presentation/auth/SignUpViewModel.kt @@ -29,10 +29,10 @@ class SignUpViewModel : ViewModel() { val isButtonValid: MutableLiveData = MutableLiveData(false) - fun signUp(id: String, password: String, name: String, skill: String) { + fun signUp() { AuthServicePool.authService.signUp( SignUpRequestDTO( - id, password, name, skill + idText.toString(), pwText.toString(), nameText.toString(), skillText.toString() ) ).enqueue(object : Callback { override fun onResponse( diff --git a/app/src/main/res/layout/activity_sign_up.xml b/app/src/main/res/layout/activity_sign_up.xml index 0ba2c7a..147bbf6 100644 --- a/app/src/main/res/layout/activity_sign_up.xml +++ b/app/src/main/res/layout/activity_sign_up.xml @@ -166,7 +166,7 @@ android:id="@+id/et_sign_up_skill" android:layout_width="match_parent" android:layout_height="wrap_content" - android:imeOptions="actionNext" + android:imeOptions="actionDone" android:inputType="text" android:text="@={vm.skillText}" />