-
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
[feat] 방문 인원 모달 #19
[feat] 방문 인원 모달 #19
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.
너무 고생하셨습니다!
} |
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.
이거 아마 린트 체크 때문에 한 커밋 같움요 ㅠ..ㅠ
제가 나중에 더미 싹 지우겠슴당,,
# Conflicts: # app/src/main/res/values/strings.xml
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.
갓기 지현언니 ㅋㅅㅋ 나두 1년 뒤에는 언니같이 잘할 수 잇을까 . . . 닮고 싶다 배 지 현 개멋있다 배 지 현
|
||
class ViewModelFactory : ViewModelProvider.Factory { | ||
override fun <T : ViewModel> create(modelClass: Class<T>): T { | ||
if (modelClass.isAssignableFrom(DummyViewModel::class.java)) { | ||
return DummyViewModel(DummyRepositoryImpl(DummyDataSource())) as T | ||
} else if (modelClass.isAssignableFrom(ReportCompletedViewModel::class.java)) { |
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.
셤 끝나면 말하삼요!!
과외해줄게염 ㅋ
import org.sopt.tabling.util.binding.BindingBottomSheetDialogFragment | ||
|
||
class ReportCompletedBottomSheetDialogFragment( | ||
private val clickBtn: () -> Unit = {} |
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.
이게 저도 앱잼 때 알게 되고 굉장히 충격을 받았던 녀석인데,,,
고차함수와 람다함수라고,,,
진짜 알면 좋은 것들이 있답니다,,,
https://jihyunniiii.notion.site/a2e3a10af5264af5b852e9916ef87e55?pvs=4
https://jihyunniiii.notion.site/01046fa5333347ac9f0d324b0fc98fce?pvs=4
마찬가지로 제가 정리했던 내용들 첨부할게오,,,
super.onViewCreated(view, savedInstanceState) | ||
binding.reportCompletedViewModel = reportCompletedViewModel | ||
|
||
initLayout() |
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.
initLayout()에서 한번에 다 호출 안하구 이번에는 다 onViewCreated 안에서 호출한 이유가 따로 있나욤?
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.
저번에는 initLayout에서 해줄 것들이 너무 많아서 함수로 쪼갰어요
근데 이번엔 그렇게 많지 않아서 하나로 작성했답니당
|
||
private fun addListeners() { | ||
binding.btnVisitCompletedApply.setOnClickListener { | ||
clickBtn.invoke() |
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.
우왕 이거 보고 방금 invoke 공부하고 왔어요 객체명 만으로 함수 호출하기.. 넘 조은데
클린 아키텍처에 한 걸음 다가갑니다
abstract class BindingBottomSheetDialogFragment<B : ViewDataBinding>(@LayoutRes private val layoutResId: Int) : | ||
BottomSheetDialogFragment() { | ||
private var _binding: B? = null | ||
val binding get() = requireNotNull(_binding!!) { "${this::class.java.simpleName}에서 에러가 발생했습니다." } |
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.
이렇게 _binding binding 정의해주는 부분을 줄일 수 있는 방법은 없을까용,, 매번 드는 생각
넘 번 거 롭 다!
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.
키킼 그래서 BindingXXX 파일들을 만들고 그것들을 사용하는 거랍니다!
Binding 파일을 만들어서 사용하면 얘넬 각각의 파일마다 작성해줄 필요가 없거등요
|
||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | ||
super.onViewCreated(view, savedInstanceState) | ||
binding.lifecycleOwner = this.viewLifecycleOwner |
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.
lifecycleOwner를 해주는 이유가 뭔가요?? 안 해도 돌아가는 거 아닌가욤?? 아닌가...
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.
안 해도 돌아가는데 나중에 DataBinding을 사용하려면 필요한 녀석이기 때문에 추가해두었습니당 !
container: ViewGroup?, | ||
savedInstanceState: Bundle?, | ||
): View { | ||
_binding = DataBindingUtil.inflate(inflater, layoutResId, container, false) |
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.
이 DataBindingUtil은 바인딩클래스를 알 수 없는 경우에 사용한다는데 그래서 사용한 건가여??
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 파일을 바인딩 객체로 만들기 위해 DataBindingUtil.inflate를 사용했습니당
android:textAppearance="@style/TextAppearance.Body1.SemiBold" | ||
android:textColor="@color/white" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toStartOf="@+id/gl_end" |
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.
내가 언니 코드에서 유일하게 찾을 수 있는 수정할 부분
제약 걸 때 @+id ㅋㅋ
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.
아 ㅋㅋ 이거 맨날 까먹음 ㅠ
# Conflicts: # app/src/main/java/org/sopt/tabling/presentation/common/ViewModelFactory.kt # app/src/main/res/drawable/shape_gray_100_line_99_rect.xml # app/src/main/res/values/strings.xml
Related issue 🛠
Work Description ✏️
Screenshot 📸
Screen_recording_20231129_001112.mp4
Uncompleted Tasks 😅
To Reviewers 📢
ㅋㅋ 더 일찍 끝내려 했는데 잠들어버림 ㅠ
지은아 근데 너 뷰 깨진다 수정해라 ㅋㅋ ㅠ