PanelDisplayBase
(
ctx
, panelSurface
, surfaceDPI
, getView
, intent
, themeResourceId
, onAutoReleased
, initializeInfra
)
| Parameters ctx: Context
The context in which the display operates.
surfaceDPI: Int
The DPI of the surface.
getView: Function1?
A lambda function to get the view to be displayed, if any.
intent: Intent?
The intent used to start an activity, if applicable.
themeResourceId: Int
The resource ID for the theme to be applied to the presentation.
onAutoReleased: Function0?
A callback function to be invoked when Activity panels are auto-released.
initializeInfra: BooleanReturns PanelDisplayBase |
heightInPx
: Int
[Get] |
Signature
var heightInPx: Int |
panelSurface
: PanelSurface
[Get][Set] |
The surface on which the panel is displayed.
Signature
var panelSurface: PanelSurface |
presentation
: Presentation?
[Get] |
Signature
var presentation: Presentation |
rootView
: View?
[Get] |
Signature
var rootView: View |
surfaceDPI
: Int
[Get][Set] |
The DPI of the surface.
Signature
var surfaceDPI: Int |
widthInPx
: Int
[Get] |
Signature
var widthInPx: Int |
destroy
()
|
Signature
open fun destroy() |
dispatchEvent
(
motionEvent
, isGenericEvent
)
|
Dispatches input events to the appropriate target
Signature
open fun dispatchEvent(motionEvent: MotionEvent, isGenericEvent: Boolean) Parameters motionEvent: MotionEvent
The motion event to dispatch
isGenericEvent: Boolean
Whether this is a generic motion event (hover) or touch event
|
getComponentName
()
|
Returns the top Activity's ComponentName for this panel display, if available.
For Activity-based panels using TaskContainer: Returns the ComponentName of the top Activity if available.
For View-based panels: Returns null as they don't use Activities.
Signature
open fun getComponentName(): android.content.ComponentName? Returns android.content.ComponentName?
The ComponentName of the top Activity if available, null otherwise
|
resize
(
newPanelSurface
, newWidthInPx
, newHeightInPx
, dpi
)
|
Resizes the display to the specified dimensions in pixels. This will update the task container and virtual display with the new surface.
Signature
open fun resize(newPanelSurface: PanelSurface, newWidthInPx: Int, newHeightInPx: Int, dpi: Int) Parameters newPanelSurface: PanelSurfacenewWidthInPx: Int
The new width in pixels
newHeightInPx: Int
The new height in pixels
dpi: Int
The DPI for the new surface
|
resolveInput
()
|
Blocks until all pending async input dispatches have completed. Relies on the fact that single-thread executor is a FIFO queue.
Signature
fun resolveInput() |