λ³Έλ¬Έ λ°”λ‘œκ°€κΈ°

빈 ꡬ멍 μ±„μš°κΈ°

[Android] Types as Sets / μ§‘ν•©μœΌλ‘œμ„œμ˜ νƒ€μž…λ“€(UI μƒνƒœ)

https://proandroiddev.com/modelling-ui-state-on-android-26314a5975b9

 

Modelling UI State on Android

The recommended approach from Google for Android development is holding the UI state in a ViewModel and having the View observe it. To…

proandroiddev.com

 

πŸ‘πŸ‘πŸ‘

UI의 변화에 영ν–₯을 μ£ΌλŠ” μƒνƒœ κ°’λ“€μ˜ λ²”μœ„λŠ” κΈ°νšν•œ ν™”λ©΄ μƒνƒœμ— 따라 ν•œμ •λ˜μ–΄μ•Ό ν•œλ‹€.

ex) 5가지 μƒνƒœκ°€ κΈ°νšλ˜μ—ˆλ‹€λ©΄, μƒνƒœ μ •λ³΄μ˜ λ°μ΄ν„°λŠ” 5개만 μ‘΄μž¬ν•΄μ•Ό ν•œλ‹€. enum 5개 λ“±μœΌλ‘œ. Intλ‚˜ String으둜 쑰건을 ν™•μΈν•˜κ²Œ λœλ‹€λ©΄, μƒνƒœ κ°’μ˜ λ²”μœ„λŠ” 5개 이상을 λ„˜κ³ , 이λ₯Ό μ§€μ–‘ν•œλ‹€.