Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RetrofitWithViewModel

How to get data from api using Retrofit through ViewModel

ViewModel

The ViewModel class is designed to store and manage UI-related data so that the data survives configuration changes such as screen rotations.

How to add viewModel

https://developer.android.com/topic/libraries/architecture/adding-components.html

Benifits

*Avoid memory leaks.

*we don't have to save objects when orentation changes.

*don't load data again and on every recreate.

*Help to minimize resources reuse.

About

How to get data from api using Retrofit through ViewModel

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages