-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature refactor signup #157
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아직 수정중인 것 같은데...리뷰 답니당
@@ -16,98 +23,167 @@ import dagger.hilt.android.AndroidEntryPoint | |||
class SignUpActivity : AppCompatActivity() { | |||
|
|||
private val binding by viewBinding(ActivitySignUpBinding::inflate) | |||
//TODO 수정 필요 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻
app/src/main/java/com/teampophory/pophory/feature/signup/SignUpActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/teampophory/pophory/feature/signup/SignUpFirstFragment.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/teampophory/pophory/feature/signup/SignUpViewModel.kt
Outdated
Show resolved
Hide resolved
아직 코드 수정중인 것 같아서 Draft 걸겠습니다 @jihyeonAnAn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
완성본 내놔~~~ 못참겠다...
when (currentFragment) { | ||
SIGN_UP_FIRST_FRAGMENT -> { | ||
navController.navigate(R.id.action_signUpFirstFragment_to_signUpSecondFragment) | ||
} | ||
SIGN_UP_SECOND_FRAGMENT -> { | ||
navController.navigate(R.id.action_signUpSecondFragment_to_signUpThirdFragment) | ||
} | ||
SIGN_UP_THIRD_FRAGMENT -> { | ||
val intent = Intent(this, StartPophoryActivity::class.java) | ||
startActivity(intent) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
워후 enum과 when문이라니 이젠 절정 고수의 반열에 들었구나 지현아...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
미쳤다 돌았따
@@ -66,6 +67,7 @@ class SignUpFirstFragment : Fragment() { | |||
doAfterTextChanged { | |||
|
|||
signUpViewModel.setRealName(it.toString()) | |||
signUpViewModel.setButtonState(!binding.editTvName.text.isNullOrEmpty() && !binding.tvErrorMessage.isVisible) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여기 Boolean값을 반환하는 함수로 따로 빼면 가독성이 더 좋아질 것 같아요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
포포리의 자랑 안지현 화이팅
when (currentFragment) { | ||
SIGN_UP_FIRST_FRAGMENT -> { | ||
navController.navigate(R.id.action_signUpFirstFragment_to_signUpSecondFragment) | ||
} | ||
SIGN_UP_SECOND_FRAGMENT -> { | ||
navController.navigate(R.id.action_signUpSecondFragment_to_signUpThirdFragment) | ||
} | ||
SIGN_UP_THIRD_FRAGMENT -> { | ||
val intent = Intent(this, StartPophoryActivity::class.java) | ||
startActivity(intent) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
미쳤다 돌았따
companion object { | ||
const val SIGN_UP_FIRST_FRAGMENT = "SignUpFirstFragment" | ||
const val SIGN_UP_SECOND_FRAGMENT = "SignUpSecondFragment" | ||
const val SIGN_UP_THIRD_FRAGMENT = "SignUpThirdFragment" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fragment관리 멋져요!
android:id="@+id/viewpager" | ||
<androidx.fragment.app.FragmentContainerView | ||
android:id="@+id/nav_host_fragment" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nav_sign_up_fragment는 어떤가요?
//다음 버튼 | ||
setOnClickNextButton() | ||
//툴바 뒤로 가기 버튼 | ||
setOnToolbarBackPressed() | ||
//기기 뒤로 가기 버튼 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
친절한 주석 때문에 가독성이 진짜 좋아지는 것 같습니다!
c159fd0
to
e6f5b75
Compare
49d7fcc
to
6fc971a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
한번만 더 수정해봅시다
fun setSignUpButtonInterface(buttonState: OnButtonStateChangeListener) { | ||
this.buttonState = buttonState | ||
private fun setEditTextState( | ||
background: Int, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
background: Int, | |
@DrawableRes background: Int, |
@@ -10,7 +10,7 @@ import com.teampophory.pophory.feature.signup.SignUpThirdFragment | |||
|
|||
class SignUpViewPagerAdapter( | |||
fragmentActivity: FragmentActivity, | |||
private val buttonState: OnButtonStateChangeListener | |||
//private val buttonState: OnButtonStateChangeListener |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
안 사용하면 삭제 부탁드립니다
@@ -19,13 +19,13 @@ class SignUpViewPagerAdapter( | |||
return when (position) { | |||
0 -> { | |||
SignUpFirstFragment().apply { | |||
setSignUpButtonInterface(buttonState) | |||
//setSignUpButtonInterface(buttonState) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
안 사용하면 삭제 고고
} | ||
} | ||
|
||
1 -> { | ||
SignUpSecondFragment().apply { | ||
setSignUpButtonInterface(buttonState) | ||
//setSignUpButtonInterface(buttonState) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
위에도 그렇고 이것도 보니까 그냥 apply 삭제해도 될듯?
93f979e
to
773c3fb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생했어 지현아
이슈 코드
📸 스크린샷
🍀 관련 이슈
우선 navigation으로 변경했고 navigation viewmodel 사용하면서 추가 수정 예정