android.view
Annotations
ViewDebug.CapturedViewProperty | This annotation can be used to mark fields and methods to be dumped when the view is captured. |
ViewDebug.ExportedProperty | This annotation can be used to mark fields and methods to be dumped by the view server. |
ViewDebug.FlagToString | Defines a mapping from a flag to a String. |
ViewDebug.IntToString | Defines a mapping from an int value to a String. |
Interfaces
ActionMode.Callback | Callback interface for action modes. |
ActionProvider.VisibilityListener |
Listens to changes in visibility as reported by ActionProvider.refreshVisibility() .
|
AttachedSurfaceControl | Provides an interface to the root-Surface of a View Hierarchy or Window. |
AttachedSurfaceControl.OnBufferTransformHintChangedListener | Buffer transform hint change listener. |
Choreographer.FrameCallback | Implement this interface to receive a callback when a new display frame is being rendered. |
Choreographer.VsyncCallback | Implement this interface to receive a callback to start the next frame. |
CollapsibleActionView |
When a View implements this interface it will receive callbacks
when expanded or collapsed as an action view alongside the optional,
app-specified callbacks to OnActionExpandListener .
|
ContextMenu |
Extension of Menu for context menus providing functionality to modify
the header of the context menu.
|
ContextMenu.ContextMenuInfo | Additional information regarding the creation of the context menu. |
GestureDetector.OnContextClickListener | The listener that is used to notify when a context click occurs. |
GestureDetector.OnDoubleTapListener | The listener that is used to notify when a double-tap or a confirmed single-tap occur. |
GestureDetector.OnGestureListener | The listener that is used to notify when gestures occur. |
InputQueue.Callback | Interface to receive notification of when an InputQueue is associated and dissociated with a thread. |
KeyEvent.Callback | |
LayoutInflater.Factory | |
LayoutInflater.Factory2 | |
LayoutInflater.Filter | Hook to allow clients of the LayoutInflater to restrict the set of Views that are allowed to be inflated. |
Menu | Interface for managing the items in a menu. |
MenuItem | Interface for direct access to a previously created menu item. |
MenuItem.OnActionExpandListener |
Interface definition for a callback to be invoked when a menu item
marked with MenuItem.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW is
expanded or collapsed.
|
MenuItem.OnMenuItemClickListener | Interface definition for a callback to be invoked when a menu item is clicked. |
OnReceiveContentListener | Listener for apps to implement handling for insertion of content. |
PixelCopy.OnPixelCopyFinishedListener | Listener for observing the completion of a PixelCopy request. |
ScaleGestureDetector.OnScaleGestureListener | The listener for receiving notifications when gestures occur. |
ScrollCaptureCallback | A ScrollCaptureCallback is responsible for providing rendered snapshots of scrolling content for the scroll capture system. |
ScrollFeedbackProvider |
Provides feedback to the user for scroll events on a View .
|
SubMenu |
Subclass of Menu for sub menus.
|
SurfaceControl.TransactionCommittedListener |
Interface to handle request to
SurfaceControl.Transaction.addTransactionCommittedListener(Executor, TransactionCommittedListener)
|
SurfaceControlInputReceiver | Provides a mechanism for a SurfaceControl to receive input events. |
SurfaceHolder | Abstract interface to someone holding a display surface. |
SurfaceHolder.Callback | A client may implement this interface to receive information about changes to the surface. |
SurfaceHolder.Callback2 |
Additional callbacks that can be received for Callback .
|
TextureView.SurfaceTextureListener | This listener can be used to be notified when the surface texture associated with this texture view is available. |
View.OnApplyWindowInsetsListener | Listener for applying window insets on a view in a custom way. |
View.OnAttachStateChangeListener | Interface definition for a callback to be invoked when this view is attached or detached from its window. |
View.OnCapturedPointerListener | Interface definition for a callback to be invoked when a captured pointer event is being dispatched this view. |
View.OnClickListener | Interface definition for a callback to be invoked when a view is clicked. |
View.OnContextClickListener | Interface definition for a callback to be invoked when a view is context clicked. |
View.OnCreateContextMenuListener | Interface definition for a callback to be invoked when the context menu for this view is being built. |
View.OnDragListener | Interface definition for a listener that's invoked when a drag event is dispatched to this view. |
View.OnFocusChangeListener | Interface definition for a callback to be invoked when the focus state of a view changed. |
View.OnGenericMotionListener | Interface definition for a callback to be invoked when a generic motion event is dispatched to this view. |
View.OnHoverListener | Interface definition for a callback to be invoked when a hover event is dispatched to this view. |
View.OnKeyListener | Interface definition for a callback to be invoked when a hardware key event is dispatched to this view. |
View.OnLayoutChangeListener | Interface definition for a callback to be invoked when the layout bounds of a view changes due to layout processing. |
View.OnLongClickListener | Interface definition for a callback to be invoked when a view has been clicked and held. |
View.OnScrollChangeListener | Interface definition for a callback to be invoked when the scroll X or Y positions of a view change. |
View.OnSystemUiVisibilityChangeListener |
This interface was deprecated
in API level 30.
Use WindowInsets.isVisible(int) to find out about system bar visibilities
by setting a OnApplyWindowInsetsListener on this view.
|
View.OnTouchListener | Interface definition for a callback to be invoked when a touch event is dispatched to this view. |
View.OnUnhandledKeyEventListener | Interface definition for a callback to be invoked when a hardware key event hasn't been handled by the view hierarchy. |
ViewGroup.OnHierarchyChangeListener | Interface definition for a callback to be invoked when the hierarchy within this view changed. |
ViewManager | Interface to let you add and remove child views to an Activity. |
ViewParent | Defines the responsibilities for a class that will be a parent of a View. |
ViewStub.OnInflateListener | Listener used to receive a notification after a ViewStub has successfully inflated its layout resource. |
ViewTreeObserver.OnDrawListener | Interface definition for a callback to be invoked when the view tree is about to be drawn. |
ViewTreeObserver.OnGlobalFocusChangeListener | Interface definition for a callback to be invoked when the focus state within the view tree changes. |
ViewTreeObserver.OnGlobalLayoutListener | Interface definition for a callback to be invoked when the global layout state or the visibility of views within the view tree changes. |
ViewTreeObserver.OnPreDrawListener | Interface definition for a callback to be invoked when the view tree is about to be drawn. |
ViewTreeObserver.OnScrollChangedListener | Interface definition for a callback to be invoked when something in the view tree has been scrolled. |
ViewTreeObserver.OnTouchModeChangeListener | Interface definition for a callback to be invoked when the touch mode changes. |
ViewTreeObserver.OnWindowAttachListener | Interface definition for a callback to be invoked when the view hierarchy is attached to and detached from its window. |
ViewTreeObserver.OnWindowFocusChangeListener | Interface definition for a callback to be invoked when the view hierarchy's window focus state changes. |
ViewTreeObserver.OnWindowVisibilityChangeListener | Interface definition for a callback to be invoked when the view hierarchy's window visibility changes. |
Window.Callback | API from a Window back to its caller. |
Window.OnFrameMetricsAvailableListener | Callback for clients that want frame timing information for each frame rendered by the Window. |
Window.OnRestrictedCaptionAreaChangedListener | Callback for clients that want to be aware of where caption draws content. |
WindowInsetsAnimationController | Controller for app-driven animation of system windows. |
WindowInsetsAnimationControlListener |
Listener that encapsulates a request to
WindowInsetsController.controlWindowInsetsAnimation .
|
WindowInsetsController | Interface to control windows that generate insets. |
WindowInsetsController.OnControllableInsetsChangedListener |
Listener to be notified when the set of controllable WindowInsets.Type controlled by
a WindowInsetsController changes.
|
WindowManager | The interface that apps use to talk to the window manager. |
Classes
AbsSavedState |
A Parcelable implementation that should be used by inheritance
hierarchies to ensure the state of all classes along the chain is saved.
|
ActionMode | Represents a contextual mode of the user interface. |
ActionMode.Callback2 |
Extension of ActionMode.Callback to provide content rect information.
|
ActionProvider | An ActionProvider defines rich menu interaction in a single component. |
Choreographer | Coordinates the timing of animations, input and drawing. |
Choreographer.FrameData |
The payload for VsyncCallback which includes frame information such as when
the frame started being rendered, and multiple possible frame timelines and their
information including deadline and expected present time.
|
Choreographer.FrameTimeline | Holds data that describes one possible VSync frame event to render at. |
ContentInfo |
Holds all the relevant data for a request to View.performReceiveContent .
|
ContentInfo.Builder |
Builder for ContentInfo .
|
ContextThemeWrapper | A context wrapper that allows you to modify or replace the theme of the wrapped context. |
Display | Provides information about the size and density of a logical display. |
Display.HdrCapabilities | Encapsulates the HDR capabilities of a given display. |
Display.Mode | A mode supported by a given display. |
DisplayCutout | Represents the area of the display that is not functional for displaying content. |
DisplayCutout.Builder | A Builder class to construct a DisplayCutout instance. |
DisplayShape | A class representing the shape of a display. |
DragAndDropPermissions |
DragAndDropPermissions controls the access permissions for the content URIs associated
with a DragEvent .
|
DragEvent | Represents an event that is sent out by the system at various times during a drag and drop operation. |
FocusFinder | The algorithm used for finding the next focusable view in a given direction from a view that currently has focus. |
FrameMetrics | Class containing timing data for various milestones in a frame lifecycle reported by the rendering subsystem. |
FrameStats | This is the base class for frame statistics. |
GestureDetector |
Detects various gestures and events using the supplied MotionEvent s.
|
GestureDetector.SimpleOnGestureListener | A convenience class to extend when you only want to listen for a subset of all the gestures. |
Gravity | Standard constants and tools for placing an object within a potentially larger container. |
HapticFeedbackConstants |
Constants to be used to perform haptic feedback effects via
View.performHapticFeedback(int)
|
InputDevice | Describes the capabilities of a particular input device. |
InputDevice.MotionRange |
Provides information about the range of values for a particular MotionEvent axis.
|
InputDevice.ViewBehavior |
Provides information on how views processing MotionEvent s generated by this input
device should respond to the events.
|
InputEvent | Common base class for input events. |
InputQueue | An input queue provides a mechanism for an application to receive incoming input events. |
KeyboardShortcutGroup |
A group of KeyboardShortcutInfo .
|
KeyboardShortcutInfo | Information about a Keyboard Shortcut. |
KeyCharacterMap | Describes the keys provided by a keyboard device and their associated labels. |
KeyCharacterMap.KeyData |
This class was deprecated
in API level 11.
instead use KeyCharacterMap.getDisplayLabel(int) ,
KeyCharacterMap.getNumber(int) and KeyCharacterMap.get(int, int) .
|
KeyEvent | Object used to report key and button events. |
KeyEvent.DispatcherState |
Use with KeyEvent.dispatch(Callback, DispatcherState, Object)
for more advanced key dispatching, such as long presses.
|
LayoutInflater |
Instantiates a layout XML file into its corresponding View
objects.
|
MenuInflater | This class is used to instantiate menu XML files into Menu objects. |
MotionEvent | Object used to report movement (mouse, pen, finger, trackball) events. |
MotionEvent.PointerCoords | Transfer object for pointer coordinates. |
MotionEvent.PointerProperties | Transfer object for pointer properties. |
MotionPredictor | Calculate motion predictions. |
OrientationEventListener | Helper class for receiving notifications from the SensorManager when the orientation of the device has changed. |
OrientationListener |
This class was deprecated
in API level 3.
use OrientationEventListener instead.
This class internally uses the OrientationEventListener.
|
PixelCopy |
Provides a mechanisms to issue pixel copy requests to allow for copy
operations from Surface to Bitmap
|
PixelCopy.Request | Represents a PixelCopy request. |
PixelCopy.Request.Builder |
A builder to create the complete PixelCopy request, which is then executed by calling
PixelCopy.request(android.view.PixelCopy.Request, java.util.concurrent.Executor, java.util.function.Consumer) with the built request returned from
build()
|
PixelCopy.Result | Contains the result of a PixelCopy request |
PointerIcon | Represents an icon that can be used as a mouse pointer. |
RoundedCorner | Represents a rounded corner of the display. |
ScaleGestureDetector |
Detects scaling transformation gestures using the supplied MotionEvent s.
|
ScaleGestureDetector.SimpleOnScaleGestureListener | A convenience class to extend when you only want to listen for a subset of scaling-related events. |
ScrollCaptureSession |
A session represents the scope of interaction between a ScrollCaptureCallback and the
system during an active scroll capture operation.
|
ScrollCaptureTarget |
A target collects the set of contextual information for a ScrollCaptureHandler discovered during
a scroll capture search .
|
SearchEvent | Class that contains information about an event that triggers a search. |
SoundEffectConstants |
Constants to be used to play sound effects via View.playSoundEffect(int)
|
Surface | Handle onto a raw buffer that is being managed by the screen compositor. |
Surface.FrameRateParams |
Parameter object for Surface.setFrameRate(android.view.Surface.FrameRateParams) , describing the intended frame
rate for the Surface that setFrameRate is called on.
|
Surface.FrameRateParams.Builder | |
SurfaceControl | Handle to an on-screen Surface managed by the system compositor. |
SurfaceControl.Builder |
Builder class for SurfaceControl objects.
|
SurfaceControl.Transaction | An atomic set of changes to a set of SurfaceControl. |
SurfaceControl.TransactionStats |
Transaction stats given to the listener registered in
SurfaceControl.Transaction.addTransactionCompletedListener
|
SurfaceControl.TrustedPresentationThresholds |
This class was deprecated
in API level 35.
Use TrustedPresentationThresholds instead.
|
SurfaceControlViewHost |
Utility class for adding a View hierarchy to a SurfaceControl .
|
SurfaceControlViewHost.SurfacePackage | Package encapsulating a Surface hierarchy which contains interactive view elements. |
SurfaceView | Provides a dedicated drawing surface embedded inside of a view hierarchy. |
TextureView |
A TextureView can be used to display a content stream, such as that coming from a camera preview, a video, or an OpenGL scene. |
TouchDelegate | Helper class to handle situations where you want a view to have a larger touch area than its actual view bounds. |
VelocityTracker | Helper for tracking the velocity of motion events, for implementing flinging and other such gestures. |
VerifiedInputEvent | Base class for verified events. |
VerifiedKeyEvent | KeyEvent that has been verified by the system. |
VerifiedMotionEvent | MotionEvent that has been verified by the system. |
View |
This class represents the basic building block for user interface components. |
View.AccessibilityDelegate |
This class represents a delegate that can be registered in a |
View.BaseSavedState |
Base class for derived classes that want to save and restore their own
state in View.onSaveInstanceState() .
|
View.DragShadowBuilder | Creates an image that the system displays during the drag and drop operation. |
View.MeasureSpec | A MeasureSpec encapsulates the layout requirements passed from parent to child. |
ViewAnimationUtils | Defines common utilities for working with View's animations. |
ViewConfiguration | Contains methods to standard constants used in the UI for timeouts, sizes, and distances. |
ViewDebug |
Various debugging/tracing tools related to View and the view hierarchy.
|
ViewGroup |
A |
ViewGroup.LayoutParams | LayoutParams are used by views to tell their parents how they want to be laid out. |
ViewGroup.MarginLayoutParams | Per-child layout information for layouts that support margins. |
ViewGroupOverlay | A group overlay is an extra layer that sits on top of a ViewGroup (the "host view") which is drawn after all other content in that view (including the view group's children). |
ViewOutlineProvider |
Interface by which a View builds its Outline , used for shadow casting and clipping.
|
ViewOverlay | An overlay is an extra layer that sits on top of a View (the "host view") which is drawn after all other content in that view (including children, if the view is a ViewGroup). |
ViewPropertyAnimator | This class enables automatic and optimized animation of select properties on View objects. |
ViewStructure |
|
ViewStructure.HtmlInfo | Simplified representation of the HTML properties of a node that represents an HTML element. |
ViewStructure.HtmlInfo.Builder |
Builder for HtmlInfo objects.
|
ViewStub | A ViewStub is an invisible, zero-sized View that can be used to lazily inflate layout resources at runtime. |
ViewTreeObserver | A view tree observer is used to register listeners that can be notified of global changes in the view tree. |
Window | Abstract base class for a top-level window look and behavior policy. |
WindowAnimationFrameStats | This class was deprecated in API level 34. Use Shared FrameTimeline jank metrics instead. |
WindowContentFrameStats | This class contains window content frame statistics. |
WindowId | Safe identifier for a window. |
WindowId.FocusObserver |
Subclass for observing changes to the focus state of an WindowId .
|
WindowInsets | Describes a set of insets for window content. |
WindowInsets.Builder | Builder for WindowInsets. |
WindowInsets.Side | Class that defines different sides for insets. |
WindowInsets.Type | Class that defines different types of sources causing window insets. |
WindowInsetsAnimation | Class representing an animation of a set of windows that cause insets. |
WindowInsetsAnimation.Bounds |
Class representing the range of an WindowInsetsAnimation
|
WindowInsetsAnimation.Callback | Interface that allows the application to listen to animation events for windows that cause insets. |
WindowManager.LayoutParams | |
WindowMetrics |
Metrics about a Window, consisting of the bounds and WindowInsets .
|
Enums
ViewDebug.HierarchyTraceType | This enum was deprecated in API level 16. This enum is now unused |
ViewDebug.RecyclerTraceType | This enum was deprecated in API level 16. This enum is now unused |
Exceptions
InflateException | This exception is thrown by an inflater on error conditions. |
KeyCharacterMap.UnavailableException |
Thrown by KeyCharacterMap.load when a key character map could not be loaded.
|
Surface.OutOfResourcesException |
Exception thrown when a Canvas couldn't be locked with Surface.lockCanvas , or
when a SurfaceTexture could not successfully be allocated.
|
SurfaceHolder.BadSurfaceTypeException |
Exception that is thrown from SurfaceHolder.lockCanvas() when called on a Surface
whose type is SURFACE_TYPE_PUSH_BUFFERS.
|
WindowManager.BadTokenException |
Exception that is thrown when trying to add view whose
LayoutParams LayoutParams.token
is invalid.
|
WindowManager.InvalidDisplayException |
Exception that is thrown when calling ViewManager.addView(View, LayoutParams) to a secondary display that cannot
be found.
|
Annotations
Interfaces
- ActionMode.Callback
- ActionProvider.VisibilityListener
- AttachedSurfaceControl
- AttachedSurfaceControl.OnBufferTransformHintChangedListener
- Choreographer.FrameCallback
- Choreographer.VsyncCallback
- CollapsibleActionView
- ContextMenu
- ContextMenu.ContextMenuInfo
- GestureDetector.OnContextClickListener
- GestureDetector.OnDoubleTapListener
- GestureDetector.OnGestureListener
- InputQueue.Callback
- KeyEvent.Callback
- LayoutInflater.Factory
- LayoutInflater.Factory2
- LayoutInflater.Filter
- Menu
- MenuItem
- MenuItem.OnActionExpandListener
- MenuItem.OnMenuItemClickListener
- OnReceiveContentListener
- PixelCopy.OnPixelCopyFinishedListener
- ScaleGestureDetector.OnScaleGestureListener
- ScrollCaptureCallback
- ScrollFeedbackProvider
- SubMenu
- SurfaceControl.TransactionCommittedListener
- SurfaceControlInputReceiver
- SurfaceHolder
- SurfaceHolder.Callback
- SurfaceHolder.Callback2
- TextureView.SurfaceTextureListener
- View.OnApplyWindowInsetsListener
- View.OnAttachStateChangeListener
- View.OnCapturedPointerListener
- View.OnClickListener
- View.OnContextClickListener
- View.OnCreateContextMenuListener
- View.OnDragListener
- View.OnFocusChangeListener
- View.OnGenericMotionListener
- View.OnHoverListener
- View.OnKeyListener
- View.OnLayoutChangeListener
- View.OnLongClickListener
- View.OnScrollChangeListener
- View.OnSystemUiVisibilityChangeListener
- View.OnTouchListener
- View.OnUnhandledKeyEventListener
- ViewGroup.OnHierarchyChangeListener
- ViewManager
- ViewParent
- ViewStub.OnInflateListener
- ViewTreeObserver.OnDrawListener
- ViewTreeObserver.OnGlobalFocusChangeListener
- ViewTreeObserver.OnGlobalLayoutListener
- ViewTreeObserver.OnPreDrawListener
- ViewTreeObserver.OnScrollChangedListener
- ViewTreeObserver.OnTouchModeChangeListener
- ViewTreeObserver.OnWindowAttachListener
- ViewTreeObserver.OnWindowFocusChangeListener
- ViewTreeObserver.OnWindowVisibilityChangeListener
- Window.Callback
- Window.OnFrameMetricsAvailableListener
- Window.OnRestrictedCaptionAreaChangedListener
- WindowInsetsAnimationController
- WindowInsetsAnimationControlListener
- WindowInsetsController
- WindowInsetsController.OnControllableInsetsChangedListener
- WindowManager
Classes
- AbsSavedState
- ActionMode
- ActionMode.Callback2
- ActionProvider
- Choreographer
- Choreographer.FrameData
- Choreographer.FrameTimeline
- ContentInfo
- ContentInfo.Builder
- ContextThemeWrapper
- Display
- Display.HdrCapabilities
- Display.Mode
- DisplayCutout
- DisplayCutout.Builder
- DisplayShape
- DragAndDropPermissions
- DragEvent
- FocusFinder
- FrameMetrics
- FrameStats
- GestureDetector
- GestureDetector.SimpleOnGestureListener
- Gravity
- HapticFeedbackConstants
- InputDevice
- InputDevice.MotionRange
- InputDevice.ViewBehavior
- InputEvent
- InputQueue
- KeyboardShortcutGroup
- KeyboardShortcutInfo
- KeyCharacterMap
- KeyCharacterMap.KeyData
- KeyEvent
- KeyEvent.DispatcherState
- LayoutInflater
- MenuInflater
- MotionEvent
- MotionEvent.PointerCoords
- MotionEvent.PointerProperties
- MotionPredictor
- OrientationEventListener
- OrientationListener
- PixelCopy
- PixelCopy.Request
- PixelCopy.Request.Builder
- PixelCopy.Result
- PointerIcon
- RoundedCorner
- ScaleGestureDetector
- ScaleGestureDetector.SimpleOnScaleGestureListener
- ScrollCaptureSession
- ScrollCaptureTarget
- SearchEvent
- SoundEffectConstants
- Surface
- Surface.FrameRateParams
- Surface.FrameRateParams.Builder
- SurfaceControl
- SurfaceControl.Builder
- SurfaceControl.Transaction
- SurfaceControl.TransactionStats
- SurfaceControl.TrustedPresentationThresholds
- SurfaceControlViewHost
- SurfaceControlViewHost.SurfacePackage
- SurfaceView
- TextureView
- TouchDelegate
- VelocityTracker
- VerifiedInputEvent
- VerifiedKeyEvent
- VerifiedMotionEvent
- View
- View.AccessibilityDelegate
- View.BaseSavedState
- View.DragShadowBuilder
- View.MeasureSpec
- ViewAnimationUtils
- ViewConfiguration
- ViewDebug
- ViewGroup
- ViewGroup.LayoutParams
- ViewGroup.MarginLayoutParams
- ViewGroupOverlay
- ViewOutlineProvider
- ViewOverlay
- ViewPropertyAnimator
- ViewStructure
- ViewStructure.HtmlInfo
- ViewStructure.HtmlInfo.Builder
- ViewStub
- ViewTreeObserver
- Window
- WindowAnimationFrameStats
- WindowContentFrameStats
- WindowId
- WindowId.FocusObserver
- WindowInsets
- WindowInsets.Builder
- WindowInsets.Side
- WindowInsets.Type
- WindowInsetsAnimation
- WindowInsetsAnimation.Bounds
- WindowInsetsAnimation.Callback
- WindowManager.LayoutParams
- WindowMetrics
Enums
Exceptions