i have this dashboard activity which shows advertismentList and other Property List
I have made AdvertisementModel which consult with AdvertismentRepository for data, in similar way
I have made PropertyViewModel which consult with PropertyRepository for data
Now,In DashBoardActivity
*First Approach
i set both view model(property and advertisement) with ViewModelProviders --> is this right ??
*Second Approach
should i have to make separate DashBoardActivityViewModel and then it consist of these two dependent component viewmodel in its fields,property and advertisement.
which one is the better approach ? currently i am using first approach
i have this dashboard activity which shows advertismentList and other Property List
I have made AdvertisementModel which consult with AdvertismentRepository for data, in similar way I have made PropertyViewModel which consult with PropertyRepository for data
Now,In DashBoardActivity
*First Approach i set both view model(property and advertisement) with ViewModelProviders --> is this right ??
*Second Approach should i have to make separate DashBoardActivityViewModel and then it consist of these two dependent component viewmodel in its fields,property and advertisement.