Skip to content
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

[UI/#12] onboarding #13

Merged
merged 12 commits into from
Jul 24, 2024
Merged

[UI/#12] onboarding #13

merged 12 commits into from
Jul 24, 2024

Conversation

chattymin
Copy link
Member

@chattymin chattymin commented Jul 23, 2024

⛳️ Work Description

  • Onboarding 구현

📸 Screenshot

start_end.mp4
measure_end.mp4
measure_finish.mp4

📢 To Reviewers

  • 오늘도 뚠뚠🐜 공장이 뚠뚠🐜 돌아가요 뚠뚠🐜
  • acitivity 하나에서 fragment를 이동시키는 방식으로 구현했습니다
  • MVVM스럽게 State로 화면 이동 제어했어요
  • xml 너무 어렵네요...
  • 중간에 있는 ProgressBar는 희주님께서 Lottie로 만들어주신대요 키히히
  • 마지막에 있는 Image로 Lottie로 변경될 예정입니다

Copy link
Member

@Marchbreeze Marchbreeze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

머야 xml 다 까먹었다매 ;;

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

supportFragmentManager.findFragmentById(R.id.fcv_onboarding)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요 친구도 아래 showStartFragment 함수에 같이 넣어주면 onCreate가 더 깔끔할 것 같은데, 어려울까나요?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

조아용~

Comment on lines 42 to 59
private fun showStartFragment() {
supportFragmentManager.commit {
replace(R.id.fcv_onboarding, OnboardingStartFragment())
}
}

private fun showMeasureFragment() {
supportFragmentManager.commit {
replace(R.id.fcv_onboarding, OnboardingMeasureFragment())
}
startTimer()
}

private fun showEndFragment() {
supportFragmentManager.commit {
replace(R.id.fcv_onboarding, OnboardingEndFragment())
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요 친구들 제가 메인액티비티에 만들어둔 함수 활용해보면 commit 반복된느거 좀 줄일 수 있을 것 같은데 어떠세옹?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오우 이거 야무지네요~
쇽샥해갔습니다

Comment on lines +66 to +72
timer = object : CountDownTimer(60000, 1000) {
override fun onTick(millisUntilFinished: Long) {}

override fun onFinish() {
viewModel.setState(OnboardingState.END)
}
}.start()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오호 신기하다

private fun initButtonListener() {
with(binding) {
btnOnboardingEndStart.setOnClickListener {
viewModel.setState(OnboardingState.DONE)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

state 관리하는거 개마싯네 진짜
야미에요

Comment on lines 20 to 25
enum class OnboardingState {
START,
MEASURE,
END,
DONE
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요친구 domain 모듈에 enums 폴더 만들어서 다른 이넘들과 같이 관리하는거 어떠세옹

Copy link
Member Author

@chattymin chattymin Jul 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

해당 enum이 domain에 있어야하는 이유가 없는 것 같습니다.
여러 화면에서 재사용 될 확장성이 없고(물론 미래를 모르긴 하지만...), 해당 화면에만 관여를 하는 enum이라고 생각합니다.
그래서 따로 패키지를 빼지도 않고 ViewModel에 그냥 뒀습니다.

오로지 화면에만 영향을 끼치고 서버통신시에도 해당 enum을 결과로 받는게 아닌, 통신결과에 따라 viewModel에서 enum을 방출할 것으로 예상되는데 domain이 아닌 presentaiton에 두는건 어떨까요?? @Marchbreeze

android:layout_height="wrap_content"
android:layout_marginTop="54dp"
android:gravity="center"
android:text="보행속도를 측정합니다"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

추...출..~

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

으악 깜빡했네요
전부다... 추출하겠습니다아....

@chattymin chattymin requested a review from Marchbreeze July 23, 2024 22:29
@chattymin chattymin merged commit 4afac5e into develop Jul 24, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[UI] Onboarding / Onboarding UI
2 participants