-
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
[UI/#12] onboarding #13
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.
머야 xml 다 까먹었다매 ;;
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
|
||
supportFragmentManager.findFragmentById(R.id.fcv_onboarding) |
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.
요 친구도 아래 showStartFragment 함수에 같이 넣어주면 onCreate가 더 깔끔할 것 같은데, 어려울까나요?
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.
조아용~
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()) | ||
} | ||
} |
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.
요 친구들 제가 메인액티비티에 만들어둔 함수 활용해보면 commit 반복된느거 좀 줄일 수 있을 것 같은데 어떠세옹?
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.
오우 이거 야무지네요~
쇽샥해갔습니다
timer = object : CountDownTimer(60000, 1000) { | ||
override fun onTick(millisUntilFinished: Long) {} | ||
|
||
override fun onFinish() { | ||
viewModel.setState(OnboardingState.END) | ||
} | ||
}.start() |
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.
오호 신기하다
private fun initButtonListener() { | ||
with(binding) { | ||
btnOnboardingEndStart.setOnClickListener { | ||
viewModel.setState(OnboardingState.DONE) |
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.
state 관리하는거 개마싯네 진짜
야미에요
enum class OnboardingState { | ||
START, | ||
MEASURE, | ||
END, | ||
DONE | ||
} |
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.
요친구 domain 모듈에 enums 폴더 만들어서 다른 이넘들과 같이 관리하는거 어떠세옹
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이 domain에 있어야하는 이유가 없는 것 같습니다.
여러 화면에서 재사용 될 확장성이 없고(물론 미래를 모르긴 하지만...), 해당 화면에만 관여를 하는 enum이라고 생각합니다.
그래서 따로 패키지를 빼지도 않고 ViewModel에 그냥 뒀습니다.
오로지 화면에만 영향을 끼치고 서버통신시에도 해당 enum을 결과로 받는게 아닌, 통신결과에 따라 viewModel에서 enum을 방출할 것으로 예상되는데 domain이 아닌 presentaiton에 두는건 어떨까요?? @Marchbreeze
android:layout_height="wrap_content" | ||
android:layout_marginTop="54dp" | ||
android:gravity="center" | ||
android:text="보행속도를 측정합니다" |
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.
추...출..~
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.
으악 깜빡했네요
전부다... 추출하겠습니다아....
⛳️ Work Description
📸 Screenshot
start_end.mp4
measure_end.mp4
measure_finish.mp4
📢 To Reviewers