public abstract class DisplayManagerCompat extends Object
DisplayManager
introduced after API level 4 in a backwards compatible fashion.Modifier and Type | Field and Description |
---|---|
static String |
DISPLAY_CATEGORY_PRESENTATION
Display category: Presentation displays.
|
Modifier and Type | Method and Description |
---|---|
abstract Display |
getDisplay(int displayId)
Gets information about a logical display.
|
abstract Display[] |
getDisplays()
Gets all currently valid logical displays.
|
abstract Display[] |
getDisplays(String category)
Gets all currently valid logical displays of the specified category.
|
static DisplayManagerCompat |
getInstance(Context context)
Gets an instance of the display manager given the context.
|
public static final String DISPLAY_CATEGORY_PRESENTATION
This category can be used to identify secondary displays that are suitable for use as presentation displays.
public static DisplayManagerCompat getInstance(Context context)
public abstract Display getDisplay(int displayId)
displayId
- The logical display id.public abstract Display[] getDisplays()
public abstract Display[] getDisplays(String category)
When there are multiple displays in a category the returned displays are sorted
of preference. For example, if the requested category is
DISPLAY_CATEGORY_PRESENTATION
and there are multiple presentation displays
then the displays are sorted so that the first display in the returned array
is the most preferred presentation display. The application may simply
use the first display or allow the user to choose.
category
- The requested display category or null to return all displays.DISPLAY_CATEGORY_PRESENTATION