-
Notifications
You must be signed in to change notification settings - Fork 0
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
6/onboarding #10
6/onboarding #10
Conversation
- 직장 검색화면 구현 - dimen, string, themes 수정
- 가이드 화면 파일 네이밍
- 리사이클러뷰로 검색결과 구현 - 검색 결과가 없는 경우 이동시킬 버튼 구현
- 이번 커밋에서는 이동만 구현
- 이전에 구현한 화면에 설정한 디자인 값들 설정 - 상태바 글자색 변경 (검정색으로)
- 재사용 할 리사이클러뷰 정의 - 러프하게 화면 구현 (직장 정보 입력, 검색 및 등록 화면 / 로딩화면) - 상태바 글자색 변경 (검정색으로)
- RecycleItem 네이밍 수정
…nto 6/onboarding � Conflicts: � app/src/main/AndroidManifest.xml � app/src/main/java/com/ftw/hometerview/di/ui/ActivityViewModelModule.kt � app/src/main/java/com/ftw/hometerview/ui/main/MainActivity.kt � app/src/main/java/com/ftw/hometerview/ui/splash/SplashActivity.kt � app/src/main/res/layout/activity_main.xml � app/src/main/res/values/dimen.xml
- rough_ui에서 가져온 커밋 conflict 해결
app/src/main/java/com/ftw/hometerview/adapter/RecyclerAdapter.kt
Outdated
Show resolved
Hide resolved
override fun areItemsTheSame( | ||
oldItem: RecyclerItem, | ||
newItem: RecyclerItem | ||
): Boolean { | ||
val oldData = oldItem.data | ||
val newData = newItem.data | ||
// Use appropriate comparator's method if both items implement the interface | ||
// and rely on the plain 'equals' otherwise | ||
return if (oldData is RecyclerItemComparator | ||
&& newData is RecyclerItemComparator | ||
) { | ||
oldData.isSameItem(newData) | ||
} else oldData == newData | ||
} |
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.
RecyclerItem
은 RecyclerItemComparator
를 구현하고 있지 않은데, 이 부분은 왜 추가된걸까?.?
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.
어댑터에서 아이템의 중복을 DiffUtil로 구분하고 있어요!
그래서 RecyclerItem으로 들어온 아이템들을 구분하는 이 DiffCallback을 어댑터에서 상속해서 아이템간 구분을 구현하고 있는것 같아요!
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.
나 잘 이해가 안되었는데.. oldData&newData 가 RecyclerItemComparator 를 구현하고 있어야 의미있는 코드로 보이는데, DiffCallback 을 adapter 에서 상속한다면 어떻게 의미가 바뀌는걸까?
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/ftw/hometerview/adapter/RecyclerViewBinding.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/ftw/hometerview/ui/onboardingresult/OnboardingResultViewModel.kt
Outdated
Show resolved
Hide resolved
...c/main/java/com/ftw/hometerview/ui/onboardingresult/recyclemodel/SearchResultRecycleModel.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/ftw/hometerview/ui/splash/SplashActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/ftw/hometerview/ui/splash/SplashActivity.kt
Outdated
Show resolved
Hide resolved
- 메소드 사용부의 변수와 메소드의 파라미터 명이 다를 경우 통일 Co-authored-by: hayley <[email protected]>
- textview, textview2, textview3 ...
Co-authored-by: hayley <[email protected]>
Co-authored-by: hayley <[email protected]>
Co-authored-by: hayley <[email protected]>
- 추가로 lateInit 시점에는 정의되지 않을 수 있기 때문에 nullable 하게 변경
…into 6/onboarding
Co-authored-by: hayley <[email protected]>
Co-authored-by: hayley <[email protected]>
Co-authored-by: hayley <[email protected]>
Co-authored-by: hayley <[email protected]>
Co-authored-by: hayley <[email protected]>
- onBindViewHolder의 가독성 증가 - BindingViewHolder의 유효성 검증 코드 추가
- EnrollAddressFragment, SearchCompanyAddressFragment 네이밍 변경
0. 화면 이미지
정보 기입 온보딩 화면(왼쪽) 와 검색 결과 화면(오른쪽)
회사 정보가 없는 경우 : 주소 검색 화면(왼쪽) 와 검색 결과 및 회사 등록 화면(오른쪽)
위 둘 중 어느 한 단계를 거치고, 메인으로 넘어가기 위한 로딩 화면 : 로딩 화면
1. 개요
온보딩 화면 구현
2. 작업사항
리싸이클러뷰를 구현함에 있어 xml에서 리사이클러뷰를 구현하듯이 kotlin 단에서도 구현해보려고 합니다.
쉽게 설명해보자면 이전과 달리 리사이클러뷰를 구현하는 아이템 뷰의 설정을 kotlin으로도 구현해준다고 생각하시면 됩니다.
RecycleItem을 토대로 구현한 SearchResultRecycleModel을 만들어서 (ItemView 관련)
RecycleViewBinding으로 RecycleAdapter에 뷰를 띄우고 (Adapter의 작동)
내부에서 아이템의 구분은 DiffCallback과 RecycleItemComparator로 구분합니다. (item 구분)
위 그림은 itemView를 설정해 줄 ViewModel에서 표현하고자 하는 데이터 양식을
SearchResultRecycleModel으로 변환하고, 이를 RecycleItem의 포맷으로 변화시키는 2단계를 보여줍니다.
RecycleItem과 XXXXRecycleModel의 차이
RecycleItem은 어댑터에 바인딩 하기 위해 필요한 속성을 가집니다. (어떤 데이터를 가지는지, 어떤 레이아웃 아이디에 속하는지 등)
SearchResultRecycleModel은 사용하려는 아이템 뷰의 고유한 속성을 가집니다. (몇개의 무슨 데이터를 가지는지, 어떤 이벤트가 있는지)
3. 변경로직
액티비티에서 만들어서 사용하는 방식의 intent를 일부 액티비티에 적용했습니다.
지난번에 함께 만든 코드가 작동하지 않고 빨간줄이 뜬 이유는 gradle에 parcel 관련 의존성을 추가하지 않았기 때문입니다.
4. 기타
메인 액티비티 관련한 바템네비게이션의 기본 포맷이 나오면 알려주시기 바랍니다.
저는 애플로그인 관련 문서를 작성하고 있겠습니다.
8월 6일 논의 할 것