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
| class Info(val text: String) | |
| // Module | |
| @Module | |
| class Bag { | |
| @Provides | |
| fun sayHelloDagger2(): Info { | |
| return Info("Hello Dagger 2") | |
| } | |
| } |
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
| class Info(val text: String) | |
| // Module | |
| val bag = Module { | |
| singleton { Info("Hello Katana") } | |
| } | |
| // MainActivity | |
| class MainActivity : AppCompatActivity() { |
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
| class Info(val text: String) | |
| // Module | |
| val bag = Kodein.Module("module name") { | |
| bind<Info>() with provider { Info("Hello Kodein") } | |
| } | |
| // MainActivity | |
| class MainActivity : AppCompatActivity(), KodeinAware { |
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
| class MainActivity : AppCompatActivity() { | |
| private val viewModel: NetworkStatusViewModel by lazy { | |
| ViewModelProvider( | |
| this, | |
| object : ViewModelProvider.Factory { | |
| override fun <T : ViewModel?> create(modelClass: Class<T>): T { | |
| val networkStatusTracker = NetworkStatusTracker(this@MainActivity) | |
| return NetworkStatusViewModel(networkStatusTracker) as T | |
| } |
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
| Tasks | |
| Skills | |
| Social | |
| Messages | |
| Messages | |
| Party | |
| Purchase Gems | |
| Subscription | |
| Guilds | |
| Challenges |
OlderNewer