MVVM: Set a getDrawable from a ViewModel
I'm moving all my app's logic from the fragment to the ViewModel and cannot move those methods that set drawables.
Example:
marker.icon = ContextCompat.getDrawable(requireContext(), R.drawable.waypoints_sq_blank)
The reason being that the context is not reachable from a ViewModel.
Any way I can get this to work?