View View Class

Definition

User Interface

[Android.Runtime.Register("android/view/View", ApiSince=1, DoNotGenerateAcw=true)]
public class View : Java.Lang.Object, Android.Graphics.Drawables.Drawable.ICallback, Android.Views.Accessibility.IAccessibilityEventSource, Android.Views.KeyEvent.ICallback, IDisposable
type View = class
    inherit Object
    interface Drawable.ICallback
    interface IJavaObject
    interface IDisposable
    interface IAccessibilityEventSource
    interface KeyEvent.ICallback
Inheritance
Derived
Attributes
Implements

Remarks

Android platform documentation

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Constructors

View(Context) View(Context)

Simple constructor to use when creating a view from code.

View(Context, IAttributeSet) View(Context, IAttributeSet)

Constructor that is called when inflating a view from XML.

View(Context, IAttributeSet, Int32) View(Context, IAttributeSet, Int32)

Perform inflation from XML and apply a class-specific base style from a theme attribute.

View(Context, IAttributeSet, Int32, Int32) View(Context, IAttributeSet, Int32, Int32)

Perform inflation from XML and apply a class-specific base style from a theme attribute or style resource.

View(IntPtr, JniHandleOwnership) View(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

Fields

AccessibilityLiveRegionAssertive AccessibilityLiveRegionAssertive

Live region mode specifying that accessibility services should interrupt ongoing speech to immediately announce changes to this view.

AccessibilityLiveRegionNone AccessibilityLiveRegionNone

Live region mode specifying that accessibility services should not automatically announce changes to this view.

AccessibilityLiveRegionPolite AccessibilityLiveRegionPolite

Live region mode specifying that accessibility services should announce changes to this view.

AutofillFlagIncludeNotImportantViews AutofillFlagIncludeNotImportantViews
AutofillHintCreditCardExpirationDate AutofillHintCreditCardExpirationDate
AutofillHintCreditCardExpirationDay AutofillHintCreditCardExpirationDay
AutofillHintCreditCardExpirationMonth AutofillHintCreditCardExpirationMonth
AutofillHintCreditCardExpirationYear AutofillHintCreditCardExpirationYear
AutofillHintCreditCardNumber AutofillHintCreditCardNumber
AutofillHintCreditCardSecurityCode AutofillHintCreditCardSecurityCode
AutofillHintEmailAddress AutofillHintEmailAddress
AutofillHintName AutofillHintName
AutofillHintPassword AutofillHintPassword
AutofillHintPhone AutofillHintPhone
AutofillHintPostalAddress AutofillHintPostalAddress
AutofillHintPostalCode AutofillHintPostalCode
AutofillHintUsername AutofillHintUsername
AutofillTypeDate AutofillTypeDate
AutofillTypeList AutofillTypeList
AutofillTypeNone AutofillTypeNone
AutofillTypeText AutofillTypeText
AutofillTypeToggle AutofillTypeToggle
DragFlagGlobal DragFlagGlobal
DragFlagGlobalPersistableUriPermission DragFlagGlobalPersistableUriPermission
DragFlagGlobalPrefixUriPermission DragFlagGlobalPrefixUriPermission
DragFlagGlobalUriRead DragFlagGlobalUriRead
DragFlagGlobalUriWrite DragFlagGlobalUriWrite
DragFlagOpaque DragFlagOpaque
FindViewsWithContentDescription FindViewsWithContentDescription

Find find views that contain the specified content description.

FocusableAuto FocusableAuto
ImportantForAccessibilityAuto ImportantForAccessibilityAuto

Automatically determine whether a view is important for accessibility.

ImportantForAccessibilityNo ImportantForAccessibilityNo

The view is not important for accessibility.

ImportantForAccessibilityNoHideDescendants ImportantForAccessibilityNoHideDescendants

The view is not important for accessibility, nor are any of its descendant views.

ImportantForAccessibilityYes ImportantForAccessibilityYes

The view is important for accessibility.

ImportantForAutofillAuto ImportantForAutofillAuto
ImportantForAutofillNo ImportantForAutofillNo
ImportantForAutofillNoExcludeDescendants ImportantForAutofillNoExcludeDescendants
ImportantForAutofillYes ImportantForAutofillYes
ImportantForAutofillYesExcludeDescendants ImportantForAutofillYesExcludeDescendants
LayoutDirectionInherit LayoutDirectionInherit

Horizontal layout direction of this view is inherited from its parent.

LayoutDirectionLocale LayoutDirectionLocale

Horizontal layout direction of this view is from deduced from the default language script for the locale.

LayoutDirectionLtr LayoutDirectionLtr

Horizontal layout direction of this view is from Left to Right.

LayoutDirectionRtl LayoutDirectionRtl

Horizontal layout direction of this view is from Right to Left.

MeasuredHeightStateShift MeasuredHeightStateShift

Bit shift of MeasuredStateMask to get to the height bits for functions that combine both width and height into a single int, such as MeasuredState and the childState argument of ResolveSizeAndState(Int32, Int32, Int32).

MeasuredSizeMask MeasuredSizeMask

Bits of MeasuredWidthAndState and MeasuredWidthAndState that provide the actual measured size.

MeasuredStateMask MeasuredStateMask

Bits of MeasuredWidthAndState and MeasuredWidthAndState that provide the additional state bits.

MeasuredStateTooSmall MeasuredStateTooSmall

Bit of MeasuredWidthAndState and MeasuredWidthAndState that indicates the measured size is smaller that the space the view would like to have.

NoId NoId

Used to mark a View that has no ID.

NotFocusable NotFocusable
OverScrollAlways OverScrollAlways

Always allow a user to over-scroll this view, provided it is a view that can scroll.

OverScrollIfContentScrolls OverScrollIfContentScrolls

Allow a user to over-scroll this view only if the content is large enough to meaningfully scroll, provided it is a view that can scroll.

OverScrollNever OverScrollNever

Never allow a user to over-scroll this view.

ScreenStateOff ScreenStateOff

Indicates that the screen has changed state and is now off.

ScreenStateOn ScreenStateOn

Indicates that the screen has changed state and is now on.

ScrollAxisHorizontal ScrollAxisHorizontal

Indicates scrolling along the horizontal axis.

ScrollAxisNone ScrollAxisNone

Indicates no axis of view scrolling.

ScrollAxisVertical ScrollAxisVertical

Indicates scrolling along the vertical axis.

SystemUiFlagFullscreen SystemUiFlagFullscreen

Flag for SystemUiVisibility: View has requested to go into the normal fullscreen mode so that its content can take over the screen while still allowing the user to interact with the application.

SystemUiFlagHideNavigation SystemUiFlagHideNavigation

Flag for SystemUiVisibility: View has requested that the system navigation be temporarily hidden.

SystemUiFlagImmersive SystemUiFlagImmersive

Flag for SystemUiVisibility: View would like to remain interactive when hiding the navigation bar with SystemUiFlagHideNavigation.

SystemUiFlagImmersiveSticky SystemUiFlagImmersiveSticky

Flag for SystemUiVisibility: View would like to remain interactive when hiding the status bar with SystemUiFlagFullscreen and/or hiding the navigation bar with SystemUiFlagHideNavigation.

SystemUiFlagLayoutFullscreen SystemUiFlagLayoutFullscreen

Flag for SystemUiVisibility: View would like its window to be laid out as if it has requested SystemUiFlagFullscreen, even if it currently hasn't.

SystemUiFlagLayoutHideNavigation SystemUiFlagLayoutHideNavigation

Flag for SystemUiVisibility: View would like its window to be laid out as if it has requested SystemUiFlagHideNavigation, even if it currently hasn't.

SystemUiFlagLayoutStable SystemUiFlagLayoutStable

Flag for SystemUiVisibility: When using other layout flags, we would like a stable view of the content insets given to FitSystemWindows(Rect).

SystemUiFlagLightNavigationBar SystemUiFlagLightNavigationBar
SystemUiFlagLightStatusBar SystemUiFlagLightStatusBar
SystemUiFlagLowProfile SystemUiFlagLowProfile

Flag for SystemUiVisibility: View has requested the system UI to enter an unobtrusive "low profile" mode.

SystemUiFlagVisible SystemUiFlagVisible

Special constant for SystemUiVisibility: View has requested the system UI (status bar) to be visible (the default).

SystemUiLayoutFlags SystemUiLayoutFlags

Flags that can impact the layout in relation to system UI.

TextAlignmentCenter TextAlignmentCenter

Center the paragraph, e.g.

TextAlignmentGravity TextAlignmentGravity

Default for the root view.

TextAlignmentInherit TextAlignmentInherit

Default text alignment.

TextAlignmentResolvedDefault TextAlignmentResolvedDefault
TextAlignmentTextEnd TextAlignmentTextEnd

Align to the end of the paragraph, e.g.

TextAlignmentTextStart TextAlignmentTextStart

Align to the start of the paragraph, e.g.

TextAlignmentViewEnd TextAlignmentViewEnd

Align to the end of the view, which is ALIGN_RIGHT if the view’s resolved layoutDirection is LTR, and ALIGN_LEFT otherwise.

TextAlignmentViewStart TextAlignmentViewStart

Align to the start of the view, which is ALIGN_LEFT if the view’s resolved layoutDirection is LTR, and ALIGN_RIGHT otherwise.

TextDirectionAnyRtl TextDirectionAnyRtl

Text direction is using "any-RTL" algorithm.

TextDirectionFirstStrong TextDirectionFirstStrong

Text direction is using "first strong algorithm".

TextDirectionFirstStrongLtr TextDirectionFirstStrongLtr
TextDirectionFirstStrongRtl TextDirectionFirstStrongRtl
TextDirectionInherit TextDirectionInherit

Text direction is inherited through ViewGroup

TextDirectionLocale TextDirectionLocale

Text direction is coming from the system Locale.

TextDirectionLtr TextDirectionLtr

Text direction is forced to LTR.

TextDirectionRtl TextDirectionRtl

Text direction is forced to RTL.

ViewLogTag ViewLogTag

The logging tag used by this class with android.util.

Properties

AccessibilityClassName AccessibilityClassName
AccessibilityClassNameFormatted AccessibilityClassNameFormatted
AccessibilityLiveRegion AccessibilityLiveRegion

Gets the live region mode for this View.

AccessibilityNodeProvider AccessibilityNodeProvider

Gets the provider for managing a virtual view hierarchy rooted at this View and reported to AccessibilityServices that explore the window content.

AccessibilityTraversalAfter AccessibilityTraversalAfter
AccessibilityTraversalBefore AccessibilityTraversalBefore
Activated Activated

Indicates the activation state of this view.

Alpha Alpha

The opacity of the view.

Animation Animation

Get the animation currently associated with this view.

ApplicationWindowToken ApplicationWindowToken

Retrieve a unique token identifying the top-level "real" window of the window that this view is attached to.

ApplyWindowInsets ApplyWindowInsets
AutofillId AutofillId
AutofillType AutofillType
AutofillValue AutofillValue
Background Background

Gets the background drawable

BackgroundTintList BackgroundTintList

Return the tint applied to the background drawable, if specified.

BackgroundTintMode BackgroundTintMode

Return the blending mode used to apply the tint to the background drawable, if specified.

Baseline Baseline
Bottom Bottom

Bottom position of this view relative to its parent.

BottomFadingEdgeStrength BottomFadingEdgeStrength

Returns the strength, or intensity, of the bottom faded edge.

BottomPaddingOffset BottomPaddingOffset

Amount by which to extend the bottom fading region.

CameraDistance CameraDistance

Gets the distance along the Z axis from the camera to this view.

Class Class

Returns the unique instance of Class that represents this object's class.

(Inherited from Object)
Clickable Clickable

Indicates whether this view reacts to click events or not.

ClipBounds ClipBounds

Returns a copy of the current ClipBounds.

ClipToOutline ClipToOutline

Returns whether the Outline should be used to clip the contents of the View.

ContentDescription ContentDescription
ContentDescriptionFormatted ContentDescriptionFormatted

Gets the View description.

Context Context

Returns the context the view is running in, through which it can access the current theme, resources, etc.

ContextClickable ContextClickable
ContextMenuInfo ContextMenuInfo

Views should implement this if they have extra information to associate with the context menu.

DefaultFocusHighlightEnabled DefaultFocusHighlightEnabled
Display Display

Gets the logical display to which the view's window has been attached.

DrawingCache DrawingCache
DrawingCacheBackgroundColor DrawingCacheBackgroundColor
DrawingCacheEnabled DrawingCacheEnabled
DrawingCacheQuality DrawingCacheQuality

Returns the quality of the drawing cache.

DrawingTime DrawingTime
DuplicateParentStateEnabled DuplicateParentStateEnabled
Elevation Elevation

The base elevation of this view relative to its parent, in pixels.

EmptyStateSet EmptyStateSet

Indicates the view has no states set.

Enabled Enabled

Returns the enabled status for this view.

EnabledFocusedSelectedStateSet EnabledFocusedSelectedStateSet

Indicates the view is enabled, focused and selected.

EnabledFocusedSelectedWindowFocusedStateSet EnabledFocusedSelectedWindowFocusedStateSet

Indicates the view is enabled, focused, selected and its window has the focus.

EnabledFocusedStateSet EnabledFocusedStateSet

Indicates the view is enabled and has the focus.

EnabledFocusedWindowFocusedStateSet EnabledFocusedWindowFocusedStateSet

Indicates the view is enabled, focused and its window has the focus.

EnabledSelectedStateSet EnabledSelectedStateSet

Indicates the view is enabled and selected.

EnabledSelectedWindowFocusedStateSet EnabledSelectedWindowFocusedStateSet

Indicates the view is enabled, selected and its window has the focus.

EnabledStateSet EnabledStateSet

Indicates the view is enabled.

EnabledWindowFocusedStateSet EnabledWindowFocusedStateSet

Indicates the view is enabled and that its window has focus.

FilterTouchesWhenObscured FilterTouchesWhenObscured

Gets whether the framework should discard touches when the view's window is obscured by another visible window.

FitsSystemWindows FitsSystemWindows

Check for state of SetFitsSystemWindows(Boolean).

Focusable Focusable

Returns whether this View is able to take focus.

FocusableInTouchMode FocusableInTouchMode

When a view is focusable, it may not want to take focus when in touch mode.

FocusedByDefault FocusedByDefault
FocusedSelectedStateSet FocusedSelectedStateSet

Indicates the view is focused and selected.

FocusedSelectedWindowFocusedStateSet FocusedSelectedWindowFocusedStateSet

Indicates the view is focused, selected and its window has the focus.

FocusedStateSet FocusedStateSet

Indicates the view is focused.

FocusedWindowFocusedStateSet FocusedWindowFocusedStateSet

Indicates the view has the focus and that its window has the focus.

Foreground Foreground
ForegroundGravity ForegroundGravity
ForegroundTintList ForegroundTintList
ForegroundTintMode ForegroundTintMode
Handle Handle

The handle to the underlying Android instance.

(Inherited from Object)
Handler Handler
HapticFeedbackEnabled HapticFeedbackEnabled
HasExplicitFocusable HasExplicitFocusable
HasFocus HasFocus

Returns true if this view has focus itself, or is the ancestor of the view that has focus.

HasFocusable HasFocusable

Returns true if this view is focusable or if it contains a reachable View for which HasFocusable returns true.

HasNestedScrollingParent HasNestedScrollingParent

Returns true if this view has a nested scrolling parent.

HasOnClickListeners HasOnClickListeners

Return whether this view has an attached OnClickListener.

HasOverlappingRendering HasOverlappingRendering

Returns whether this View has content which overlaps.

HasPointerCapture HasPointerCapture
HasTransientState HasTransientState
HasWindowFocus HasWindowFocus

Returns true if this view is in a window that currently has window focus.

Height Height

Return the height of your view.

HorizontalFadingEdgeEnabled HorizontalFadingEdgeEnabled
HorizontalFadingEdgeLength HorizontalFadingEdgeLength

Returns the size of the horizontal faded edges used to indicate that more content in this view is visible.

HorizontalScrollBarEnabled HorizontalScrollBarEnabled
HorizontalScrollbarHeight HorizontalScrollbarHeight

Returns the height of the horizontal scrollbar.

Hovered Hovered

Returns true if the view is currently hovered.

Id Id

Returns this view's identifier.

IJavaObjectEx.IsProxy IJavaObjectEx.IsProxy Inherited from Object
IJavaObjectEx.KeyHandle IJavaObjectEx.KeyHandle Inherited from Object
IJavaObjectEx.NeedsActivation IJavaObjectEx.NeedsActivation Inherited from Object
IJavaPeerable.JniManagedPeerState IJavaPeerable.JniManagedPeerState Inherited from Object
ImportantForAccessibility ImportantForAccessibility

Gets the mode for determining whether this View is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen.

ImportantForAutofill ImportantForAutofill
IsAccessibilityFocused IsAccessibilityFocused

Returns whether this View is accessibility focused.

IsAttachedToWindow IsAttachedToWindow

Returns true if this view is currently attached to a window.

IsDirty IsDirty

True if this view has changed since the last time being drawn.

IsFocused IsFocused

Returns true if this view has focus

IsHardwareAccelerated IsHardwareAccelerated
IsImportantForAccessibility IsImportantForAccessibility

Computes whether this view should be exposed for accessibility.

IsImportantForAutofill IsImportantForAutofill
IsInEditMode IsInEditMode

Indicates whether this View is currently in edit mode.

IsInLayout IsInLayout

Returns whether the view hierarchy is currently undergoing a layout pass.

IsInTouchMode IsInTouchMode

Returns whether the device is currently in touch mode.

IsLaidOut IsLaidOut

Returns true if this view has been through at least one layout since it was last attached to or detached from a window.

IsLayoutDirectionResolved IsLayoutDirectionResolved
IsLayoutRequested IsLayoutRequested
IsOpaque IsOpaque

Indicates whether this View is opaque.

IsPaddingOffsetRequired IsPaddingOffsetRequired

If the View draws content inside its padding and enables fading edges, it needs to support padding offsets.

IsPaddingRelative IsPaddingRelative

Return if the padding has been set through relative values SetPaddingRelative(Int32, Int32, Int32, Int32) or through

IsScrollContainer IsScrollContainer

Indicates whether this view is one of the set of scrollable containers in its window.

IsShown IsShown

Returns the visibility of this view and all of its ancestors

IsTemporarilyDetached IsTemporarilyDetached
IsTextAlignmentResolved IsTextAlignmentResolved
IsTextDirectionResolved IsTextDirectionResolved
JniIdentityHashCode JniIdentityHashCode Inherited from Object
JniPeerMembers JniPeerMembers
KeepScreenOn KeepScreenOn

Returns whether the screen should remain on, corresponding to the current value of KeepScreenOn.

KeyboardNavigationCluster KeyboardNavigationCluster
KeyDispatcherState KeyDispatcherState

Return the global KeyEvent.DispatcherState for this view's window.

LabelFor LabelFor

Gets the id of a view for which this view serves as a label for accessibility purposes.

LayerType LayerType

Indicates what type of layer is currently associated with this view.

LayoutDirection LayoutDirection

Returns the resolved layout direction for this view.

LayoutParameters LayoutParameters

Get the LayoutParams associated with this view.

Left Left

Left position of this view relative to its parent.

LeftFadingEdgeStrength LeftFadingEdgeStrength

Returns the strength, or intensity, of the left faded edge.

LeftPaddingOffset LeftPaddingOffset

Amount by which to extend the left fading region.

LongClickable LongClickable

Indicates whether this view reacts to long click events or not.

Matrix Matrix

The transform matrix of this view, which is calculated based on the current rotation, scale, and pivot properties.

MeasuredHeight MeasuredHeight

Like MeasuredHeightAndState, but only returns the raw width component (that is the result is masked by MeasuredSizeMask).

MeasuredHeightAndState MeasuredHeightAndState

Return the full height measurement information for this view as computed by the most recent call to Measure(Int32, Int32).

MeasuredState MeasuredState

Return only the state bits of MeasuredWidthAndState and MeasuredHeightAndState, combined into one integer.

MeasuredWidth MeasuredWidth

Like MeasuredWidthAndState, but only returns the raw width component (that is the result is masked by MeasuredSizeMask).

MeasuredWidthAndState MeasuredWidthAndState

Return the full width measurement information for this view as computed by the most recent call to Measure(Int32, Int32).

MinimumHeight MinimumHeight

Returns the minimum height of the view.

MinimumWidth MinimumWidth

Returns the minimum width of the view.

NestedScrollingEnabled NestedScrollingEnabled

Returns true if nested scrolling is enabled for this view.

NextClusterForwardId NextClusterForwardId
NextFocusDownId NextFocusDownId

Gets the id of the view to use when the next focus is Down.

NextFocusForwardId NextFocusForwardId

Gets the id of the view to use when the next focus is Forward.

NextFocusLeftId NextFocusLeftId

Gets the id of the view to use when the next focus is Left.

NextFocusRightId NextFocusRightId

Gets the id of the view to use when the next focus is Right.

NextFocusUpId NextFocusUpId

Gets the id of the view to use when the next focus is Up.

OnFocusChangeListener OnFocusChangeListener

Returns the focus-change callback registered for this view.

OutlineProvider OutlineProvider

Returns the current ViewOutlineProvider of the view, which generates the Outline that defines the shape of the shadow it casts, and enables outline clipping.

Overlay Overlay

Returns the overlay for this view, creating it if it does not yet exist.

OverScrollMode OverScrollMode

Returns the over-scroll mode for this view.

PaddingBottom PaddingBottom

Returns the bottom padding of this view.

PaddingEnd PaddingEnd

Returns the end padding of this view depending on its resolved layout direction.

PaddingLeft PaddingLeft

Returns the left padding of this view.

PaddingRight PaddingRight

Returns the right padding of this view.

PaddingStart PaddingStart

Returns the start padding of this view depending on its resolved layout direction.

PaddingTop PaddingTop

Returns the top padding of this view.

Parent Parent

Gets the parent of this view.

ParentForAccessibility ParentForAccessibility

Gets the parent for accessibility purposes.

PeerReference PeerReference Inherited from Object
PivotX PivotX

The x location of the point around which the view is Rotation and ScaleX.

PivotY PivotY

The y location of the point around which the view is Rotation and ScaleY.

PointerIcon PointerIcon
Pressed Pressed

Indicates whether the view is currently in pressed state.

PressedEnabledFocusedSelectedStateSet PressedEnabledFocusedSelectedStateSet

Indicates the view is pressed, enabled, focused and selected.

PressedEnabledFocusedSelectedWindowFocusedStateSet PressedEnabledFocusedSelectedWindowFocusedStateSet

Indicates the view is pressed, enabled, focused, selected and its window has the focus.

PressedEnabledFocusedStateSet PressedEnabledFocusedStateSet

Indicates the view is pressed, enabled and focused.

PressedEnabledFocusedWindowFocusedStateSet PressedEnabledFocusedWindowFocusedStateSet

Indicates the view is pressed, enabled, focused and its window has the focus.

PressedEnabledSelectedStateSet PressedEnabledSelectedStateSet

Indicates the view is pressed, enabled and selected.

PressedEnabledSelectedWindowFocusedStateSet PressedEnabledSelectedWindowFocusedStateSet

Indicates the view is pressed, enabled, selected and its window has the focus.

PressedEnabledStateSet PressedEnabledStateSet

Indicates the view is pressed and enabled.

PressedEnabledWindowFocusedStateSet PressedEnabledWindowFocusedStateSet

Indicates the view is pressed, enabled and its window has the focus.

PressedFocusedSelectedStateSet PressedFocusedSelectedStateSet

Indicates the view is pressed, focused and selected.

PressedFocusedSelectedWindowFocusedStateSet PressedFocusedSelectedWindowFocusedStateSet

Indicates the view is pressed, focused, selected and its window has the focus.

PressedFocusedStateSet PressedFocusedStateSet

Indicates the view is pressed and focused.

PressedFocusedWindowFocusedStateSet PressedFocusedWindowFocusedStateSet

Indicates the view is pressed, focused and its window has the focus.

PressedSelectedStateSet PressedSelectedStateSet

Indicates the view is pressed and selected.

PressedSelectedWindowFocusedStateSet PressedSelectedWindowFocusedStateSet

Indicates the view is pressed, selected and its window has the focus.

PressedStateSet PressedStateSet

Indicates the view is pressed.

PressedWindowFocusedStateSet PressedWindowFocusedStateSet

Indicates the view is pressed and its window has the focus.

Resources Resources

Returns the resources associated with this view.

RevealOnFocusHint RevealOnFocusHint
Right Right

Right position of this view relative to its parent.

RightFadingEdgeStrength RightFadingEdgeStrength

Returns the strength, or intensity, of the right faded edge.

RightPaddingOffset RightPaddingOffset

Amount by which to extend the right fading region.

RootView RootView
RootWindowInsets RootWindowInsets
Rotation Rotation

The degrees that the view is rotated around the pivot point.

RotationX RotationX

The degrees that the view is rotated around the horizontal axis through the pivot point.

RotationY RotationY

The degrees that the view is rotated around the vertical axis through the pivot point.

SaveEnabled SaveEnabled

Indicates whether this view will save its state (that is, whether its OnSaveInstanceState() method will be called).

SaveFromParentEnabled SaveFromParentEnabled

Indicates whether the entire hierarchy under this view will save its state when a state saving traversal occurs from its parent.

ScaleX ScaleX

The amount that the view is scaled in x around the pivot point, as a proportion of the view's unscaled width.

ScaleXs ScaleXs

A Property wrapper around the scaleX functionality handled by the ScaleX and ScaleX methods.

ScaleY ScaleY

The amount that the view is scaled in y around the pivot point, as a proportion of the view's unscaled height.

ScaleYs ScaleYs

A Property wrapper around the scaleY functionality handled by the ScaleY and ScaleY methods.

ScrollBarDefaultDelayBeforeFade ScrollBarDefaultDelayBeforeFade

Returns the delay before scrollbars fade.

ScrollBarFadeDuration ScrollBarFadeDuration

Returns the scrollbar fade duration.

ScrollbarFadingEnabled ScrollbarFadingEnabled

Returns true if scrollbars will fade when this view is not scrolling

ScrollBarSize ScrollBarSize

Returns the scrollbar size.

ScrollBarStyle ScrollBarStyle
ScrollIndicators ScrollIndicators
ScrollX ScrollX

Return the scrolled left position of this view.

ScrollY ScrollY

Return the scrolled top position of this view.

Selected Selected

Indicates the selection state of this view.

SelectedStateSet SelectedStateSet

Indicates the view is selected.

SelectedWindowFocusedStateSet SelectedWindowFocusedStateSet

Indicates the view is selected and that its window has the focus.

SolidColor SolidColor

Override this if your view is known to always be drawn on top of a solid color background, and needs to draw fading edges.

SoundEffectsEnabled SoundEffectsEnabled
StateListAnimator StateListAnimator

Returns the current StateListAnimator if exists.

SuggestedMinimumHeight SuggestedMinimumHeight

Returns the suggested minimum height that the view should use.

SuggestedMinimumWidth SuggestedMinimumWidth

Returns the suggested minimum width that the view should use.

SystemUiVisibility SystemUiVisibility

Returns the last SystemUiVisibility that this view has requested.

Tag Tag

Returns this view's tag.

TextAlignment TextAlignment

Return the resolved text alignment.

TextDirection TextDirection

Return the resolved text direction.

ThresholdClass ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

TooltipText TooltipText
TooltipTextFormatted TooltipTextFormatted
Top Top

Top position of this view relative to its parent.

TopFadingEdgeStrength TopFadingEdgeStrength

Returns the strength, or intensity, of the top faded edge.

TopPaddingOffset TopPaddingOffset

Amount by which to extend the top fading region.

Touchables Touchables

Find and return all touchable views that are descendants of this view, possibly including this view if it is touchable itself.

TouchDelegate TouchDelegate

Gets the TouchDelegate for this View.

TransitionName TransitionName

Returns the name of the View to be used to identify Views in Transitions.

TranslationX TranslationX

The horizontal location of this view relative to its Left position.

TranslationY TranslationY

The vertical location of this view relative to its Top position.

TranslationZ TranslationZ

The depth location of this view relative to its Elevation.

VerticalFadingEdgeEnabled VerticalFadingEdgeEnabled
VerticalFadingEdgeLength VerticalFadingEdgeLength

Returns the size of the vertical faded edges used to indicate that more content in this view is visible.

VerticalScrollBarEnabled VerticalScrollBarEnabled
VerticalScrollbarPosition VerticalScrollbarPosition
VerticalScrollbarWidth VerticalScrollbarWidth

Returns the width of the vertical scrollbar.

ViewTreeObserver ViewTreeObserver

Returns the ViewTreeObserver for this view's hierarchy.

Visibility Visibility

Returns the visibility status for this view.

Width Width

Return the width of the your view.

WindowAttachCount WindowAttachCount
WindowFocusedStateSet WindowFocusedStateSet

Indicates the view's window has focus.

WindowId WindowId

Retrieve the WindowId for the window this view is currently attached to.

WindowSystemUiVisibility WindowSystemUiVisibility

Returns the current system UI visibility that is currently set for the entire window.

WindowToken WindowToken

Retrieve a unique token identifying the window this view is attached to.

WindowVisibility WindowVisibility

Returns the current visibility of the window this view is attached to (either Gone, Invisible, or Visible).

X X

A Property wrapper around the x functionality handled by the SetX(Single) and GetX() methods.

Y Y

A Property wrapper around the y functionality handled by the SetY(Single) and GetY() methods.

Z Z

A Property wrapper around the z functionality handled by the SetZ(Single) and GetZ() methods.

Methods

AddChildrenForAccessibility(IList<View>) AddChildrenForAccessibility(IList<View>)
AddExtraDataToAccessibilityNodeInfo(AccessibilityNodeInfo, String, Bundle) AddExtraDataToAccessibilityNodeInfo(AccessibilityNodeInfo, String, Bundle)
AddFocusables(IList<View>, FocusSearchDirection) AddFocusables(IList<View>, FocusSearchDirection)
AddFocusables(IList<View>, FocusSearchDirection, FocusablesFlags) AddFocusables(IList<View>, FocusSearchDirection, FocusablesFlags)
AddKeyboardNavigationClusters(ICollection<View>, FocusSearchDirection) AddKeyboardNavigationClusters(ICollection<View>, FocusSearchDirection)
AddOnAttachStateChangeListener(View+IOnAttachStateChangeListener) AddOnAttachStateChangeListener(View+IOnAttachStateChangeListener)

Add a listener for attach state changes.

AddOnLayoutChangeListener(View+IOnLayoutChangeListener) AddOnLayoutChangeListener(View+IOnLayoutChangeListener)

Add a listener that will be called when the bounds of the view change due to layout processing.

AddTouchables(IList<View>) AddTouchables(IList<View>)
Animate() Animate()

This method returns a ViewPropertyAnimator object, which can be used to animate specific properties on this View.

AnnounceForAccessibility(ICharSequence) AnnounceForAccessibility(ICharSequence)
AnnounceForAccessibility(String) AnnounceForAccessibility(String)
Autofill(AutofillValue) Autofill(AutofillValue)
Autofill(SparseArray) Autofill(SparseArray)
AwakenScrollBars() AwakenScrollBars()
AwakenScrollBars(Int32) AwakenScrollBars(Int32)
AwakenScrollBars(Int32, Boolean) AwakenScrollBars(Int32, Boolean)
BringToFront() BringToFront()

Change the view's z order in the tree, so it's on top of other sibling views.

BuildDrawingCache() BuildDrawingCache()
BuildDrawingCache(Boolean) BuildDrawingCache(Boolean)
BuildLayer() BuildLayer()

Forces this view's layer to be created and this view to be rendered into its layer.

CallOnClick() CallOnClick()

Directly call any attached OnClickListener.

CancelDragAndDrop() CancelDragAndDrop()
CancelLongPress() CancelLongPress()

Cancels a pending long press.

CancelPendingInputEvents() CancelPendingInputEvents()

Cancel any deferred high-level input events that were previously posted to the event queue.

CanResolveLayoutDirection() CanResolveLayoutDirection()

Check if layout direction resolution can be done.

CanResolveTextAlignment() CanResolveTextAlignment()

Check if text alignment resolution can be done.

CanResolveTextDirection() CanResolveTextDirection()

Check if text direction resolution can be done.

CanScrollHorizontally(Int32) CanScrollHorizontally(Int32)

Check if this view can be scrolled horizontally in a certain direction.

CanScrollVertically(Int32) CanScrollVertically(Int32)

Check if this view can be scrolled vertically in a certain direction.

CheckInputConnectionProxy(View) CheckInputConnectionProxy(View)

Called by the InputMethodManager when a view who is not the current input connection target is trying to make a call on the manager.

ClearAnimation() ClearAnimation()

Cancels any animations for this view.

ClearFocus() ClearFocus()

Called when this view wants to give up focus.

Clone() Clone()

Creates and returns a copy of this Object.

(Inherited from Object)
CombineMeasuredStates(Int32, Int32) CombineMeasuredStates(Int32, Int32)

Merge two states as returned by MeasuredState.

ComputeHorizontalScrollExtent() ComputeHorizontalScrollExtent()
ComputeHorizontalScrollOffset() ComputeHorizontalScrollOffset()
ComputeHorizontalScrollRange() ComputeHorizontalScrollRange()
ComputeScroll() ComputeScroll()

Called by a parent to request that a child update its values for mScrollX and mScrollY if necessary.

ComputeSystemWindowInsets(WindowInsets, Rect) ComputeSystemWindowInsets(WindowInsets, Rect)

Compute insets that should be consumed by this view and the ones that should propagate to those under it.

ComputeVerticalScrollExtent() ComputeVerticalScrollExtent()
ComputeVerticalScrollOffset() ComputeVerticalScrollOffset()
ComputeVerticalScrollRange() ComputeVerticalScrollRange()
CreateAccessibilityNodeInfo() CreateAccessibilityNodeInfo()

Returns an AccessibilityNodeInfo representing this view from the point of view of an AccessibilityService.

CreateContextMenu(IContextMenu) CreateContextMenu(IContextMenu)

Show the context menu for this view.

DestroyDrawingCache() DestroyDrawingCache()
DispatchApplyWindowInsets(WindowInsets) DispatchApplyWindowInsets(WindowInsets)

Request to apply the given window insets to this view or another view in its subtree.

DispatchCapturedPointerEvent(MotionEvent) DispatchCapturedPointerEvent(MotionEvent)
DispatchConfigurationChanged(Configuration) DispatchConfigurationChanged(Configuration)

Dispatch a notification about a resource configuration change down the view hierarchy.

DispatchDisplayHint(ViewStates) DispatchDisplayHint(ViewStates)

Dispatch a hint about whether this view is displayed.

DispatchDragEvent(DragEvent) DispatchDragEvent(DragEvent)

Detects if this View is enabled and has a drag event listener.

DispatchDraw(Canvas) DispatchDraw(Canvas)

Called by draw to draw the child views.

DispatchDrawableHotspotChanged(Single, Single) DispatchDrawableHotspotChanged(Single, Single)
DispatchFinishTemporaryDetach() DispatchFinishTemporaryDetach()
DispatchGenericFocusedEvent(MotionEvent) DispatchGenericFocusedEvent(MotionEvent)

Dispatch a generic motion event to the currently focused view.

DispatchGenericMotionEvent(MotionEvent) DispatchGenericMotionEvent(MotionEvent)

Dispatch a generic motion event.

DispatchGenericPointerEvent(MotionEvent) DispatchGenericPointerEvent(MotionEvent)

Dispatch a generic motion event to the view under the first pointer.

DispatchHoverEvent(MotionEvent) DispatchHoverEvent(MotionEvent)

Dispatch a hover event.

DispatchKeyEvent(KeyEvent) DispatchKeyEvent(KeyEvent)

Dispatch a key event to the next view on the focus path.

DispatchKeyEventPreIme(KeyEvent) DispatchKeyEventPreIme(KeyEvent)

Dispatch a key event before it is processed by any input method associated with the view hierarchy.

DispatchKeyShortcutEvent(KeyEvent) DispatchKeyShortcutEvent(KeyEvent)

Dispatches a key shortcut event.

DispatchNestedFling(Single, Single, Boolean) DispatchNestedFling(Single, Single, Boolean)

Dispatch a fling to a nested scrolling parent.

DispatchNestedPreFling(Single, Single) DispatchNestedPreFling(Single, Single)

Dispatch a fling to a nested scrolling parent before it is processed by this view.

DispatchNestedPrePerformAccessibilityAction(Action, Bundle) DispatchNestedPrePerformAccessibilityAction(Action, Bundle)
DispatchNestedPreScroll(Int32, Int32, Int32[], Int32[]) DispatchNestedPreScroll(Int32, Int32, Int32[], Int32[])

Dispatch one step of a nested scroll in progress before this view consumes any portion of it.

DispatchNestedScroll(Int32, Int32, Int32, Int32, Int32[]) DispatchNestedScroll(Int32, Int32, Int32, Int32, Int32[])

Dispatch one step of a nested scroll in progress.

DispatchPointerCaptureChanged(Boolean) DispatchPointerCaptureChanged(Boolean)
DispatchPopulateAccessibilityEvent(AccessibilityEvent) DispatchPopulateAccessibilityEvent(AccessibilityEvent)

Dispatches an AccessibilityEvent to the View first and then to its children for adding their text content to the event.

DispatchProvideAutofillStructure(ViewStructure, AutofillFlags) DispatchProvideAutofillStructure(ViewStructure, AutofillFlags)
DispatchProvideStructure(ViewStructure) DispatchProvideStructure(ViewStructure)
DispatchRestoreInstanceState(SparseArray) DispatchRestoreInstanceState(SparseArray)
DispatchSaveInstanceState(SparseArray) DispatchSaveInstanceState(SparseArray)
DispatchSetActivated(Boolean) DispatchSetActivated(Boolean)

Dispatch setActivated to all of this View's children.

DispatchSetPressed(Boolean) DispatchSetPressed(Boolean)

Dispatch setPressed to all of this View's children.

DispatchSetSelected(Boolean) DispatchSetSelected(Boolean)

Dispatch setSelected to all of this View's children.

DispatchStartTemporaryDetach() DispatchStartTemporaryDetach()
DispatchSystemUiVisibilityChanged(Int32) DispatchSystemUiVisibilityChanged(Int32)
DispatchSystemUiVisibilityChanged(SystemUiFlags) DispatchSystemUiVisibilityChanged(SystemUiFlags)

Dispatch callbacks to SetOnSystemUiVisibilityChangeListener(View+IOnSystemUiVisibilityChangeListener) down the view hierarchy.

DispatchTouchEvent(MotionEvent) DispatchTouchEvent(MotionEvent)

Pass the touch screen motion event down to the target view, or this view if it is the target.

DispatchTrackballEvent(MotionEvent) DispatchTrackballEvent(MotionEvent)

Pass a trackball motion event down to the focused view.

DispatchUnhandledMove(View, FocusSearchDirection) DispatchUnhandledMove(View, FocusSearchDirection)

This method is the last chance for the focused view and its ancestors to respond to an arrow key.

DispatchVisibilityChanged(View, ViewStates) DispatchVisibilityChanged(View, ViewStates)

Dispatch a view visibility change down the view hierarchy.

DispatchWindowFocusChanged(Boolean) DispatchWindowFocusChanged(Boolean)

Called when the window containing this view gains or loses window focus.

DispatchWindowSystemUiVisiblityChanged(SystemUiFlags) DispatchWindowSystemUiVisiblityChanged(SystemUiFlags)

Dispatch callbacks to OnWindowSystemUiVisibilityChanged(SystemUiFlags) down the view hierarchy.

DispatchWindowVisibilityChanged(ViewStates) DispatchWindowVisibilityChanged(ViewStates)

Dispatch a window visibility change down the view hierarchy.

Dispose() Dispose() Inherited from Object
Dispose(Boolean) Dispose(Boolean) Inherited from Object
Draw(Canvas) Draw(Canvas)

Manually render this view (and all of its children) to the given Canvas.

DrawableHotspotChanged(Single, Single) DrawableHotspotChanged(Single, Single)

This function is called whenever the view hotspot changes and needs to be propagated to drawables or child views managed by the view.

DrawableStateChanged() DrawableStateChanged()

This function is called whenever the state of the view changes in such a way that it impacts the state of drawables being shown.

Equals(Object) Equals(Object)

Compares this instance with the specified object and indicates if they are equal.

(Inherited from Object)
FindFocus() FindFocus()

Find the view in the hierarchy rooted at this view that currently has focus.

FindViewById(Int32) FindViewById(Int32)

Look for a child view with the given id.

FindViewById<T>(Int32) FindViewById<T>(Int32)
FindViewsWithText(IList<View>, ICharSequence, FindViewsWith) FindViewsWithText(IList<View>, ICharSequence, FindViewsWith)
FindViewsWithText(IList<View>, String, FindViewsWith) FindViewsWithText(IList<View>, String, FindViewsWith)
FindViewWithTag(Object) FindViewWithTag(Object)

Look for a child view with the given tag.

FitSystemWindows(Rect) FitSystemWindows(Rect)

Called by the view hierarchy when the content insets for a window have changed, to allow it to adjust its content to fit within those windows.

FocusSearch(FocusSearchDirection) FocusSearch(FocusSearchDirection)

Find the nearest view in the specified direction that can take focus.

ForceHasOverlappingRendering(Boolean) ForceHasOverlappingRendering(Boolean)
ForceLayout() ForceLayout()

Forces this view to be laid out during the next layout pass.

GenerateViewId() GenerateViewId()

Generate a value suitable for use in Id.

GetAutofillHints() GetAutofillHints()
GetClipBounds(Rect) GetClipBounds(Rect)
GetDefaultSize(Int32, Int32) GetDefaultSize(Int32, Int32)

Utility to return a default size.

GetDrawableState() GetDrawableState()

Return an array of resource IDs of the drawable states representing the current state of the view.

GetDrawingCache(Boolean) GetDrawingCache(Boolean)
GetDrawingRect(Rect) GetDrawingRect(Rect)

Return the visible drawing bounds of your view.

GetFocusable() GetFocusable()
GetFocusables(FocusSearchDirection) GetFocusables(FocusSearchDirection)

Find and return all focusable views that are descendants of this view, possibly including this view if it is focusable itself.

GetFocusedRect(Rect) GetFocusedRect(Rect)

When a view has focus and the user navigates away from it, the next view is searched for starting from the rectangle filled in by this method.

GetGlobalVisibleRect(Rect) GetGlobalVisibleRect(Rect)
GetGlobalVisibleRect(Rect, Point) GetGlobalVisibleRect(Rect, Point)

If some part of this view is not clipped by any of its parents, then return that area in r in global (root) coordinates.

GetHashCode() GetHashCode()

Returns an integer hash code for this object.

(Inherited from Object)
GetHasOverlappingRendering() GetHasOverlappingRendering()
GetHitRect(Rect) GetHitRect(Rect)

Hit rectangle in parent's coordinates

GetLocalVisibleRect(Rect) GetLocalVisibleRect(Rect)
GetLocationInWindow(Int32[]) GetLocationInWindow(Int32[])
GetLocationOnScreen(Int32[]) GetLocationOnScreen(Int32[])
GetTag(Int32) GetTag(Int32)

Returns the tag associated with this view and the specified key.

GetWindowVisibleDisplayFrame(Rect) GetWindowVisibleDisplayFrame(Rect)

Retrieve the overall visible display size in which the window this view is attached to has been positioned in.

GetX() GetX()

The visual x position of this view, in pixels.

GetY() GetY()

The visual y position of this view, in pixels.

GetZ() GetZ()

The visual z position of this view, in pixels.

Inflate(Context, Int32, ViewGroup) Inflate(Context, Int32, ViewGroup)

Inflate a view from an XML resource.

InitializeFadingEdge(TypedArray) InitializeFadingEdge(TypedArray)
InitializeScrollbars(TypedArray) InitializeScrollbars(TypedArray)
Invalidate() Invalidate()

Invalidate the whole view.

Invalidate(Int32, Int32, Int32, Int32) Invalidate(Int32, Int32, Int32, Int32)

Mark the area defined by the rect (l,t,r,b) as needing to be drawn.

Invalidate(Rect) Invalidate(Rect)

Mark the area defined by dirty as needing to be drawn.

InvalidateDrawable(Drawable) InvalidateDrawable(Drawable)

Invalidates the specified Drawable.

InvalidateOutline() InvalidateOutline()

Called to rebuild this View's Outline from its ViewOutlineProvider

InvokeFitsSystemWindows() InvokeFitsSystemWindows()
JavaFinalize() JavaFinalize()

Invoked when the garbage collector has detected that this instance is no longer reachable.

(Inherited from Object)
JumpDrawablesToCurrentState() JumpDrawablesToCurrentState()

Call JumpToCurrentState() on all Drawable objects associated with this view.

KeyboardNavigationClusterSearch(View, FocusSearchDirection) KeyboardNavigationClusterSearch(View, FocusSearchDirection)
Layout(Int32, Int32, Int32, Int32) Layout(Int32, Int32, Int32, Int32)

Assign a size and position to a view and all of its descendants

Measure(Int32, Int32) Measure(Int32, Int32)
MergeDrawableStates(Int32[], Int32[]) MergeDrawableStates(Int32[], Int32[])

Merge your own state values in additionalState into the base state values baseState that were returned by OnCreateDrawableState(Int32).

Notify() Notify()

Causes a thread which is waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
NotifyAll() NotifyAll()

Causes all threads which are waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
OffsetLeftAndRight(Int32) OffsetLeftAndRight(Int32)

Offset this view's horizontal location by the specified amount of pixels.

OffsetTopAndBottom(Int32) OffsetTopAndBottom(Int32)

Offset this view's vertical location by the specified number of pixels.

OnAnimationEnd() OnAnimationEnd()

Invoked by a parent ViewGroup to notify the end of the animation currently associated with this view.

OnAnimationStart() OnAnimationStart()

Invoked by a parent ViewGroup to notify the start of the animation currently associated with this view.

OnApplyWindowInsets(WindowInsets) OnApplyWindowInsets(WindowInsets)

Called when the view should apply WindowInsets according to its internal policy.

OnAttachedToWindow() OnAttachedToWindow()

This is called when the view is attached to a window.

OnCancelPendingInputEvents() OnCancelPendingInputEvents()

Called as the result of a call to CancelPendingInputEvents() on this view or a parent view.

OnCapturedPointerEvent(MotionEvent) OnCapturedPointerEvent(MotionEvent)
OnCheckIsTextEditor() OnCheckIsTextEditor()

Check whether the called view is a text editor, in which case it would make sense to automatically display a soft input window for it.

OnConfigurationChanged(Configuration) OnConfigurationChanged(Configuration)

Called when the current configuration of the resources being used by the application have changed.

OnCreateContextMenu(IContextMenu) OnCreateContextMenu(IContextMenu)

Views should implement this if the view itself is going to add items to the context menu.

OnCreateDrawableState(Int32) OnCreateDrawableState(Int32)

Generate the new Drawable state for this view.

OnCreateInputConnection(EditorInfo) OnCreateInputConnection(EditorInfo)

Create a new InputConnection for an InputMethod to interact with the view.

OnDetachedFromWindow() OnDetachedFromWindow()

This is called when the view is detached from a window.

OnDisplayHint(Int32) OnDisplayHint(Int32)

Gives this view a hint about whether is displayed or not.

OnDragEvent(DragEvent) OnDragEvent(DragEvent)

Handles drag events sent by the system following a call to StartDrag(ClipData, View+DragShadowBuilder, Object, Int32).

OnDraw(Canvas) OnDraw(Canvas)

Implement this to do your drawing.

OnDrawForeground(Canvas) OnDrawForeground(Canvas)
OnDrawScrollBars(Canvas) OnDrawScrollBars(Canvas)
OnFilterTouchEventForSecurity(MotionEvent) OnFilterTouchEventForSecurity(MotionEvent)

Filter the touch event to apply security policies.

OnFinishInflate() OnFinishInflate()

Finalize inflating a view from XML.

OnFinishTemporaryDetach() OnFinishTemporaryDetach()

Called after OnStartTemporaryDetach() when the container is done changing the view.

OnFocusChanged(Boolean, FocusSearchDirection, Rect) OnFocusChanged(Boolean, FocusSearchDirection, Rect)

Called by the view system when the focus state of this view changes.

OnGenericMotionEvent(MotionEvent) OnGenericMotionEvent(MotionEvent)

Implement this method to handle generic motion events.

OnHoverChanged(Boolean) OnHoverChanged(Boolean)

Implement this method to handle hover state changes.

OnHoverEvent(MotionEvent) OnHoverEvent(MotionEvent)

Implement this method to handle hover events.

OnInitializeAccessibilityEvent(AccessibilityEvent) OnInitializeAccessibilityEvent(AccessibilityEvent)

Initializes an AccessibilityEvent with information about this View which is the event source.

OnInitializeAccessibilityNodeInfo(AccessibilityNodeInfo) OnInitializeAccessibilityNodeInfo(AccessibilityNodeInfo)

Initializes an AccessibilityNodeInfo with information about this view.

OnKeyDown(Keycode, KeyEvent) OnKeyDown(Keycode, KeyEvent)

Default implementation of OnKeyDown(Keycode, KeyEvent): perform press of the view when DpadCenter or Enter is released, if the view is enabled and clickable.

OnKeyLongPress(Keycode, KeyEvent) OnKeyLongPress(Keycode, KeyEvent)

Default implementation of OnKeyLongPress(Keycode, KeyEvent): always returns false (doesn't handle the event).

OnKeyMultiple(Keycode, Int32, KeyEvent) OnKeyMultiple(Keycode, Int32, KeyEvent)

Default implementation of OnKeyMultiple(Keycode, Int32, KeyEvent): always returns false (doesn't handle the event).

OnKeyPreIme(Keycode, KeyEvent) OnKeyPreIme(Keycode, KeyEvent)

Handle a key event before it is processed by any input method associated with the view hierarchy.

OnKeyShortcut(Keycode, KeyEvent) OnKeyShortcut(Keycode, KeyEvent)

Called on the focused view when a key shortcut event is not handled.

OnKeyUp(Keycode, KeyEvent) OnKeyUp(Keycode, KeyEvent)

Default implementation of OnKeyUp(Keycode, KeyEvent): perform clicking of the view when DpadCenter or Enter is released.

OnLayout(Boolean, Int32, Int32, Int32, Int32) OnLayout(Boolean, Int32, Int32, Int32, Int32)

Called from layout when this view should assign a size and position to each of its children.

OnMeasure(Int32, Int32) OnMeasure(Int32, Int32)
OnOverScrolled(Int32, Int32, Boolean, Boolean) OnOverScrolled(Int32, Int32, Boolean, Boolean)

Called by OverScrollBy(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Boolean) to respond to the results of an over-scroll operation.

OnPointerCaptureChange(Boolean) OnPointerCaptureChange(Boolean)
OnPopulateAccessibilityEvent(AccessibilityEvent) OnPopulateAccessibilityEvent(AccessibilityEvent)

Called from DispatchPopulateAccessibilityEvent(AccessibilityEvent) giving a chance to this View to populate the accessibility event with its text content.

OnProvideAutofillStructure(ViewStructure, AutofillFlags) OnProvideAutofillStructure(ViewStructure, AutofillFlags)
OnProvideAutofillVirtualStructure(ViewStructure, AutofillFlags) OnProvideAutofillVirtualStructure(ViewStructure, AutofillFlags)
OnProvideStructure(ViewStructure) OnProvideStructure(ViewStructure)
OnProvideVirtualStructure(ViewStructure) OnProvideVirtualStructure(ViewStructure)
OnResolvePointerIcon(MotionEvent, Int32) OnResolvePointerIcon(MotionEvent, Int32)
OnRestoreInstanceState(IParcelable) OnRestoreInstanceState(IParcelable)

Hook allowing a view to re-apply a representation of its internal state that had previously been generated by OnSaveInstanceState().

OnRtlPropertiesChanged(LayoutDirection) OnRtlPropertiesChanged(LayoutDirection)

Called when any RTL property (layout direction or text direction or text alignment) has been changed.

OnSaveInstanceState() OnSaveInstanceState()

Hook allowing a view to generate a representation of its internal state that can later be used to create a new instance with that same state.

OnScreenStateChanged(ScreenState) OnScreenStateChanged(ScreenState)

This method is called whenever the state of the screen this view is attached to changes.

OnScrollChanged(Int32, Int32, Int32, Int32) OnScrollChanged(Int32, Int32, Int32, Int32)

This is called in response to an internal scroll in this view (i.e., the view scrolled its own contents).

OnSetAlpha(Int32) OnSetAlpha(Int32)

Invoked if there is a Transform that involves alpha.

OnSizeChanged(Int32, Int32, Int32, Int32) OnSizeChanged(Int32, Int32, Int32, Int32)

This is called during layout when the size of this view has changed.

OnStartTemporaryDetach() OnStartTemporaryDetach()

This is called when a container is going to temporarily detach a child, with DetachViewFromParent(View).

OnTouchEvent(MotionEvent) OnTouchEvent(MotionEvent)

Implement this method to handle touch screen motion events.

OnTrackballEvent(MotionEvent) OnTrackballEvent(MotionEvent)

Implement this method to handle trackball motion events.

OnVisibilityAggregated(Boolean) OnVisibilityAggregated(Boolean)
OnVisibilityChanged(View, ViewStates) OnVisibilityChanged(View, ViewStates)

Called when the visibility of the view or an ancestor of the view has changed.

OnWindowFocusChanged(Boolean) OnWindowFocusChanged(Boolean)

Called when the window containing this view gains or loses focus.

OnWindowSystemUiVisibilityChanged(SystemUiFlags) OnWindowSystemUiVisibilityChanged(SystemUiFlags)

Override to find out when the window's requested system UI visibility has changed, that is the value returned by WindowSystemUiVisibility.

OnWindowVisibilityChanged(ViewStates) OnWindowVisibilityChanged(ViewStates)

Called when the window containing has change its visibility (between Gone, Invisible, and Visible).

OverScrollBy(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Boolean) OverScrollBy(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Boolean)

Scroll the view with standard behavior for scrolling beyond the normal content boundaries.

PerformAccessibilityAction(Action, Bundle) PerformAccessibilityAction(Action, Bundle)
PerformAccessibilityAction(GlobalAction, Bundle) PerformAccessibilityAction(GlobalAction, Bundle)

Performs the specified accessibility action on the view.

PerformClick() PerformClick()

Call this view's OnClickListener, if it is defined.

PerformContextClick() PerformContextClick()
PerformContextClick(Single, Single) PerformContextClick(Single, Single)
PerformHapticFeedback(FeedbackConstants) PerformHapticFeedback(FeedbackConstants)

BZZZTT!!1!

PerformHapticFeedback(FeedbackConstants, FeedbackFlags) PerformHapticFeedback(FeedbackConstants, FeedbackFlags)

BZZZTT!!1!

PerformLongClick() PerformLongClick()

Call this view's OnLongClickListener, if it is defined.

PerformLongClick(Single, Single) PerformLongClick(Single, Single)
PlaySoundEffect(SoundEffects) PlaySoundEffect(SoundEffects)

Play a sound effect for this view.

Post(Action) Post(Action)
Post(IRunnable) Post(IRunnable)
PostDelayed(Action, Int64) PostDelayed(Action, Int64)
PostDelayed(IRunnable, Int64) PostDelayed(IRunnable, Int64)
PostInvalidate() PostInvalidate()
PostInvalidate(Int32, Int32, Int32, Int32) PostInvalidate(Int32, Int32, Int32, Int32)
PostInvalidateDelayed(Int64) PostInvalidateDelayed(Int64)
PostInvalidateDelayed(Int64, Int32, Int32, Int32, Int32) PostInvalidateDelayed(Int64, Int32, Int32, Int32, Int32)
PostInvalidateOnAnimation() PostInvalidateOnAnimation()
PostInvalidateOnAnimation(Int32, Int32, Int32, Int32) PostInvalidateOnAnimation(Int32, Int32, Int32, Int32)
PostOnAnimation(IRunnable) PostOnAnimation(IRunnable)
PostOnAnimationDelayed(IRunnable, Int64) PostOnAnimationDelayed(IRunnable, Int64)
RefreshDrawableState() RefreshDrawableState()

Call this to force a view to update its drawable state.

ReleasePointerCapture() ReleasePointerCapture()
RemoveCallbacks(Action) RemoveCallbacks(Action)
RemoveCallbacks(IRunnable) RemoveCallbacks(IRunnable)
RemoveOnAttachStateChangeListener(View+IOnAttachStateChangeListener) RemoveOnAttachStateChangeListener(View+IOnAttachStateChangeListener)

Remove a listener for attach state changes.

RemoveOnLayoutChangeListener(View+IOnLayoutChangeListener) RemoveOnLayoutChangeListener(View+IOnLayoutChangeListener)

Remove a listener for layout changes.

RequestApplyInsets() RequestApplyInsets()

Ask that a new dispatch of OnApplyWindowInsets(WindowInsets) be performed.

RequestFitSystemWindows() RequestFitSystemWindows()

Ask that a new dispatch of FitSystemWindows(Rect) be performed.

RequestFocus() RequestFocus()

Call this to try to give focus to a specific view or to one of its descendants.

RequestFocus(FocusSearchDirection) RequestFocus(FocusSearchDirection)

Call this to try to give focus to a specific view or to one of its descendants and give it a hint about what direction focus is heading.

RequestFocus(FocusSearchDirection, Rect) RequestFocus(FocusSearchDirection, Rect)

Call this to try to give focus to a specific view or to one of its descendants and give it hints about the direction and a specific rectangle that the focus is coming from.

RequestFocusFromTouch() RequestFocusFromTouch()

Call this to try to give focus to a specific view or to one of its descendants.

RequestLayout() RequestLayout()

Call this when something has changed which has invalidated the layout of this view.

RequestPointerCapture() RequestPointerCapture()
RequestRectangleOnScreen(Rect) RequestRectangleOnScreen(Rect)

Request that a rectangle of this view be visible on the screen, scrolling if necessary just enough.

RequestRectangleOnScreen(Rect, Boolean) RequestRectangleOnScreen(Rect, Boolean)

Request that a rectangle of this view be visible on the screen, scrolling if necessary just enough.

RequestUnbufferedDispatch(MotionEvent) RequestUnbufferedDispatch(MotionEvent)

Request unbuffered dispatch of the given stream of MotionEvents to this View.

ResolveSize(Int32, Int32) ResolveSize(Int32, Int32)

Version of ResolveSizeAndState(Int32, Int32, Int32) returning only the MeasuredSizeMask bits of the result.

ResolveSizeAndState(Int32, Int32, Int32) ResolveSizeAndState(Int32, Int32, Int32)

Utility to reconcile a desired size and state, with constraints imposed by a MeasureSpec.

RestoreDefaultFocus() RestoreDefaultFocus()
RestoreHierarchyState(SparseArray) RestoreHierarchyState(SparseArray)
SaveHierarchyState(SparseArray) SaveHierarchyState(SparseArray)
ScheduleDrawable(Drawable, Action, Int64) ScheduleDrawable(Drawable, Action, Int64)
ScheduleDrawable(Drawable, IRunnable, Int64) ScheduleDrawable(Drawable, IRunnable, Int64)

Schedules an action on a drawable to occur at a specified time.

ScrollBy(Int32, Int32) ScrollBy(Int32, Int32)

Move the scrolled position of your view.

ScrollTo(Int32, Int32) ScrollTo(Int32, Int32)

Set the scrolled position of your view.

SendAccessibilityEvent(EventTypes) SendAccessibilityEvent(EventTypes)

Sends an accessibility event of the given type.

SendAccessibilityEventUnchecked(AccessibilityEvent) SendAccessibilityEventUnchecked(AccessibilityEvent)

This method behaves exactly as SendAccessibilityEvent(EventTypes) but takes as an argument an empty AccessibilityEvent and does not perform a check whether accessibility is enabled.

SetAccessibilityDelegate(View+AccessibilityDelegate) SetAccessibilityDelegate(View+AccessibilityDelegate)

Sets a delegate for implementing accessibility support via composition as opposed to inheritance.

SetAutofillHints(String[]) SetAutofillHints(String[])
SetBackgroundColor(Color) SetBackgroundColor(Color)

Sets the background color for this view.

SetBackgroundDrawable(Drawable) SetBackgroundDrawable(Drawable)
SetBackgroundResource(Int32) SetBackgroundResource(Int32)

Set the background to a given resource.

SetCameraDistance(Single) SetCameraDistance(Single)
SetFadingEdgeLength(Int32) SetFadingEdgeLength(Int32)

Set the size of the faded edge used to indicate that more content in this view is available.

SetFitsSystemWindows(Boolean) SetFitsSystemWindows(Boolean)
SetFocusable(ViewFocusability) SetFocusable(ViewFocusability)
SetForegroundGravity(GravityFlags) SetForegroundGravity(GravityFlags)
SetHandle(IntPtr, JniHandleOwnership) SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SetLayerPaint(Paint) SetLayerPaint(Paint)

Updates the Paint object used with the current layer (used only if the current layer type is not set to None).

SetLayerType(LayerType, Paint) SetLayerType(LayerType, Paint)
SetMeasuredDimension(Int32, Int32) SetMeasuredDimension(Int32, Int32)
SetMinimumHeight(Int32) SetMinimumHeight(Int32)

Sets the minimum height of the view.

SetMinimumWidth(Int32) SetMinimumWidth(Int32)

Sets the minimum width of the view.

SetOnApplyWindowInsetsListener(View+IOnApplyWindowInsetsListener) SetOnApplyWindowInsetsListener(View+IOnApplyWindowInsetsListener)

Set an SetOnApplyWindowInsetsListener(View+IOnApplyWindowInsetsListener) to take over the policy for applying window insets to this view.

SetOnCapturedPointerListener(View+IOnCapturedPointerListener) SetOnCapturedPointerListener(View+IOnCapturedPointerListener)
SetOnClickListener(View+IOnClickListener) SetOnClickListener(View+IOnClickListener)

Register a callback to be invoked when this view is clicked.

SetOnContextClickListener(View+IOnContextClickListener) SetOnContextClickListener(View+IOnContextClickListener)
SetOnCreateContextMenuListener(View+IOnCreateContextMenuListener) SetOnCreateContextMenuListener(View+IOnCreateContextMenuListener)

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

SetOnDragListener(View+IOnDragListener) SetOnDragListener(View+IOnDragListener)

Register a drag event listener callback object for this View.

SetOnGenericMotionListener(View+IOnGenericMotionListener) SetOnGenericMotionListener(View+IOnGenericMotionListener)

Register a callback to be invoked when a generic motion event is sent to this view.

SetOnHoverListener(View+IOnHoverListener) SetOnHoverListener(View+IOnHoverListener)

Register a callback to be invoked when a hover event is sent to this view.

SetOnKeyListener(View+IOnKeyListener) SetOnKeyListener(View+IOnKeyListener)

Register a callback to be invoked when a hardware key is pressed in this view.

SetOnLongClickListener(View+IOnLongClickListener) SetOnLongClickListener(View+IOnLongClickListener)

Register a callback to be invoked when this view is clicked and held.

SetOnScrollChangeListener(View+IOnScrollChangeListener) SetOnScrollChangeListener(View+IOnScrollChangeListener)
SetOnSystemUiVisibilityChangeListener(View+IOnSystemUiVisibilityChangeListener) SetOnSystemUiVisibilityChangeListener(View+IOnSystemUiVisibilityChangeListener)

Set a listener to receive callbacks when the visibility of the system bar changes.

SetOnTouchListener(View+IOnTouchListener) SetOnTouchListener(View+IOnTouchListener)

Register a callback to be invoked when a touch event is sent to this view.

SetPadding(Int32, Int32, Int32, Int32) SetPadding(Int32, Int32, Int32, Int32)

Sets the padding.

SetPaddingRelative(Int32, Int32, Int32, Int32) SetPaddingRelative(Int32, Int32, Int32, Int32)

Sets the relative padding.

SetScrollContainer(Boolean) SetScrollContainer(Boolean)

Change whether this view is one of the set of scrollable containers in its window.

SetScrollIndicators(Int32) SetScrollIndicators(Int32)
SetScrollIndicators(Int32, Int32) SetScrollIndicators(Int32, Int32)
SetTag(Int32, Object) SetTag(Int32, Object)

Sets a tag associated with this view and a key.

SetWillNotCacheDrawing(Boolean) SetWillNotCacheDrawing(Boolean)

When a View's drawing cache is enabled, drawing is redirected to an offscreen bitmap.

SetWillNotDraw(Boolean) SetWillNotDraw(Boolean)

If this view doesn't do any drawing on its own, set this flag to allow further optimizations.

SetX(Single) SetX(Single)

Sets the visual x position of this view, in pixels.

SetY(Single) SetY(Single)

Sets the visual y position of this view, in pixels.

SetZ(Single) SetZ(Single)

Sets the visual z position of this view, in pixels.

ShowContextMenu() ShowContextMenu()

Bring up the context menu for this view.

ShowContextMenu(Single, Single) ShowContextMenu(Single, Single)
StartActionMode(ActionMode+ICallback) StartActionMode(ActionMode+ICallback)

Start an action mode with the default type Primary.

StartActionMode(ActionMode+ICallback, ActionModeType) StartActionMode(ActionMode+ICallback, ActionModeType)
StartAnimation(Animation) StartAnimation(Animation)

Start the specified animation now.

StartDrag(ClipData, View+DragShadowBuilder, Object, Int32) StartDrag(ClipData, View+DragShadowBuilder, Object, Int32)

Starts a drag and drop operation.

StartDragAndDrop(ClipData, View+DragShadowBuilder, Object, Int32) StartDragAndDrop(ClipData, View+DragShadowBuilder, Object, Int32)
StartNestedScroll(ScrollAxis) StartNestedScroll(ScrollAxis)

Begin a nestable scroll operation along the given axes.

StopNestedScroll() StopNestedScroll()

Stop a nested scroll in progress.

ToArray<T>() ToArray<T>() Inherited from Object
ToString() ToString()

Returns a string containing a concise, human-readable description of this object.

(Inherited from Object)
UnregisterFromRuntime() UnregisterFromRuntime() Inherited from Object
UnscheduleDrawable(Drawable) UnscheduleDrawable(Drawable)

Unschedule any events associated with the given Drawable.

UnscheduleDrawable(Drawable, Action) UnscheduleDrawable(Drawable, Action)
UnscheduleDrawable(Drawable, IRunnable) UnscheduleDrawable(Drawable, IRunnable)

Cancels a scheduled action on a drawable.

UpdateDragShadow(View+DragShadowBuilder) UpdateDragShadow(View+DragShadowBuilder)
VerifyDrawable(Drawable) VerifyDrawable(Drawable)

If your view subclass is displaying its own Drawable objects, it should override this function and return true for any Drawable it is displaying.

Wait() Wait()

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.

(Inherited from Object)
Wait(Int64) Wait(Int64)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)
Wait(Int64, Int32) Wait(Int64, Int32)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)
WillNotCacheDrawing() WillNotCacheDrawing()

Returns whether or not this View can cache its drawing or not.

WillNotDraw() WillNotDraw()

Returns whether or not this View draws on its own.

Events

CapturedPointer CapturedPointer
Click Click
ContextClick ContextClick
ContextMenuCreated ContextMenuCreated
Drag Drag
FocusChange FocusChange
GenericMotion GenericMotion
Hover Hover
KeyPress KeyPress
LayoutChange LayoutChange
LongClick LongClick
ScrollChange ScrollChange
SystemUiVisibilityChange SystemUiVisibilityChange
Touch Touch
ViewAttachedToWindow ViewAttachedToWindow
ViewDetachedFromWindow ViewDetachedFromWindow

Explicit Interface Implementations

IJavaObjectEx.ToLocalJniHandle() IJavaObjectEx.ToLocalJniHandle() Inherited from Object
IJavaPeerable.Disposed() IJavaPeerable.Disposed() Inherited from Object
IJavaPeerable.DisposeUnlessReferenced() IJavaPeerable.DisposeUnlessReferenced() Inherited from Object
IJavaPeerable.Finalized() IJavaPeerable.Finalized() Inherited from Object
IJavaPeerable.SetJniIdentityHashCode(Int32) IJavaPeerable.SetJniIdentityHashCode(Int32) Inherited from Object
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) Inherited from Object
IJavaPeerable.SetPeerReference(JniObjectReference) IJavaPeerable.SetPeerReference(JniObjectReference) Inherited from Object

Extension Methods

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable) GetJniTypeName(IJavaPeerable)

Applies to