Created
October 15, 2019 00:10
-
-
Save markchristopherng/d21ed0840d6b7de80f8ce1475714d35e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract class BaseActivity(@LayoutRes contentLayoutId: Int) : AppCompatActivity(contentLayoutId) { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
getScope().supportScopeAnnotation(ActivityScope::class.java) | |
.installModules(ActivityModule(this)) | |
.closeOnDestroy(this) | |
.inject(this) | |
} | |
open fun getScope(): Scope { | |
return KTP.openRootScope() | |
.openSubScope(AppConsants.APPSCOPE) | |
.openSubScope(this) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment