Question 1: When I load an image using the Coil library, I do it in the Fragment or Activity: imageView.load("https://example.com/image.jpg"). Is it OK to use the internet connection (method load()) from the UI? Doesn't it break the app architecture? Should I try to move load() into another class, ViewModel, or create a network package?
Question 2: What is the best practise: 1) To use ViewBinding and simply load an image with binding.imageView.load("https://..."), or 2) To use DataBinding and Binding Adapters to load an image?
I'm trying to go through the Google codelab "Load and display images from the Internet" The codelab is using DataBinding and Binding Adapters with Coil to manage images, and as for me, it's complicates the code a lot. Is it really the best practise to use Binding Adapters with Coil? Any opinions are welcome! Please share your experience!