Skip to content
Naimul Kabir edited this page Jun 2, 2022 · 2 revisions

IslamQaApp

private fun setUpTimber()

If the app is in debug mode, plants a debug tree

BaseFragment

abstract class BaseFragment<B : ViewDataBinding> : Fragment()

This abstract [BaseFragment] class defines all the common behavior of all the fragments of this application and this abstract class, have abstract methods for the differences, which can be overridden in the actual implementations.

Also, this makes implementing [ViewDataBinding] a lot easier.

protected val loading: DialogLoading by lazy(mode = LazyThreadSafetyMode.NONE)

Floating loading indicator

fun hideKeyboardFrom()

Hides the soft keyboard

Resource

sealed class Resource<T>(val data: T?, val message: String?)

A Resource class wrapper to indicate a Success, an Error, or a Loading state

  • Parameters: T