DisplayFeature
public
final
class
DisplayFeature
extends Object
| java.lang.Object | |
| ↳ | androidx.window.DisplayFeature |
Description of a physical feature on the display.
A display feature is a distinctive physical attribute located within the display panel of the device. It can intrude into the application window space and create a visual distortion, visual or touch discontinuity, make some area invisible or create a logical divider or separation in the screen space.
See also:
Summary
Nested classes | |
|---|---|
class |
DisplayFeature.Builder
Builder for |
Constants | |
|---|---|
int |
TYPE_FOLD
A fold in the flexible screen without a physical gap. |
int |
TYPE_HINGE
A physical separation with a hinge that allows two display panels to fold. |
Public methods | |
|---|---|
Rect
|
getBounds()
Get bounding rectangle of the physical display feature in the coordinate space of the window. |
int
|
getType()
Get type of the physical display feature. |
String
|
toString()
|
Inherited methods | |
|---|---|
Constants
TYPE_FOLD
public static final int TYPE_FOLD
A fold in the flexible screen without a physical gap.
Constant Value: 1 (0x00000001)
TYPE_HINGE
public static final int TYPE_HINGE
A physical separation with a hinge that allows two display panels to fold.
Constant Value: 2 (0x00000002)
Public methods
getBounds
public Rect getBounds ()
Get bounding rectangle of the physical display feature in the coordinate space of the window. The rectangle provides information about the location of the feature in the window and its size.
| Returns | |
|---|---|
Rect |
|
getType
public int getType ()
Get type of the physical display feature.
| Returns | |
|---|---|
int |
|
toString
public String toString ()
| Returns | |
|---|---|
String |
|
Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-02-27.