abstract class BaseFragment<B : ViewDataBinding, M : ViewModel> : Fragment
Base fragment to standardize and simplify initialization for this component.
layoutId
- Layout resource reference identifier.
See Also
<init> |
Base fragment to standardize and simplify initialization for this component. BaseFragment(layoutId: Int) |
viewBinding |
lateinit var viewBinding: B |
viewModel |
lateinit var viewModel: M |
onAttach |
Called when a fragment is first attached to its context. open fun onAttach(context: Context): Unit |
onCreateView |
Called to have the fragment instantiate its user interface view. open fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? |
onInitDataBinding |
abstract fun onInitDataBinding(): Unit |
onInitDependencyInjection |
abstract fun onInitDependencyInjection(): Unit |
onViewCreated |
Called to have the fragment instantiate its user interface view. open fun onViewCreated(view: View, savedInstanceState: Bundle?): Unit |
requireCompatActivity |
Return the AppCompatActivity this fragment is currently associated with. fun requireCompatActivity(): AppCompatActivity |