IviFragment

abstract class IviFragment<P : AnyPanel, VM : FrontendViewModel<P>> : Fragment, HasDefaultViewModelProviderFactory

A base class for fragments that contain the contents of frontend panels. Typical IVI fragments are responsible for creating a layout and linking it to a ViewModel. The viewModelClass is responsible for the business logic and the state of a fragment. This is because, unlike fragments, ViewModels are persistent across configuration changes.

Parameters

P

The type of the panel that owns this fragment.

VM

The type of the ViewModel containing the fragment's persistent state.

Constructors

Link copied to clipboard
fun IviFragment()
Link copied to clipboard
fun <VM : FrontendViewModel<P>> IviFragment(viewModelClass: KClass<VM>)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
open class Initializer<P : AnyPanel, F : IviFragment<P, *>>(val fragment: F, panel: P)

Wrapper used to pass a fragment that is guaranteed to be initialized properly.

Link copied to clipboard
interface IviFragmentEvents : TraceEventListener
Link copied to clipboard
class ViewFactory<B : ViewDataBinding>(    inflateFunction: (LayoutInflater, container: ViewGroup?, attachToContainer: Boolean) -> B,     setSafeAreaFunction: B.(SafeArea?) -> Unit?,     bindDataFunction: (B) -> Unit? = null)

A helper class that takes care of common tasks for creating a view in an IviFragment, such as inflation, binding a lifecycle owner and ViewModel and extracting a root view.

Inherited properties

Link copied to clipboard
val mAdded: Boolean
Link copied to clipboard
val mAnimationInfo: Fragment.AnimationInfo
Link copied to clipboard
val mArguments: Bundle
Link copied to clipboard
val mBackStackNesting: Int
Link copied to clipboard
val mBeingSaved: Boolean
Link copied to clipboard
val mChildFragmentManager: FragmentManager
Link copied to clipboard
val mContainer: ViewGroup
Link copied to clipboard
val mContainerId: Int
Link copied to clipboard
val mDefaultFactory: ViewModelProvider.Factory
Link copied to clipboard
val mDeferStart: Boolean
Link copied to clipboard
val mDetached: Boolean
Link copied to clipboard
val mFragmentId: Int
Link copied to clipboard
val mFragmentManager: FragmentManager
Link copied to clipboard
val mFromLayout: Boolean
Link copied to clipboard
val mHasMenu: Boolean
Link copied to clipboard
val mHidden: Boolean
Link copied to clipboard
val mHiddenChanged: Boolean
Link copied to clipboard
val mHost: FragmentHostCallback<*>
Link copied to clipboard
val mInLayout: Boolean
Link copied to clipboard
val mIsCreated: Boolean
Link copied to clipboard
val mLayoutInflater: LayoutInflater
Link copied to clipboard
val mLifecycleRegistry: LifecycleRegistry
Link copied to clipboard
val mMaxState: Lifecycle.State
Link copied to clipboard
val mMenuVisible: Boolean
Link copied to clipboard
val mParentFragment: Fragment
Link copied to clipboard
val mPerformedCreateView: Boolean
Link copied to clipboard
val mPostponedDurationRunnable: Runnable
Link copied to clipboard
val mPreviousWho: String?
Link copied to clipboard
val mRemoving: Boolean
Link copied to clipboard
val mRestored: Boolean
Link copied to clipboard
val mRetainInstance: Boolean
Link copied to clipboard
val mRetainInstanceChangedWhileDetached: Boolean
Link copied to clipboard
val mSavedFragmentState: Bundle
Link copied to clipboard
Link copied to clipboard
val mSavedUserVisibleHint: Boolean?
Link copied to clipboard
val mSavedViewRegistryState: Bundle
Link copied to clipboard
val mSavedViewState: SparseArray<Parcelable>
Link copied to clipboard
val mState: Int
Link copied to clipboard
val mTag: String
Link copied to clipboard
val mTarget: Fragment
Link copied to clipboard
val mTargetRequestCode: Int
Link copied to clipboard
val mTargetWho: String
Link copied to clipboard
val mUserVisibleHint: Boolean
Link copied to clipboard
val mView: View
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val mWho: String

Functions

Link copied to clipboard
open override fun getDefaultViewModelProviderFactory(): ViewModelProvider.Factory
Link copied to clipboard
open override fun onAttach(context: Context)
Link copied to clipboard
open override fun onCreate(savedInstanceState: Bundle?)
Link copied to clipboard
open override fun onCreateView(    inflater: LayoutInflater,     container: ViewGroup?,     savedInstanceState: Bundle?): View?
Link copied to clipboard
open override fun onDestroy()
Link copied to clipboard
open override fun onDestroyView()
Link copied to clipboard
open override fun onPause()
Link copied to clipboard
open override fun onResume()
Link copied to clipboard
open override fun onStart()
Link copied to clipboard
open override fun onStop()
Link copied to clipboard
open override fun onViewCreated(view: View, savedInstanceState: Bundle?)
Link copied to clipboard
open override fun toString(): String

