Skip to content

Commit

Permalink
mod/#9 : 로그 메시지 추출하여 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
youjin09222 committed Jun 6, 2024
1 parent f70f2c5 commit 707250d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
package com.sopt.now.test.presentation
package com.sopt.now.test.presentation.signup

import android.content.Intent
import android.os.Bundle
import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity
import com.sopt.now.R
import com.sopt.now.databinding.ActivitySignUpBinding
import com.sopt.now.test.core.util.context.showToast
import com.sopt.now.test.core.view.UiState
import com.sopt.now.test.data.dto.request.RequestSignUpDto
import com.sopt.now.test.presentation.login.LoginActivity
import timber.log.Timber

class SignUpActivity : AppCompatActivity() {
Expand Down Expand Up @@ -35,13 +37,13 @@ class SignUpActivity : AppCompatActivity() {
when (it) {
is UiState.Success -> navigateToLogin(it.data.message)
is UiState.Failure -> showToast(it.errorMessage)
is UiState.Loading -> Timber.d("로딩 중")
is UiState.Loading -> Timber.d(getString(R.string.message_loading))
}
}
}

private fun getSignUpRequestDto(): RequestSignUpDto {
with(binding){
with(binding) {
val id = etSignUpId.text.toString()
val password = etSignUpPw.text.toString()
val nickname = etSignUpName.text.toString()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.sopt.now.test.presentation
package com.sopt.now.test.presentation.signup

import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<resources>
<string name="app_name">NOW SOPT Android</string>

<!--Login-->
<string name="title_login">Welcom to SOPT</string>
<string name="btn_sign_up">회원가입</string>
<string name="btn_login">로그인</string>
Expand All @@ -8,9 +10,14 @@
<string name="tv_pw">비밀번호</string>
<string name="hint_pw">비밀번호를 입력해주세요.</string>

<!--SIGN UP-->
<string name="title_sign_up">SIGN UP</string>
<string name="tv_user_name">닉네임</string>
<string name="hint_user_name">닉네임을 입력해주세요.</string>
<string name="tv_user_phone">핸드폰 번호</string>
<string name="hint_user_phone">핸드폰 번호를 입력해주세요.</string>

<!--Message-->
<string name="message_loading">로딩 중</string>
<string name="message_login_success">로그인 성공! 유저의 ID는 %1$s 입니다.</string>
</resources>

0 comments on commit 707250d

Please sign in to comment.