ViewModel in Android Architecture Components

preview_player
Показать описание
ViewModels are designed to store and manage UI-related data in a lifecycle conscious manner. Data can be adapted to configuration changes such as screen rotations with the ViewModel class.
viewmodel will not be destroyed if its owner is destroyed for a configuration change (e.g., rotation).
The ViewModel's only responsibility is to manage the data for the UI. It should never access your view hierarchy or hold a reference back to the Activity or the Fragment.

Github Source :

✨ Join Medium to read thousands of valuable stories ✨

If you're looking to enhance your Android skills or have any questions about the field, feel free to reach out to me on MentorCruise. I'm here to support your growth and learning! Let's connect and learn together! 📚💡
Рекомендации по теме
Комментарии
Автор

Thanks for video! Waiting for next with recyclerView

alexandralban
Автор

Hi! Please teach more about RecyclerView! Especially when using keys...

johnnewman
Автор

please put video about Paging 2 with retrofit

riyazmohamed
join shbcf.ru