This file contains 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 BaseBindingActivity<VM : BaseViewModel<VS>, VS : ViewState, B : ViewDataBinding> : | |
BaseDaggerBindingActivity<VM, VS, B>() { | |
override val brViewModelVariableId = BR.viewModel | |
override val brViewStateVariableId = BR.viewState | |
override val brViewVariableId = BR.view | |
} |
This file contains 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 BaseBindingActivity<VM : BaseViewModel<VS>, VS : ViewState, B : ViewDataBinding> | |
: BindingViewModelActivity<VM, VS, B>() { | |
override val brViewModelVariableId = BR.viewModel | |
override val brViewStateVariableId = BR.viewState | |
override val brViewVariableId = BR.view | |
} |
This file contains 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 BaseBindingFragment<VM : BaseViewModel<VS>, VS : ViewState, B : ViewDataBinding> : | |
BaseDaggerBindingFragment<VM, VS, B>() { | |
override val brViewModelVariableId = BR.viewModel | |
override val brViewStateVariableId = BR.viewState | |
override val brViewVariableId = BR.view | |
} |
This file contains 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 BaseBindingFragment<VM : BaseViewModel<VS>, VS : ViewState, B : ViewDataBinding> : | |
BindingViewModelFragment<VM, VS, B>() { | |
override val brViewModelVariableId = BR.viewModel | |
override val brViewStateVariableId = BR.viewState | |
override val brViewVariableId = BR.view | |
} |
This file contains 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 App : DaggerApplication() { | |
... | |
} |
This file contains 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 App : Application() { | |
... | |
} |
This file contains 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 : BaseActivity<MainViewModel, MainViewState, ActivityMainBinding>(), MainView { | |
@Inject override lateinit var viewModelFactory: MainViewModelFactory | |
... | |
} |
This file contains 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 MainViewModelFactory @Inject constructor( | |
override val viewModelProvider: Provider<MainViewModel> | |
) : BaseViewModelFactory<MainViewModel>() { | |
override val viewModelClass = MainViewModel::class | |
} |
This file contains 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 : BaseActivity<MainViewModel, MainViewState, ActivityMainBinding>(), MainView { | |
override var viewModelFactory: MainViewModelFactory = MainViewModelFactory(Provider { | |
currentScope.viewModel(this, MainViewModel::class).value | |
}) | |
... | |
} |
This file contains 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 MainViewModelFactory constructor( | |
override val viewModelProvider: Provider<MainViewModel> | |
) : BaseViewModelFactory<MainViewModel>() { | |
override val viewModelClass = MainViewModel::class | |
} |
OlderNewer