SurfaceDelegate

interface SurfaceDelegate

Interface for handling a surface in React Native. In mobile platform a surface can be any container that holds some View. For example, a Dialog can be a surface to wrap content view object as needed. In VR platform, a surface is provided by Shell panel app sdk, which requires custom logic to show/hide. NativeModules requires a surface will delegate interactions with the surface to a SurfaceDelegate.

Functions

Link copied to clipboard
abstract fun createContentView(appKey: String)

Create the React content view that uses the appKey as the React application name

Link copied to clipboard
abstract fun destroyContentView()

Destroy the React content view to avoid memory leak

Link copied to clipboard
abstract fun hide()

Hide the surface containing the React content view

Link copied to clipboard
abstract fun isContentViewReady(): Boolean

Check if the content view is created and ready to be shown

Link copied to clipboard
abstract fun isShowing(): Boolean

Check if the surface is currently showing

Link copied to clipboard
abstract fun show()

Show the surface containing the React content view