kaungkhantsoe / NimbleTest

Technical Test for Nimble
1 stars 0 forks source link

Create extension to handle loading image with Glide #9

Closed hoangnguyen92dn closed 2 years ago

hoangnguyen92dn commented 2 years ago

In my opinion, the PresentationModule is unnecessary because the RequestOptions and RequestManager are useless without ImageView to load the image from URL or resource, I would suggest creating an extension to load the image with the Glide configuration for common usage? Don't hesitate to lemme know about your idea 😄

https://github.com/kaungkhantsoe/NimbleTest/blob/dc472deabbd5c405e37def6289ef9822ed17cb5a/app/src/main/java/com/kks/nimbletest/di/PresentationModule.kt#L19-L41

kaungkhantsoe commented 2 years ago

Yes, you are right. I will make the changes.😇

hoangnguyen92dn commented 2 years ago

@kaungkhantsoe Why don't we create an ImageView extension instead?

https://github.com/kaungkhantsoe/NimbleTest/blob/30b2960c76b73fd75ac67b88b39fb9e39d5fa9ba/app/src/main/java/com/kks/nimbletest/util/extensions/CustomExtension.kt#L17-L26

kaungkhantsoe commented 2 years ago

@hoangnguyen92dn Yes, ImageView extension would be better. I just first thought as I need context and I just implemented that way. No special reason. Should I create a pull request?

hoangnguyen92dn commented 2 years ago

@kaungkhantsoe That's fine. Just want to clarify with you if any specific idea from you. You can leave it as it is for now.