Added in API level 1

OnCreateContextMenuListener


interface OnCreateContextMenuListener
Activity

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

Dialog

Base class for Dialogs.

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.

Fragment

A Fragment is a piece of an application's user interface or behavior that can be placed in an Activity.

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.

AlertDialog

A subclass of Dialog that can display one, two or three buttons.

AliasActivity

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

CharacterPickerDialog

Dialog for choosing accented characters related to a base character.

DatePickerDialog

A simple dialog containing an android.widget.DatePicker.

DialogFragment

A fragment that displays a dialog window, floating on top of its activity's window.

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.

ListFragment

A fragment 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.

PreferenceFragment

Shows a hierarchy of Preference objects as lists.

Presentation

Base class for presentations.

ProgressDialog

A dialog showing a progress indicator and an optional text message or view.

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.

TimePickerDialog

A dialog that prompts the user for the time of day using a TimePicker.

WebViewFragment

A fragment that displays a WebView.

Interface definition for a callback to be invoked when the context menu for this view is being built.

Summary

Public methods
abstract Unit

Called when the context menu for this view is being built.

Public methods

onCreateContextMenu

Added in API level 1
abstract fun onCreateContextMenu(
    menu: ContextMenu!,
    v: View!,
    menuInfo: ContextMenu.ContextMenuInfo!
): Unit

Called when the context menu for this view is being built. It is not safe to hold onto the menu after this method returns.

Parameters
menu ContextMenu!: The context menu that is being built
v View!: The view for which the context menu is being built
menuInfo ContextMenu.ContextMenuInfo!: Extra information about the item for which the context menu should be shown. This information will vary depending on the class of v.