FragmentHostCallback
abstract classFragmentHostCallback<E : Any!> : FragmentContainer
kotlin.Any | ||
↳ | android.app.FragmentContainer | |
↳ | android.app.FragmentHostCallback |
Integration points with the Fragment host.
Fragments may be hosted by any object; such as an Activity
. In order to host fragments, implement FragmentHostCallback
, overriding the methods applicable to the host.
Summary
Public constructors | |
---|---|
FragmentHostCallback(context: Context!, handler: Handler!, windowAnimations: Int) |
Public methods | |
---|---|
open Unit |
onAttachFragment(fragment: Fragment!) Called when a |
open Unit |
onDump(prefix: String!, fd: FileDescriptor!, writer: PrintWriter!, args: Array<String!>!) Print internal state into the given stream. |
open T? |
onFindViewById(id: Int) Return the view with the given resource ID. |
abstract E? |
Return the object that's currently hosting the fragment. |
open LayoutInflater! |
Return a |
open Int |
Return the window animations. |
open Boolean | |
open Boolean |
Return |
open Unit |
Invalidates the activity's options menu. |
open Unit |
onRequestPermissionsFromFragment(fragment: Fragment, permissions: Array<String!>, requestCode: Int) Requests permissions from the given fragment. |
open Boolean |
onShouldSaveFragmentState(fragment: Fragment!) Return |
open Unit |
onStartActivityFromFragment(fragment: Fragment!, intent: Intent!, requestCode: Int, options: Bundle!) Starts a new |
open Unit |
onStartIntentSenderFromFragment(fragment: Fragment!, intent: IntentSender!, requestCode: Int, fillInIntent: Intent?, flagsMask: Int, flagsValues: Int, extraFlags: Int, options: Bundle!) Starts a new |
open Boolean |
Return |
Public constructors
FragmentHostCallback
FragmentHostCallback(
context: Context!,
handler: Handler!,
windowAnimations: Int)
Public methods
onAttachFragment
open funonAttachFragment(fragment: Fragment!): Unit
Deprecated: Deprecated in Java.
Called when a Fragment
is being attached to this host, immediately after the call to its Fragment.onAttach(Context)
method and before Fragment.onCreate(Bundle)
.
onDump
open funonDump(
prefix: String!,
fd: FileDescriptor!,
writer: PrintWriter!,
args: Array<String!>!
): Unit
Deprecated: Deprecated in Java.
Print internal state into the given stream.
Parameters | |
---|---|
prefix |
String!: Desired prefix to prepend at each line of output. |
fd |
FileDescriptor!: The raw file descriptor that the dump is being sent to. |
writer |
PrintWriter!: The PrintWriter to which you should dump your state. This will be closed for you after you return. |
args |
Array<String!>!: additional arguments to the dump request. |
onFindViewById
open fun <T : View!>onFindViewById(id: Int): T?
Deprecated: Deprecated in Java.
Return the view with the given resource ID. May return null
if the view is not a child of this container.
Return | |
---|---|
T? |
This value may be null . |
onGetHost
abstract funonGetHost(): E?
Deprecated: Deprecated in Java.
Return the object that's currently hosting the fragment. If a Fragment
is hosted by a Activity
, the object returned here should be the same object returned from Fragment.getActivity()
.
Return | |
---|---|
E? |
This value may be null . |
onGetLayoutInflater
open funonGetLayoutInflater(): LayoutInflater!
Deprecated: Deprecated in Java.
Return a LayoutInflater
. See Activity.getLayoutInflater()
.
onGetWindowAnimations
open funonGetWindowAnimations(): Int
Deprecated: Deprecated in Java.
Return the window animations.
onHasWindowAnimations
open funonHasWindowAnimations(): Boolean
Deprecated: Deprecated in Java.
Return true
if there are window animations.
onInvalidateOptionsMenu
open funonInvalidateOptionsMenu(): Unit
Deprecated: Deprecated in Java.
Invalidates the activity's options menu. See Activity.invalidateOptionsMenu()
onRequestPermissionsFromFragment
open funonRequestPermissionsFromFragment(
fragment: Fragment,
permissions: Array<String!>,
requestCode: Int
): Unit
Deprecated: Deprecated in Java.
Requests permissions from the given fragment. See Activity.requestPermissions(String[], int)
Parameters | |
---|---|
fragment |
Fragment: This value cannot be null . |
permissions |
Array<String!>: This value cannot be null . |
onShouldSaveFragmentState
open funonShouldSaveFragmentState(fragment: Fragment!): Boolean
Deprecated: Deprecated in Java.
Return true
if the fragment's state needs to be saved.
onStartActivityFromFragment
open funonStartActivityFromFragment(
fragment: Fragment!,
intent: Intent!,
requestCode: Int,
options: Bundle!
): Unit
Deprecated: Deprecated in Java.
Starts a new Activity
from the given fragment. See Activity.startActivityForResult(Intent, int)
.
onStartIntentSenderFromFragment
open funonStartIntentSenderFromFragment(
fragment: Fragment!,
intent: IntentSender!,
requestCode: Int,
fillInIntent: Intent?,
flagsMask: Int,
flagsValues: Int,
extraFlags: Int,
options: Bundle!
): Unit
Deprecated: Deprecated in Java.
Starts a new IntentSender
from the given fragment. See android.app.Activity#startIntentSender(android.content.IntentSender,android.content.Intent,int,int,int,android.os.Bundle).
Parameters | |
---|---|
fillInIntent |
Intent?: This value may be null . |
onUseFragmentManagerInflaterFactory
open funonUseFragmentManagerInflaterFactory(): Boolean
Deprecated: Deprecated in Java.
Return true
if the FragmentManager's LayoutInflaterFactory should be used.