Inherited functions

Link copied to clipboard
open fun callStartTransitionListener(p0: Boolean)
Link copied to clipboard
open fun createFragmentContainer(): FragmentContainer
Link copied to clipboard
open fun dump(    @NonNull p0: String,     @Nullable p1: FileDescriptor?,     @NonNull p2: PrintWriter,     @Nullable p3: Array<String>?)
Link copied to clipboard
operator override fun equals(@Nullable other: Any?): Boolean
Link copied to clipboard
open fun findFragmentByWho(@NonNull p0: String): Fragment?
Link copied to clipboard
open fun generateActivityResultKey(): String
Link copied to clipboard
fun getActivity(): FragmentActivity?
Link copied to clipboard
open fun getAllowEnterTransitionOverlap(): Boolean
Link copied to clipboard
open fun getAllowReturnTransitionOverlap(): Boolean
Link copied to clipboard
open fun getAnimatingAway(): View
Link copied to clipboard
fun getArguments(): Bundle?
Link copied to clipboard
fun getChildFragmentManager(): FragmentManager
Link copied to clipboard
open fun getContext(): Context?
Link copied to clipboard
open fun getEnterAnim(): Int
Link copied to clipboard
open fun getEnterTransition(): Any?
Link copied to clipboard
open fun getEnterTransitionCallback(): SharedElementCallback
Link copied to clipboard
open fun getExitAnim(): Int
Link copied to clipboard
open fun getExitTransition(): Any?
Link copied to clipboard
open fun getExitTransitionCallback(): SharedElementCallback
Link copied to clipboard
open fun getFocusedView(): View
Link copied to clipboard
fun getFragmentManager(): FragmentManager?
Link copied to clipboard
fun getHost(): Any?
Link copied to clipboard
fun getId(): Int
Link copied to clipboard
fun getLayoutInflater(): LayoutInflater
Link copied to clipboard
open override fun getLifecycle(): Lifecycle
Link copied to clipboard
open fun getLoaderManager(): LoaderManager
Link copied to clipboard
open fun getNextTransition(): Int
Link copied to clipboard
fun getParentFragment(): Fragment?
Link copied to clipboard
fun getParentFragmentManager(): FragmentManager
Link copied to clipboard
open fun getPopDirection(): Boolean
Link copied to clipboard
open fun getPopEnterAnim(): Int
Link copied to clipboard
open fun getPopExitAnim(): Int
Link copied to clipboard
open fun getPostOnViewCreatedAlpha(): Float
Link copied to clipboard
open fun getReenterTransition(): Any?
Link copied to clipboard
fun getResources(): Resources
Link copied to clipboard
fun getRetainInstance(): Boolean
Link copied to clipboard
open fun getReturnTransition(): Any?
Link copied to clipboard
override fun getSavedStateRegistry(): SavedStateRegistry
Link copied to clipboard
open fun getSharedElementEnterTransition(): Any?
Link copied to clipboard
open fun getSharedElementReturnTransition(): Any?
Link copied to clipboard
open fun getSharedElementSourceNames(): ArrayList<String>
Link copied to clipboard
open fun getSharedElementTargetNames(): ArrayList<String>
Link copied to clipboard
fun getString(@StringRes p0: Int): String
fun getString(@StringRes p0: Int, @Nullable vararg p1: Any): String
Link copied to clipboard
fun getTag(): String?
Link copied to clipboard
fun getTargetFragment(): Fragment?
Link copied to clipboard
fun getTargetRequestCode(): Int
Link copied to clipboard
fun getText(@StringRes p0: Int): CharSequence
Link copied to clipboard
open fun getUserVisibleHint(): Boolean
Link copied to clipboard
open fun getView(): View?
Link copied to clipboard
open fun getViewLifecycleOwner(): LifecycleOwner
Link copied to clipboard
open fun getViewLifecycleOwnerLiveData(): LiveData<LifecycleOwner>
Link copied to clipboard
open override fun getViewModelStore(): ViewModelStore
Link copied to clipboard
override fun hashCode(): Int
Link copied to clipboard
fun hasOptionsMenu(): Boolean
Link copied to clipboard
open fun initState()
Link copied to clipboard
fun isAdded(): Boolean
Link copied to clipboard
fun isDetached(): Boolean
Link copied to clipboard
fun isHidden(): Boolean
Link copied to clipboard
fun isInBackStack(): Boolean
Link copied to clipboard
fun isInLayout(): Boolean
Link copied to clipboard
fun isMenuVisible(): Boolean
Link copied to clipboard
open fun isPostponed(): Boolean
Link copied to clipboard
fun isRemoving(): Boolean
Link copied to clipboard
fun isResumed(): Boolean
Link copied to clipboard
fun isStateSaved(): Boolean
Link copied to clipboard
fun isVisible(): Boolean
Link copied to clipboard
open fun noteStateNotSaved()
Link copied to clipboard
open fun onActivityCreated(@Nullable p0: Bundle?)
Link copied to clipboard
open fun onActivityResult(    p0: Int,     p1: Int,     @Nullable p2: Intent?)
Link copied to clipboard
open fun onAttach(@NonNull p0: Activity)
Link copied to clipboard
open fun onAttachFragment(@NonNull p0: Fragment)
Link copied to clipboard
open override fun onConfigurationChanged(@NonNull p0: Configuration)
Link copied to clipboard
open fun onContextItemSelected(@NonNull p0: MenuItem): Boolean
Link copied to clipboard
open fun onCreateAnimation(    p0: Int,     p1: Boolean,     p2: Int): Animation?
Link copied to clipboard
open fun onCreateAnimator(    p0: Int,     p1: Boolean,     p2: Int): Animator?
Link copied to clipboard
open override fun onCreateContextMenu(    @NonNull p0: ContextMenu,     @NonNull p1: View,     @Nullable p2: ContextMenu.ContextMenuInfo?)
Link copied to clipboard
open fun onCreateOptionsMenu(@NonNull p0: Menu, @NonNull p1: MenuInflater)
Link copied to clipboard
open fun onDestroyOptionsMenu()
Link copied to clipboard
open fun onDetach()
Link copied to clipboard
open fun onGetLayoutInflater(@Nullable p0: Bundle?): LayoutInflater
Link copied to clipboard
open fun onHiddenChanged(p0: Boolean)
Link copied to clipboard
open fun onInflate(    @NonNull p0: Activity,     @NonNull p1: AttributeSet,     @Nullable p2: Bundle?)
open fun onInflate(    @NonNull p0: Context,     @NonNull p1: AttributeSet,     @Nullable p2: Bundle?)
Link copied to clipboard
open override fun onLowMemory()
Link copied to clipboard
open fun onMultiWindowModeChanged(p0: Boolean)
Link copied to clipboard
open fun onOptionsItemSelected(@NonNull p0: MenuItem): Boolean
Link copied to clipboard
open fun onOptionsMenuClosed(@NonNull p0: Menu)
Link copied to clipboard
open fun onPictureInPictureModeChanged(p0: Boolean)
Link copied to clipboard
open fun onPrepareOptionsMenu(@NonNull p0: Menu)
Link copied to clipboard
open fun onPrimaryNavigationFragmentChanged(p0: Boolean)
Link copied to clipboard
open fun onRequestPermissionsResult(    p0: Int,     @NonNull p1: Array<String>,     @NonNull p2: IntArray)
Link copied to clipboard
open fun onSaveInstanceState(@NonNull p0: Bundle)
Link copied to clipboard
open fun onViewStateRestored(@Nullable p0: Bundle?)
Link copied to clipboard
open fun performActivityCreated(p0: Bundle)
Link copied to clipboard
open fun performAttach()
Link copied to clipboard
open fun performConfigurationChanged(@NonNull p0: Configuration)
Link copied to clipboard
open fun performContextItemSelected(@NonNull p0: MenuItem): Boolean
Link copied to clipboard
open fun performCreate(p0: Bundle)
Link copied to clipboard
open fun performCreateOptionsMenu(@NonNull p0: Menu, @NonNull p1: MenuInflater): Boolean
Link copied to clipboard
open fun performCreateView(    @NonNull p0: LayoutInflater,     @Nullable p1: ViewGroup?,     @Nullable p2: Bundle?)
Link copied to clipboard
open fun performDestroy()
Link copied to clipboard
open fun performDestroyView()
Link copied to clipboard
open fun performDetach()
Link copied to clipboard
open fun performGetLayoutInflater(@Nullable p0: Bundle?): LayoutInflater
Link copied to clipboard
open fun performLowMemory()
Link copied to clipboard
open fun performMultiWindowModeChanged(p0: Boolean)
Link copied to clipboard
open fun performOptionsItemSelected(@NonNull p0: MenuItem): Boolean
Link copied to clipboard
open fun performOptionsMenuClosed(@NonNull p0: Menu)
Link copied to clipboard
open fun performPause()
Link copied to clipboard
open fun performPictureInPictureModeChanged(p0: Boolean)
Link copied to clipboard
open fun performPrepareOptionsMenu(@NonNull p0: Menu): Boolean
Link copied to clipboard
open fun performPrimaryNavigationFragmentChanged()
Link copied to clipboard
open fun performResume()
Link copied to clipboard
open fun performSaveInstanceState(p0: Bundle)
Link copied to clipboard
open fun performStart()
Link copied to clipboard
open fun performStop()
Link copied to clipboard
open fun performViewCreated()
Link copied to clipboard
open fun postponeEnterTransition()
fun postponeEnterTransition(p0: Long, @NonNull p1: TimeUnit)
Link copied to clipboard
Link copied to clipboard
open fun registerForContextMenu(@NonNull p0: View)
Link copied to clipboard
fun requestPermissions(@NonNull p0: Array<String>, p1: Int)
Link copied to clipboard
fun requireActivity(): FragmentActivity
Link copied to clipboard
fun requireArguments(): Bundle
Link copied to clipboard
fun requireContext(): Context
Link copied to clipboard
fun requireFragmentManager(): FragmentManager
Link copied to clipboard
fun requireHost(): Any
Link copied to clipboard
fun requireParentFragment(): Fragment
Link copied to clipboard
fun requireView(): View
Link copied to clipboard
open fun restoreChildFragmentState(@Nullable p0: Bundle?)
Link copied to clipboard
fun restoreViewState(p0: Bundle)
Link copied to clipboard
open fun setAllowEnterTransitionOverlap(p0: Boolean)
Link copied to clipboard
open fun setAllowReturnTransitionOverlap(p0: Boolean)
Link copied to clipboard
open fun setAnimations(    @AnimRes p0: Int,     @AnimRes p1: Int,     @AnimRes p2: Int,     @AnimRes p3: Int)
Link copied to clipboard
open fun setArguments(@Nullable p0: Bundle?)
Link copied to clipboard
open fun setEnterSharedElementCallback(@Nullable p0: SharedElementCallback?)
Link copied to clipboard
open fun setEnterTransition(@Nullable p0: Any?)
Link copied to clipboard
open fun setExitSharedElementCallback(@Nullable p0: SharedElementCallback?)
Link copied to clipboard
open fun setExitTransition(@Nullable p0: Any?)
Link copied to clipboard
open fun setFocusedView(p0: View)
Link copied to clipboard
open fun setHasOptionsMenu(p0: Boolean)
Link copied to clipboard
open fun setInitialSavedState(@Nullable p0: Fragment.SavedState?)
Link copied to clipboard
open fun setMenuVisibility(p0: Boolean)
Link copied to clipboard
open fun setNextTransition(p0: Int)
Link copied to clipboard
open fun setPopDirection(p0: Boolean)
Link copied to clipboard
open fun setPostOnViewCreatedAlpha(p0: Float)
Link copied to clipboard
open fun setReenterTransition(@Nullable p0: Any?)
Link copied to clipboard
open fun setRetainInstance(p0: Boolean)
Link copied to clipboard
open fun setReturnTransition(@Nullable p0: Any?)
Link copied to clipboard
open fun setSharedElementEnterTransition(@Nullable p0: Any?)
Link copied to clipboard
open fun setSharedElementNames(@Nullable p0: ArrayList<String>?, @Nullable p1: ArrayList<String>?)
Link copied to clipboard
open fun setSharedElementReturnTransition(@Nullable p0: Any?)
Link copied to clipboard
open fun setTargetFragment(@Nullable p0: Fragment?, p1: Int)
Link copied to clipboard
open fun setUserVisibleHint(p0: Boolean)
Link copied to clipboard
open fun shouldShowRequestPermissionRationale(@NonNull p0: String): Boolean
Link copied to clipboard
open fun startActivity(p0: Intent)
open fun startActivity(p0: Intent, @Nullable p1: Bundle?)
Link copied to clipboard
open fun startActivityForResult(p0: Intent, p1: Int)
open fun startActivityForResult(    p0: Intent,     p1: Int,     @Nullable p2: Bundle?)
Link copied to clipboard
open fun startIntentSenderForResult(    p0: IntentSender,     p1: Int,     @Nullable p2: Intent?,     p3: Int,     p4: Int,     p5: Int,     @Nullable p6: Bundle?)
Link copied to clipboard
open fun startPostponedEnterTransition()
Link copied to clipboard
open fun unregisterForContextMenu(@NonNull p0: View)