Defines the next view to give focus to when the next focus is
View.FOCUS_DOWN
If the reference refers to a view that does not exist or is part
of a hierarchy that is invisible, a RuntimeException
will result when the reference is accessed.

Defines the next view to give focus to when the next focus is
View.FOCUS_FORWARD
If the reference refers to a view that does not exist or is part
of a hierarchy that is invisible, a RuntimeException
will result when the reference is accessed.

Defines the next view to give focus to when the next focus is
View.FOCUS_RIGHT
If the reference refers to a view that does not exist or is part
of a hierarchy that is invisible, a RuntimeException
will result when the reference is accessed.

Defines the next view to give focus to when the next focus is
View.FOCUS_UP
If the reference refers to a view that does not exist or is part
of a hierarchy that is invisible, a RuntimeException
will result when the reference is accessed.

Autofill type for a field that contains a date, which is represented by a long representing
the number of milliseconds since the standard base time known as "the epoch", namely
January 1, 1970, 00:00:00 GMT (see Date.getTime().

This constant was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, setLayerType(int, Paint) handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a Canvas from either a Bitmap or
Picture and call draw(Canvas) on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as Config.HARDWARE
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the PixelCopy API is recommended.

This constant was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, setLayerType(int, Paint) handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a Canvas from either a Bitmap or
Picture and call draw(Canvas) on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as Config.HARDWARE
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the PixelCopy API is recommended.

This constant was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, setLayerType(int, Paint) handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a Canvas from either a Bitmap or
Picture and call draw(Canvas) on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as Config.HARDWARE
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the PixelCopy API is recommended.

Flag for setSystemUiVisibility(int): 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.

This method was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, setLayerType(int, Paint) handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a Canvas from either a Bitmap or
Picture and call draw(Canvas) on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as Config.HARDWARE
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the PixelCopy API is recommended.

This method was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, setLayerType(int, Paint) handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a Canvas from either a Bitmap or
Picture and call draw(Canvas) on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as Config.HARDWARE
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the PixelCopy API is recommended.

This method was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, setLayerType(int, Paint) handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a Canvas from either a Bitmap or
Picture and call draw(Canvas) on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as Config.HARDWARE
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the PixelCopy API is recommended.

This method was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, setLayerType(int, Paint) handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a Canvas from either a Bitmap or
Picture and call draw(Canvas) on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as Config.HARDWARE
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the PixelCopy API is recommended.

This method was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, setLayerType(int, Paint) handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a Canvas from either a Bitmap or
Picture and call draw(Canvas) on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as Config.HARDWARE
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the PixelCopy API is recommended.

This method was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, setLayerType(int, Paint) handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a Canvas from either a Bitmap or
Picture and call draw(Canvas) on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as Config.HARDWARE
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the PixelCopy API is recommended.

This method was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, setLayerType(int, Paint) handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a Canvas from either a Bitmap or
Picture and call draw(Canvas) on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as Config.HARDWARE
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the PixelCopy API is recommended.

Indicates whether the view is currently tracking transient state that the
app should not need to concern itself with saving and restoring, but that
the framework should take special note to preserve when possible.

This method was deprecated
in API level 28.
The switch to hardware accelerated rendering in API 14 reduced
the importance of the dirty rectangle. In API 21 the given rectangle is
ignored entirely in favor of an internally-calculated area instead.
Because of this, clients are encouraged to just call invalidate().

This method was deprecated
in API level 28.
The switch to hardware accelerated rendering in API 14 reduced
the importance of the dirty rectangle. In API 21 the given rectangle is
ignored entirely in favor of an internally-calculated area instead.
Because of this, clients are encouraged to just call invalidate().

This method was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, setLayerType(int, Paint) handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a Canvas from either a Bitmap or
Picture and call draw(Canvas) on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as Config.HARDWARE
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the PixelCopy API is recommended.

This method was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, setLayerType(int, Paint) handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a Canvas from either a Bitmap or
Picture and call draw(Canvas) on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as Config.HARDWARE
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the PixelCopy API is recommended.

This method was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, setLayerType(int, Paint) handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a Canvas from either a Bitmap or
Picture and call draw(Canvas) on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as Config.HARDWARE
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the PixelCopy API is recommended.

This method was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, setLayerType(int, Paint) handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a Canvas from either a Bitmap or
Picture and call draw(Canvas) on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as Config.HARDWARE
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the PixelCopy API is recommended.

Sets whether or not this view should account for system screen decorations
such as the status bar and inset its content; that is, controlling whether
the default implementation of fitSystemWindows(Rect) will be
executed.

When screen readers (one type of accessibility tool) decide what should be read to the
user, they typically look for input focusable (isFocusable()) parents of
non-focusable text items, and read those focusable parents and their non-focusable children
as a unit.

This method was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, setLayerType(int, Paint) handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a Canvas from either a Bitmap or
Picture and call draw(Canvas) on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as Config.HARDWARE
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the PixelCopy API is recommended.

This method was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, setLayerType(int, Paint) handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a Canvas from either a Bitmap or
Picture and call draw(Canvas) on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as Config.HARDWARE
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the PixelCopy API is recommended.

Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.

android:baseline

The offset of the baseline within this view. See {see android.view.View#getBaseline}
for details

May be a dimension value, which is a floating point number appended with a
unit such as "14.5sp".
Available units are: px (pixels), dp (density-independent pixels),
sp (scaled pixels based on preferred font size), in (inches), and
mm (millimeters).

android:cropToPadding

android:maxHeight

An optional argument to supply a maximum height for this view.
See {see android.widget.ImageView#setMaxHeight} for details.

May be a dimension value, which is a floating point number appended with a
unit such as "14.5sp".
Available units are: px (pixels), dp (density-independent pixels),
sp (scaled pixels based on preferred font size), in (inches), and
mm (millimeters).

android:maxWidth

An optional argument to supply a maximum width for this view.
See {see android.widget.ImageView#setMaxWidth} for details.

May be a dimension value, which is a floating point number appended with a
unit such as "14.5sp".
Available units are: px (pixels), dp (density-independent pixels),
sp (scaled pixels based on preferred font size), in (inches), and
mm (millimeters).

android:scaleType

Controls how the image should be resized or moved to match the size
of this ImageView. See ImageView.ScaleType

Must be one of the following constant values.

Constant

Value

Description

center

5

Center the image in the view, but perform no scaling.

centerCrop

6

Scale the image uniformly (maintain the image's aspect ratio) so both dimensions
(width and height) of the image will be equal to or larger than the corresponding
dimension of the view (minus padding). The image is then centered in the view.

centerInside

7

Scale the image uniformly (maintain the image's aspect ratio) so that both
dimensions (width and height) of the image will be equal to or less than the
corresponding dimension of the view (minus padding). The image is then centered in
the view.

android:tint

The tinting color for the image. By default, the tint will blend using SRC_ATOP mode.
Please note that for compatibility reasons, this is NOT consistent with the default
SRC_IN tint mode used by ImageView.setImageTintList(ColorStateList) and by
similar tint attributes on other views.

May be a color value, in the form of "#rgb",
"#argb", "#rrggbb", or
"#aarrggbb".

getAccessibilityClassName

Return the class name of this object to be used for accessibility purposes.
Subclasses should only override this if they are implementing something that
should be seen as a completely new class of view when used by accessibility,
unrelated to the class it is deriving from. This is used to fill in
AccessibilityNodeInfo.setClassName.

getImageMatrix

Returns the view's optional matrix. This is applied to the
view's drawable when it is drawn. If there is no matrix,
this method will return an identity matrix.
Do not change this matrix in place but make a copy.
If you want a different matrix applied to the drawable,
be sure to call setImageMatrix().

hasOverlappingRendering

This function, intended to be overridden by specific View types, is an optimization when
alpha is set on a view. If rendering overlaps in a view with alpha < 1, that view is drawn to
an offscreen buffer and then composited into place, which can be expensive. If the view has
no overlapping rendering, the view can draw each primitive with the appropriate alpha value
directly. An example of overlapping rendering is a TextView with a background image, such as
a Button. An example of non-overlapping rendering is a TextView with no background, or an
ImageView with only the foreground image. The default implementation returns true; subclasses
should override if they have cases which can be optimized.

isOpaque

Indicates whether this View is opaque. An opaque View guarantees that it will
draw all the pixels overlapping its bounds using a fully opaque color.
Subclasses of View should override this method whenever possible to indicate
whether an instance is opaque. Opaque Views are treated in a special way by
the View hierarchy, possibly allowing it to perform optimizations during
invalidate/draw passes.

onCreateDrawableState

Generate the new Drawable state for
this view. This is called by the view
system when the cached Drawable state is determined to be invalid. To
retrieve the current state, you should use getDrawableState().

Parameters

extraSpace

int: if non-zero, this is the number of extra entries you
would like in the returned array in which you can place your own
states.

onRtlPropertiesChanged

Called when any RTL property (layout direction or text direction or text alignment) has
been changed.
Subclasses need to override this method to take care of cached information that depends on the
resolved layout direction, or to inform child views that inherit their layout direction.
The default implementation does nothing.

setAdjustViewBounds

Set this to true if you want the ImageView to adjust its bounds
to preserve the aspect ratio of its drawable.

Note: If the application targets API level 17 or lower,
adjustViewBounds will allow the drawable to shrink the view bounds, but not grow
to fill available measured space in all cases. This is for compatibility with
legacy MeasureSpec and
RelativeLayout behavior.

Note: The default tint mode used by this setter is NOT
consistent with the default tint mode used by the
android:tint
attribute. If the android:tint attribute is specified, the
default tint mode will be set to PorterDuff.Mode.SRC_ATOP to
ensure consistency with earlier versions of the platform.

On devices running SDK < 24, this method will fail to
apply correct density scaling to images loaded from
content and
file schemes. Applications running
on devices with SDK >= 24 MUST specify the
targetSdkVersion in their manifest as 24 or above for density
scaling to be applied to images loaded from these schemes.

Parameters

uri

Uri: the Uri of an image, or null to clear the content

setMaxHeight

An optional argument to supply a maximum height for this view. Only valid if
setAdjustViewBounds(boolean) has been set to true. To set an image to be a
maximum of 100 x 100 while preserving the original aspect ratio, do the following: 1) set
adjustViewBounds to true 2) set maxWidth and maxHeight to 100 3) set the height and width
layout params to WRAP_CONTENT.

Note that this view could be still smaller than 100 x 100 using this approach if the original
image is small. To set an image to a fixed size, specify that size in the layout params and
then use setScaleType(android.widget.ImageView.ScaleType) to determine how to fit
the image within the bounds.

setMaxWidth

An optional argument to supply a maximum width for this view. Only valid if
setAdjustViewBounds(boolean) has been set to true. To set an image to be a maximum
of 100 x 100 while preserving the original aspect ratio, do the following: 1) set
adjustViewBounds to true 2) set maxWidth and maxHeight to 100 3) set the height and width
layout params to WRAP_CONTENT.

