Skip to content

Latest commit

 

History

History
35 lines (27 loc) · 3.12 KB

File metadata and controls

35 lines (27 loc) · 3.12 KB

poul / com.sophoun.ui_state / BaseFragment

BaseFragment

abstract class BaseFragment

Constructors

Name Summary
<init> BaseFragment()

Properties

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

Functions

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