Skip to content

Commit

Permalink
#176 [chore] 주석 삭제 및 정렬
Browse files Browse the repository at this point in the history
  • Loading branch information
pump9918 committed Jun 23, 2024
1 parent c824bf5 commit 6cfbde9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,39 +26,40 @@ class AddListActivity : BindingActivity<ActivityAddListBinding>(R.layout.activit
viewPager = binding.vpAddListMakerCard
setStatusBarColorFromResource(R.color.background)

setBackEnter()
startMakerHelpModal()
setBackEnter()
setInitBinding()
setHappyDetailCardPagerAdapter()
setCurrentCard()
setRoutineThemeListAdapter()
setItemDeco()
setupObservers()
}
private fun setBackEnter() { // 이전 버튼
binding.ivAddListBackArrow.setSingleOnClickListener {
finish()
}
}

private fun startMakerHelpModal() { // 메이커 도움말 모달 실행
private fun startMakerHelpModal() {
binding.ivAddListMakerHelp.setSingleOnClickListener {
MakerHelpDialogFragment().show(supportFragmentManager, "MakerHelpDialog")
}
}

private fun setInitBinding() { // 초기 바인딩 설정
private fun setBackEnter() {
binding.ivAddListBackArrow.setSingleOnClickListener {
finish()
}
}

private fun setInitBinding() {
viewModel.getMakerCard()
viewModel.getRoutineTheme()
}

private fun setHappyDetailCardPagerAdapter() { // maker 카드 뷰페이저 어댑터
private fun setHappyDetailCardPagerAdapter() {
with(binding) {
vpAddListMakerCard.adapter = makerCardPagerAdapter
}
}

private fun setCurrentCard() { // 현재 보고 있는 카드 선택
private fun setCurrentCard() {
viewPager.registerOnPageChangeCallback(object : ViewPager2.OnPageChangeCallback() {
override fun onPageSelected(position: Int) {
super.onPageSelected(position)
Expand All @@ -68,14 +69,13 @@ class AddListActivity : BindingActivity<ActivityAddListBinding>(R.layout.activit
})
}

private fun getCurrentSelectedMakerId(): Int { // 현재 보고 있는 뷰페이저의 maker's id 가져오기
private fun getCurrentSelectedMakerId(): Int {
val currentItem = binding.vpAddListMakerCard.currentItem
val itemId = makerCardPagerAdapter.getItemId(currentItem)
return itemId.toInt()
}



private fun setRoutineThemeListAdapter() {
with(binding) {
routineThemeListAdapter = RoutineThemeListAdapter()
Expand Down
7 changes: 3 additions & 4 deletions app/src/main/res/layout/activity_add_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,13 @@
app:layout_constraintStart_toEndOf="@id/iv_add_list_back_arrow"
app:layout_constraintTop_toTopOf="@id/iv_add_list_back_arrow" />

<!-- 스크롤 가능한 내용 -->
<androidx.core.widget.NestedScrollView
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintTop_toBottomOf="@id/tv_add_list_title"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent">
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_add_list_title">

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
Expand Down

0 comments on commit 6cfbde9

Please sign in to comment.