Added in API level 11

Factory2


interface Factory2 : LayoutInflater.Factory
Activity

An activity is a single, focused thing that the user can do.

AccountAuthenticatorActivity

Base class for implementing an Activity that is used to help implement an AbstractAccountAuthenticator.

ActivityGroup

A screen that contains and runs multiple embedded activities.

AliasActivity

Stub activity that launches another activity (and then finishes itself) based on information in its component's manifest meta-data.

ExpandableListActivity

An activity that displays an expandable list of items by binding to a data source implementing the ExpandableListAdapter, and exposes event handlers when the user selects an item.

LauncherActivity

Displays a list of all activities which can be performed for a given intent.

ListActivity

An activity that displays a list of items by binding to a data source such as an array or Cursor, and exposes event handlers when the user selects an item.

NativeActivity

Convenience for implementing an activity that will be implemented purely in native code.

PreferenceActivity

This is the base class for an activity to show a hierarchy of preferences to the user.

TabActivity

For apps developing against android.os.Build.VERSION_CODES#HONEYCOMB or later, tabs are typically presented in the UI using the new ActionBar.newTab() and related APIs for placing tabs within their action bar area.

Summary

Public methods
abstract View?
onCreateView(parent: View?, name: String, context: Context, attrs: AttributeSet)

Version of onCreateView(java.lang.String,android.content.Context,android.util.AttributeSet) that also supplies the parent that the view created view will be placed in.

Inherited functions
View? onCreateView(name: String, context: Context, attrs: AttributeSet)

Hook you can supply that is called when inflating from a LayoutInflater. You can use this to customize the tag names available in your XML layout files.

Note that it is good practice to prefix these custom names with your package (i.e., com.coolcompany.apps) to avoid conflicts with system names.

Public methods

onCreateView

Added in API level 11
abstract fun onCreateView(
    parent: View?,
    name: String,
    context: Context,
    attrs: AttributeSet
): View?

Version of onCreateView(java.lang.String,android.content.Context,android.util.AttributeSet) that also supplies the parent that the view created view will be placed in.

Parameters
parent View?: The parent that the created view will be placed in; note that this may be null.
name String: Tag name to be inflated. This value cannot be null.
context Context: The context the view is being created in. This value cannot be null.
attrs AttributeSet: Inflation attributes as specified in XML file. This value cannot be null.
Return
View? View Newly created view. Return null for the default behavior.