Skip to content

Conversation

@ihb0301
Copy link

@ihb0301 ihb0301 commented Oct 6, 2024

image

디자인은 설명에 있는 사진처럼 간단하게 텍스트뷰,EditText,버튼을 이용해서 세로로 배치하였습니다

MVVM 구조와 뷰 바인딩 적용하였고 SharedPreferences와 StateFlow를 이용하여 EditText에 있는 내용 저장하는 기능 구현하였습니다

@SeonghwiShin SeonghwiShin self-requested a review October 7, 2024 04:32
@SeonghwiShin
Copy link
Contributor

과제 확인했습니다. 간단한 코멘트 남겨뒀으니 확인바랍니다
viewmodel에서는 원칙적으로 context를 사용하지 않는게 맞습니다. 하지만 repository 패턴을 사용하지 않으면 어쩔수 없죠.
mvvm에서 저장하는 로직은 viewmodel은 비즈니스 로직이 들어가야해서 sharedpreference로직이 들어가야할 것 같은데, context가 필요하면 view로 가야하나? 고민이 많이 되는게 맞습니다.
그래도 viewmodel에 넘겨주는 applicationContext를 이용해서 넘겨주신건 잘했습니다. (이부분은 톡방에서 설명드리겠습니다)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants