I am new in Dagger 2 and i just learned Android Injector that inject the activity and fragment and we have to build activity module and put all activity with @contributesandroidinjector annotation and we have to inject every activity and all that stuff it is A little complicated

and i am thinking What if we jast inject the MainActivity with all Variable we needed and put it in HelperClass that contain all variable that injected and send it to a fragment or activty that need this variable by Bundle or Inetnt and this makes it little easier

is that legal?

0 Answers