Open yeduRaghav opened 6 years ago
Hi, @yeduRaghav Yeah, you are right. It is possible to remove TypesFactory, make TypesFactoryImpl Kt-object and use it directly. But according to dependency inversion principle it would be better to use interface+implementation and send it to adapter (in the sample I create it, but I should use TypesFactory in adapter constructor).
Hi, First of all thank you for putting up the sample. I have been going through your example and I have a feeling that the
TypesFactoryImpl
class could be a regular factory, with static factory methods. Therefore, it's instance don't need to be held by Adapter.Unless I missed a big point