API reference
API reference
Select your platform
No SDKs available
No versions available

PanelDisplay Class

Modifiers: open
Handles displaying content on panels. Supports two display methods:
  • Using VirtualDisplay with Presentation for custom views
  • Launching an Activity via an intent to populate the panel

Signature

open class PanelDisplay(ctx: <Error class: unknown class>, val panelSurface: PanelSurface, surfaceDPI: Int, getView: (<Error class: unknown class>) -> <Error class: unknown class>? = null, intent: <Error class: unknown class>? = null, themeResourceId: Int = 0, onAutoReleased: () -> Unit? = null)

Constructors

PanelDisplay ( ctx , panelSurface , surfaceDPI , getView , intent , themeResourceId , onAutoReleased )
Signature
constructor(ctx: Context, panelSurface: PanelSurface, surfaceDPI: Int, getView: (<Error class: unknown class>) -> <Error class: unknown class>? = null, intent: Intent? = null, themeResourceId: Int = 0, onAutoReleased: () -> Unit? = null)
Parameters
ctx: Context
The context in which the display operates.
panelSurface: PanelSurface
The surface on which the panel is displayed.
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.

Properties

heightInPx : Int
[Get]
Signature
val heightInPx: Int
panelSurface : PanelSurface
[Get]
The surface on which the panel is displayed.
Signature
val panelSurface: PanelSurface
rootView : View?
[Get]
Signature
var rootView: View?
widthInPx : Int
[Get]
Signature
val widthInPx: Int

Functions

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
Did you find this page helpful?