poul / com.sophoun.ui_state / BaseFragment
abstract class BaseFragment
Name | Summary |
---|---|
<init> | BaseFragment() |
Name | Summary |
---|---|
baseActivity | val baseActivity: BaseActivity |
coroutineContext | open val coroutineContext: <ERROR CLASS> |
viewModelFactory | var viewModelFactory: <ERROR CLASS>? Initialize this property to ViewModel factory to sub class |
Name | Summary |
---|---|
layout | abstract fun layout(): Int Sub class musts provide layout resource by override this method |
onBackPress | open fun onBackPress(): Boolean |
onCreateAnimation | open fun onCreateAnimation(transit: Int , enter: Boolean , nextAnim: Int ): <ERROR CLASS>? |
onCreateView | open fun onCreateView(inflater: <ERROR CLASS>, container: <ERROR CLASS>?, savedInstanceState: <ERROR CLASS>?): <ERROR CLASS>? |
onDestroy | open fun onDestroy(): Unit Cancel coroutine job |
onFragmentAnimationEnd | open fun onFragmentAnimationEnd(animation: <ERROR CLASS>?): Unit Listen to fragment animation end |
onFragmentAnimationRepeat | open fun onFragmentAnimationRepeat(animation: <ERROR CLASS>?): Unit Listen to fragment animation repeat |
onFragmentAnimationStart | open fun onFragmentAnimationStart(animation: <ERROR CLASS>?): Unit Listen to fragment animation start |
onStateChanged | open fun onStateChanged(state: UiState ): Unit UI must override this method to update their UI State |
onViewCreated | open fun onViewCreated(view: <ERROR CLASS>, savedInstanceState: <ERROR CLASS>?): Unit |
setupWithViewModel | fun setupWithViewModel(vararg viewModel: BaseViewModel ): Unit Attach ViewModel with UiState changed |