-
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
✨ implement screens for sign up #85
Conversation
kmkim2689
commented
Jul 24, 2024
•
edited
Loading
edited
- sign up screen layout implementation
- add components(edittext, spinner)
- add fragment layout
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 분리도 잘 되어있어서 보기 편했습니다. 몇가지 질문만 남겨드리고 approve 합니다. 리뷰 내용에 대해서 편하신 방법으로 답변해주시면 감사하겠습니다.
감사합니다 :)
|
||
override fun onDestroy() { | ||
super.onDestroy() | ||
_binding = null |
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 nullable 처리에 이어 destroy때 null로 해주는거 좋네요. 명시적으로 destroy 되는 느낌이 있어 좋아보이는데, 궁금한점은 nullable 처리해뒀기 때문에 GC가 일정 시간 지나면 알아서 destroy 하지 않는지 궁금합니다. 제가 몰라서 혹시 아시면 알려주시면 감사하겠습니다.
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.
구글에서 해당 방식으로 fragment를 사용하도록 제시하는데, 가장 큰 이유는 fragment의 생명주기의 특성 상 메모리 누수가 발생할 수 있기 때문이라고 볼 수 있습니다.
https://www.reddit.com/r/android_devs/comments/orbdas/is_it_required_or_good_practice_to_set_the/
https://woowacourse.slack.com/archives/C06DZU72A79/p1714702344693229?thread_ts=1714700634.545369&cid=C06DZU72A79
ArrayAdapter( | ||
requireContext(), | ||
android.R.layout.simple_spinner_item, | ||
List(100) { "country$it" }, |
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.
이 사안은 서버와 협의해봐야 할 것 같네요!
class SignUpViewModel : | ||
ViewModel(), | ||
BottomButtonClickListener { | ||
var usernameContent: MutableLiveData<String> = MutableLiveData("") |
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.
접근제한자가 없는데 MutableLiveData인데 문제가 없는걸까요? ET 값을 읽거나 해당 값을 ET에 넣는것 같은데 mutable이면 val로 가능하지 않을까요? 아닌가..? 안되나...? 알려주세요ㅋㅋㅋ
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.
양방향 데이터바인딩을 의도하였는데, 제가 var로 설정해놓고 바꾸는 것을 놓치고 있었네요... val로 수정하도록 하겠습니다!
https://developer.android.com/topic/libraries/data-binding/two-way