아키텍처 구성요소 경로로 돌아가기 Which of the following are reasons to use a ViewModel? 적절한 답변을 모두 선택합니다. A ViewModel and its data can survive orientation changes in an Activity/Fragment. A ViewModel allows you to separate code that updates the UI from code that doesn’t need to rely on the UI or its lifecycle. A ViewModel prevents your data from updating the UI automatically. A ViewModel is destroyed after which of the following ? always after onStop always after onDestroy after onDestroy, if it not a configuration change True or False: You should execute time-consuming tasks and I/O requests in your Activity/Fragment. True False Why should you initialize and store LiveData in your ViewModel instead of a UI Controller? Both the ViewModel and LiveData are lifecycle aware. To ensure that the LiveData isn’t destroyed when the UI Controller is destroyed. To hide or separate implementation details making your app more flexible. All of the above Which of the following allows you to use observe for changes? a LiveData object any mutable object any property in a ViewModel any property in a ViewModel or LiveData object True or False: It’s OK for a ViewModel to directly reference a View or LifecycleOwner class. True False 답변 제출 error_outline 퀴즈를 채점하는 중에 오류가 발생했습니다. 다시 시도해 주세요.