In Android development, a Fragment is a modular section of an activity. A fragment has its own lifecycle, can handle its own input events, and can be added or removed while the activity is running. Fragments are used to create dynamic and flexible UI designs that can be adapted to different screen sizes and orientations.
Inside onelib, you just need to extend the BaseFragment and include the binding of the fragment's view. For example:
classTestFragment : BaseFragment<FragmentTestBinding>() {overridefungetViewBinding( layoutInflater: LayoutInflater, container: ViewGroup?, attachRoot: Boolean ): FragmentTestBinding= FragmentTestBinding.inflate(layoutInflater)overridefuninitUI() {// Handle UI here, ex: set text of TextView, set adapter to RecyclerView, etc }overridefuninitAction() {// Handle Action here, ex: click button, etc }overridefuninitProcess() {// Handle Process here, ex: load data, etc }overridefuninitObservers() {// Handle Observers here, ex: LiveData, Flow, etc }}