Unit |
dump(prefix: String!, fd: FileDescriptor!, writer: PrintWriter!, args: Array<String!>!)
Print the Fragments's state into the given stream.
|
Boolean |
equals(other: Any?)
Subclasses can not override equals().
|
Activity! |
getActivity()
Return the Activity this fragment is currently associated with.
|
Boolean |
getAllowEnterTransitionOverlap()
Returns whether the exit transition and enter transition overlap or not. When true, the enter transition will start as soon as possible. When false, the enter transition will wait until the exit transition completes before starting.
|
Boolean |
getAllowReturnTransitionOverlap()
Returns whether the return transition and reenter transition overlap or not. When true, the reenter transition will start as soon as possible. When false, the reenter transition will wait until the return transition completes before starting.
|
Bundle! |
getArguments()
Return the arguments supplied to setArguments, if any.
|
FragmentManager! |
getChildFragmentManager()
Return a private FragmentManager for placing and managing Fragments inside of this Fragment.
|
Context! |
getContext()
Return the Context this fragment is currently associated with.
|
Transition! |
getEnterTransition()
Returns the Transition that will be used to move Views into the initial scene. The entering Views will be those that are regular Views or ViewGroups that have ViewGroup.isTransitionGroup return true. Typical Transitions will extend android.transition.Visibility as entering is governed by changing visibility from View.INVISIBLE to View.VISIBLE.
|
Transition! |
getExitTransition()
Returns the Transition that will be used to move Views out of the scene when the fragment is removed, hidden, or detached when not popping the back stack. The exiting Views will be those that are regular Views or ViewGroups that have ViewGroup.isTransitionGroup return true. Typical Transitions will extend android.transition.Visibility as exiting is governed by changing visibility from View.VISIBLE to View.INVISIBLE. If transition is null, the views will remain unaffected.
|
FragmentManager! |
getFragmentManager()
Return the FragmentManager for interacting with fragments associated with this fragment's activity. Note that this will be non-null slightly before getActivity(), during the time from when the fragment is placed in a FragmentTransaction until it is committed and attached to its activity.
If this Fragment is a child of another Fragment, the FragmentManager returned here will be the parent's getChildFragmentManager().
|
Any? |
getHost()
Return the host object of this fragment. May return null if the fragment isn't currently being hosted.
|
Int |
getId()
Return the identifier this fragment is known by. This is either the android:id value supplied in a layout or the container view ID supplied when adding the fragment.
|
LayoutInflater! |
getLayoutInflater()
Returns the cached LayoutInflater used to inflate Views of this Fragment. If onGetLayoutInflater(Bundle) has not been called onGetLayoutInflater(Bundle) will be called with a null argument and that value will be cached.
The cached LayoutInflater will be replaced immediately prior to onCreateView(LayoutInflater,ViewGroup,Bundle) and cleared immediately after onDetach().
|
LoaderManager! |
getLoaderManager()
Return the LoaderManager for this fragment, creating it if needed.
|
Fragment! |
getParentFragment()
Returns the parent Fragment containing this Fragment. If this Fragment is attached directly to an Activity, returns null.
|
Transition! |
getReenterTransition()
Returns the Transition that will be used to move Views in to the scene when returning due to popping a back stack. The entering Views will be those that are regular Views or ViewGroups that have ViewGroup.isTransitionGroup return true. Typical Transitions will extend android.transition.Visibility as exiting is governed by changing visibility from View.VISIBLE to View.INVISIBLE. If transition is null, the views will remain unaffected. If nothing is set, the default will be to use the same transition as setExitTransition(android.transition.Transition).
|
Resources! |
getResources()
Return getActivity().getResources().
|
Boolean |
getRetainInstance()
|
Transition! |
getReturnTransition()
Returns the Transition that will be used to move Views out of the scene when the Fragment is preparing to be removed, hidden, or detached because of popping the back stack. The exiting Views will be those that are regular Views or ViewGroups that have ViewGroup.isTransitionGroup return true. Typical Transitions will extend android.transition.Visibility as entering is governed by changing visibility from View.VISIBLE to View.INVISIBLE. If transition is null, entering Views will remain unaffected.
|
Transition! |
getSharedElementEnterTransition()
Returns the Transition that will be used for shared elements transferred into the content Scene. Typical Transitions will affect size and location, such as android.transition.ChangeBounds. A null value will cause transferred shared elements to blink to the final position.
|
Transition! |
getSharedElementReturnTransition()
Return the Transition that will be used for shared elements transferred back during a pop of the back stack. This Transition acts in the leaving Fragment. Typical Transitions will affect size and location, such as android.transition.ChangeBounds. A null value will cause transferred shared elements to blink to the final position. If no value is set, the default will be to use the same value as setSharedElementEnterTransition(android.transition.Transition).
|
String! |
getString(resId: Int)
Return a localized string from the application's package's default string table.
|
String! |
getString(resId: Int, vararg formatArgs: Any!)
Return a localized formatted string from the application's package's default string table, substituting the format arguments as defined in java.util.Formatter and java.lang.String#format.
|
String! |
getTag()
Get the tag name of the fragment, if specified.
|
Fragment! |
getTargetFragment()
Return the target fragment set by setTargetFragment.
|
Int |
getTargetRequestCode()
Return the target request code set by setTargetFragment.
|
CharSequence! |
getText(resId: Int)
Return a localized, styled CharSequence from the application's package's default string table.
|
Boolean |
getUserVisibleHint()
|
View? |
getView()
Get the root view for the fragment's layout (the one returned by onCreateView), if provided.
|
Int |
hashCode()
Subclasses can not override hashCode().
|
Fragment! |
instantiate(context: Context!, fname: String!)
Like instantiate(Context,String,Bundle) but with a null argument Bundle.
|
Fragment! |
instantiate(context: Context!, fname: String!, args: Bundle?)
Create a new instance of a Fragment with the given class name. This is the same as calling its empty constructor.
|
Boolean |
isAdded()
Return true if the fragment is currently added to its activity.
|
Boolean |
isDetached()
Return true if the fragment has been explicitly detached from the UI. That is, FragmentTransaction.detach(Fragment) has been used on it.
|
Boolean |
isHidden()
Return true if the fragment has been hidden. By default fragments are shown. You can find out about changes to this state with onHiddenChanged. Note that the hidden state is orthogonal to other states -- that is, to be visible to the user, a fragment must be both started and not hidden.
|
Boolean |
isInLayout()
Return true if the layout is included as part of an activity view hierarchy via the <fragment> tag. This will always be true when fragments are created through the <fragment> tag, except in the case where an old fragment is restored from a previous state and it does not appear in the layout of the current state.
|
Boolean |
isRemoving()
Return true if this fragment is currently being removed from its activity. This is not whether its activity is finishing, but rather whether it is in the process of being removed from its activity.
|
Boolean |
isResumed()
Return true if the fragment is in the resumed state. This is true for the duration of onResume() and onPause() as well.
|
Boolean |
isStateSaved()
Returns true if this fragment is added and its state has already been saved by its host. Any operations that would change saved state should not be performed if this method returns true, and some operations such as setArguments(Bundle) will fail.
|
Boolean |
isVisible()
Return true if the fragment is currently visible to the user. This means it: (1) has been added, (2) has its view attached to the window, and (3) is not hidden.
|
Unit |
onActivityCreated(savedInstanceState: Bundle?)
Called when the fragment's activity has been created and this fragment's view hierarchy instantiated. It can be used to do final initialization once these pieces are in place, such as retrieving views or restoring state. It is also useful for fragments that use setRetainInstance(boolean) to retain their instance, as this callback tells the fragment when it is fully associated with the new activity instance. This is called after onCreateView and before onViewStateRestored(Bundle). If you override this method you must call through to the superclass implementation.
|
Unit |
onActivityResult(requestCode: Int, resultCode: Int, data: Intent!)
Receive the result from a previous call to startActivityForResult(Intent,int). This follows the related Activity API as described there in Activity.onActivityResult(int,int,Intent).
|
Unit |
onAttach(activity: Activity!)
If you override this method you must call through to the superclass implementation.
|
Unit |
onAttach(context: Context!)
Called when a fragment is first attached to its context. onCreate(Bundle) will be called after this. If you override this method you must call through to the superclass implementation.
|
Unit |
onAttachFragment(childFragment: Fragment!)
Called when a fragment is attached as a child of this fragment.
This is called after the attached fragment's onAttach and before the attached fragment's onCreate if the fragment has not yet had a previous call to onCreate.
|
Unit |
onConfigurationChanged(newConfig: Configuration)
Called by the system when the device configuration changes while your component is running. Note that, unlike activities, other components are never restarted when a configuration changes: they must always deal with the results of the change, such as by re-retrieving resources.
At the time that this function has been called, your Resources object will have been updated to return resource values matching the new configuration.
For more information, read Handling Runtime Changes. If you override this method you must call through to the superclass implementation.
|
Boolean |
onContextItemSelected(item: MenuItem!)
This hook is called whenever an item in a context menu is selected. The default implementation simply returns false to have the normal processing happen (calling the item's Runnable or sending a message to its Handler as appropriate). You can use this method for any items for which you would like to do processing without those other facilities.
Use MenuItem.getMenuInfo() to get extra information set by the View that added this menu item.
Derived classes should call through to the base class for it to perform the default menu handling.
|
Unit |
onCreate(savedInstanceState: Bundle?)
Called to do initial creation of a fragment. This is called after onAttach(Activity) and before onCreateView(LayoutInflater,ViewGroup,Bundle), but is not called if the fragment instance is retained across Activity re-creation (see setRetainInstance(boolean)).
Note that this can be called while the fragment's activity is still in the process of being created. As such, you can not rely on things like the activity's content view hierarchy being initialized at this point. If you want to do work once the activity it |