Note that this view could be still smaller than 100 x 100 using this approach if the original
image is small. To set an image to a fixed size, specify that size in the layout params and
then use setScaleType(android.widget.ImageView.ScaleType) to determine how to fit
the image within the bounds.

setSelected

Changes the selection state of this view. A view can be selected or not.
Note that selection is not the same as focus. Views are typically
selected in the context of an AdapterView like ListView or GridView;
the selected view is the view that is highlighted.

onAttachedToWindow

This is called when the view is attached to a window. At this point it
has a Surface and will start drawing. Note that this function is
guaranteed to be called before onDraw(android.graphics.Canvas),
however it may be called any time before the first onDraw -- including
before or after onMeasure(int, int).

onMeasure

Measure the view and its content to determine the measured width and the
measured height. This method is invoked by measure(int, int) and
should be overridden by subclasses to provide accurate and efficient
measurement of their contents.

The base class implementation of measure defaults to the background size,
unless a larger size is allowed by the MeasureSpec. Subclasses should
override onMeasure(int, int) to provide better measurements of
their content.

verifyDrawable

If your view subclass is displaying its own Drawable objects, it should
override this function and return true for any Drawable it is
displaying. This allows animations for those drawables to be
scheduled.

Be sure to call through to the super class when overriding this
function.

Parameters

dr

Drawable: The Drawable to verify. Return true if it is one you are
displaying, else return the result of calling through to the
super class.

This value must never be null.

Returns

boolean

boolean If true than the Drawable is being displayed in the
view; else false and it is not allowed to animate.