SupportFragment

abstract class SupportFragment(@MenuRes inflateMenu: Int = NO_MENU_ITEM, @LayoutRes inflateLayout: Int = NO_LAYOUT_ITEM) : Fragment, ILifecycleController, CoroutineScope

Core implementation contract for fragments, which automatically retains instance, see setRetainInstance for behavior changes

Since

v0.9.X

Parameters

inflateMenu

setting this to anything other than ISupportFragment.NO_MENU_ITEM will automatically inflate the given menu in onCreateOptionsMenu and set setHasOptionsMenu to true.

inflateLayout

settings this to anything other than ISupportFragment.NO_LAYOUT_ITEM will inflate the given layout automatically in onCreateView.

See also

ISupportFragment

Inheritors

Constructors

Link copied to clipboard
constructor(@MenuRes inflateMenu: Int = NO_MENU_ITEM, @LayoutRes inflateLayout: Int = NO_LAYOUT_ITEM)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
@get:NonNull
open override val lifecycle: Lifecycle
Link copied to clipboard
Link copied to clipboard
@get:NonNull
open override val viewModelStore: ViewModelStore

Functions

Link copied to clipboard
Link copied to clipboard
operator override fun equals(@Nullable other: Any?): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun getId(): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getView(): View?
Link copied to clipboard
override fun hashCode(): Int
Link copied to clipboard
abstract fun initializeComponents(savedInstanceState: Bundle?)

Additional initialization to be done in this method, this is called in during androidx.fragment.app.FragmentActivity.onPostCreate

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun onActivityResult(p0: Int, p1: Int, @Nullable p2: Intent?)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun onCreate(savedInstanceState: Bundle?)

Called to do initial creation of a fragment. This is called after SupportFragment.onAttach and before SupportFragment.onCreateView.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater)

Initialize the contents of the Fragment host's standard options menu. You should place your menu items in to menu. For this method to be called, you must have first called setHasOptionsMenu. See SupportFragment.onCreateOptionsMenu for more information.

Link copied to clipboard
open override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View?

Called to have the fragment instantiate its user interface view. This is optional, and non-graphical fragments can return null. This will be called between onCreate&onActivityCreated.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun onLowMemory()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun onViewCreated(view: View, savedInstanceState: Bundle?)

Called immediately after onCreateView has returned, but before any saved state has been restored in to the view. This gives subclasses a chance to initialize themselves once they know their view hierarchy has been completely created.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun setArguments(@Nullable p0: Bundle?)
Link copied to clipboard
Link copied to clipboard
open fun setExitTransition(@Nullable p0: Any?)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun setTargetFragment(@Nullable p0: Fragment?, p1: Int)
Link copied to clipboard
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
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
Link copied to clipboard

Proxy for a view model state if one exists