From 888dc41721a324e1408524b3c5d378013f76db18 Mon Sep 17 00:00:00 2001 From: Sangho Kim Date: Mon, 5 Jun 2023 18:57:52 +0900 Subject: [PATCH] =?UTF-8?q?#11=20/=20[MOD]=20signUp=20=EB=A9=94=EC=86=8C?= =?UTF-8?q?=EB=93=9C=20=EC=9D=B8=EC=9E=90=EB=A5=BC=20=EB=B7=B0=EB=AA=A8?= =?UTF-8?q?=EB=8D=B8=20=ED=99=9C=EC=9A=A9=EC=9C=BC=EB=A1=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../go/sopt/presentation/auth/SignUpActivity.kt | 11 +---------- .../go/sopt/presentation/auth/SignUpViewModel.kt | 4 ++-- app/src/main/res/layout/activity_sign_up.xml | 2 +- 3 files changed, 4 insertions(+), 13 deletions(-) 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}" />