Skip to content
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

Merged
merged 7 commits into from
Jul 25, 2024
Merged

✨ implement screens for sign up #85

merged 7 commits into from
Jul 25, 2024

Conversation

kmkim2689
Copy link
Contributor

@kmkim2689 kmkim2689 commented Jul 24, 2024

  • sign up screen layout implementation
  • add components(edittext, spinner)
  • add fragment layout

@kmkim2689 kmkim2689 added ✨ feature new feature AN Android 💄 UI labels Jul 24, 2024
@kmkim2689 kmkim2689 requested review from Hogu59 and ii2001 July 24, 2024 13:31
@kmkim2689 kmkim2689 linked an issue Jul 24, 2024 that may be closed by this pull request
1 task
@kmkim2689 kmkim2689 changed the base branch from main to be/dev July 24, 2024 13:31
@kmkim2689 kmkim2689 changed the base branch from be/dev to an/dev July 24, 2024 13:31
@HaiSeong HaiSeong added AN Android and removed AN Android labels Jul 24, 2024
Copy link

@Hogu59 Hogu59 left a 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
Copy link

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 하지 않는지 궁금합니다. 제가 몰라서 혹시 아시면 알려주시면 감사하겠습니다.

Copy link
Contributor Author

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" },
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

현재 여기는 국가를 샘플로 담은 것 같은데, 향후 국가리스트를 서버에서 받을지, 인메모리로 저장해둘지 공유해주시면 좋을것 같아요 :)

Copy link
Contributor Author

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("")
Copy link

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로 가능하지 않을까요? 아닌가..? 안되나...? 알려주세요ㅋㅋㅋ

Copy link
Contributor Author

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

@kmkim2689 kmkim2689 merged commit 17df2e4 into an/dev Jul 25, 2024
2 checks passed
@ii2001 ii2001 deleted the an/feat/48 branch July 26, 2024 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AN Android ✨ feature new feature 💄 UI
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

✨ Implement sign up page
4 participants