-
Notifications
You must be signed in to change notification settings - Fork 3
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/#19] Onboarding / 학교 뷰, 학과/학번 선택 뷰 #23
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.
고생티비~~~~~
import com.yello.databinding.FragmentDialogDepartmentBinding | ||
|
||
class SearchDialogDepartmentFragment : | ||
BindingBottomSheetDialog<FragmentDialogDepartmentBinding>(R.layout.fragment_dialog_department) { |
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.
오호 바텀시트도 BindingDialog가 있네요 ! 프로필 뷰에서 활용하겠습니다 ㅎㅎ
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 { | ||
@JvmStatic | ||
fun newInstance() = SearchDialogDepartmentFragment() | ||
} |
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.
@JvmStatic 활용법 공부해보고 활용할 수 있으면 좋을듯 ! 공부하면 알려줘용
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.
@minju1459 @Marchbreeze 자바에서는 static을 사용해서 정적으로 메소드를 만들 수 있는데
코틀린에서는 static이란 메소드가 없어서 companion object를 사용해서 안에 함수를 사용하게 되는데
사실상 companion object안에 함수들은 static이 아닌 object 자체가 static이라서
함수 자체를 static처럼 사용하고 싶을 때는 @JvmStatic을 붙여주면 됩니다.
onItemsTheSame = { old, new -> old.schoolname == new.schoolname }, | ||
onContentsTheSame = { old, new -> old == new }, | ||
) | ||
} |
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 따로 빼두니깐 훨씬 더 깔끔하네요 ~~
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="8dp" | ||
android:text="@{data.schoolname}" |
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.
활용 좋아요 ~~~~~
android:textSize="16sp" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> |
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.
이거 textAppearence로 사전 설정되어 있는 속성으로 글꼴, 크기 등등 한번에 지정해주시는게 좋아요 ~~
android:textAppearance="?attr/textAppearanceHeadline3"
이렇게요 !
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.
온보딩 구현하시느라 고생하셨습니다!!
initSearchDeaprtmentBtnClickListener() | ||
} | ||
|
||
private fun initSearchIDBtnClickListener() { |
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 initSearchIDBtnClickListener() { | |
private fun initSearchIdBtnClickListener() { |
Fragment 형식이랑 통일하는 건 어떤가요?
android:layout_marginStart="16dp" | ||
android:layout_marginTop="12dp" | ||
android:layout_marginEnd="16dp" |
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.
android:layout_marginStart="16dp" | |
android:layout_marginTop="12dp" | |
android:layout_marginEnd="16dp" | |
android:layout_marginHorizontal="16dp" | |
android:layout_marginTop="12dp" |
이렇게 작성할 수도 있어요!
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | ||
super.onViewCreated(view, savedInstanceState) | ||
initSearchIDBtnClickListener() | ||
initSearchDeaprtmentBtnClickListener() |
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.
오타 발견ㅋㅋ
참고로 맥북 기준 ⇧F6으로 한번에 네이밍을 수정할 수 있습니다!
|
||
class SchoolAdpapter : ListAdapter<MySchool, SchoolAdpapter.SchoolViewHolder>(diffUtil) { | ||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): SchoolViewHolder { | ||
Timber.d("onCreateViewHolder") |
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.
테스트 완료하셨다면 불필요한 Timber도 제거하는 것이 가독성에 좋을 것 같아요!
fun setlist(list: MySchool) { | ||
Timber.d("set list : $list") | ||
binding.data = list |
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 setlist(list: MySchool) { | |
Timber.d("set list : $list") | |
binding.data = list | |
fun setlist(school: MySchool) { | |
binding.data = school |
학교 하나에 대한 변수가 인자로 전달되는데 list
라는 네이밍은 조금 부적합한 것 같습니다!
android:layout_width="24dp" | ||
android:layout_height="24dp" |
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.
높이나 너비에 고정 dp값을 지정하는 것은 지양해주세요!
다른 컴포넌트들도 한번씩 확인 부탁드립니다!
android:id="@+id/layout_school_dialog" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
<TextView | ||
android:id="@+id/tv_dialog_school" |
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.
where에 대한 단어가 컴포넌트마다 다른 것 같은데 통일시켜주는 것이 좋을 것 같습니다!
android:layout_marginStart="16dp" | ||
android:layout_marginTop="26dp" | ||
android:layout_marginEnd="182dp" |
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.
큰 값을 margin이나 padding으로 지정하게 되면 화면 호환성에 문제가 생길 수 있습니다! 요 컴포넌트에서는 marginEnd를 지정하지 않는 것이 적합해보입니당
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.
뷰 진짜 잘 짰어요 너무 고생하셨습니다🥺
LGTM!!!!!!!!!
리드님 최고......💛💛 |
⛳️ Work Description
📸 Screenshot
device-2023-07-09-044540.webm
📢 To Reviewers