Package io.flutter.plugin.platform

# Class PlatformViewsControllerDelegator

java.lang.Object
io.flutter.plugin.platform.PlatformViewsControllerDelegator

All Implemented Interfaces:
  `PlatformViewsChannel.PlatformViewsHandler`, `PlatformViewsAccessibilityDelegate`

public class PlatformViewsControllerDelegator extends Object implements PlatformViewsAccessibilityDelegate, PlatformViewsChannel.PlatformViewsHandler

- ## Field Summary

  ### Fields inherited from interface io.flutter.embedding.engine.systemchannels.PlatformViewsChannel.PlatformViewsHandler

  `NON_TEXTURE_FALLBACK`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PlatformViewsControllerDelegator(PlatformViewsController platformViewsController, PlatformViewsController2 platformViewsController2)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `attach(Context context, TextureRegistry textureRegistry, DartExecutor dartExecutor)`
  `void`
  `attachAccessibilityBridge(AccessibilityBridge accessibilityBridge)`
  Attaches an accessibility bridge for this platform views accessibility delegate.
  `void`
  `clearFocus(int viewId)`
  Clears the focus from the platform view with a give id if it is currently focused.
  `void`
  `createForPlatformViewLayer(PlatformViewCreationRequest request)`
  The Flutter application would like to display a new Android `View`, i.e., platform view.
  `long`
  `createForTextureLayer(PlatformViewCreationRequest request)`
  The Flutter application would like to display a new Android `View`, i.e., platform view.
  `void`
  `createPlatformViewHcpp(PlatformViewCreationRequest request)`
  `void`
  `detachAccessibilityBridge()`
  Detaches the current accessibility bridge.
  `void`
  `dispose(int viewId)`
  The Flutter application would like to dispose of an existing Android `View`.
  `View`
  `getPlatformViewById(int viewId)`
  Returns the root of the view hierarchy for the platform view with the requested id, or null if there is no corresponding view.
  `boolean`
  `isHcppEnabled()`
  Returns true if creation of HC++ platform views is currently supported.
  `void`
  `offset(int viewId, double top, double left)`
  The Flutter application would like to change the offset of an existing Android `View`.
  `void`
  `onTouch(PlatformViewTouch touch)`
  The user touched a platform view within Flutter.
  `void`
  `resize(PlatformViewsChannel.PlatformViewResizeRequest request, PlatformViewsChannel.PlatformViewBufferResized onComplete)`
  The Flutter application would like to resize an existing Android `View`.
  `void`
  `setDirection(int viewId, int direction)`
  The Flutter application would like to change the layout direction of an existing Android `View`, i.e., platform view.
  `void`
  `synchronizeToNativeViewHierarchy(boolean yes)`
  Whether the render surface of `FlutterView` should be converted to a `FlutterImageView` when a `PlatformView` is added.
  `boolean`
  `usesVirtualDisplay(int id)`
  Returns true if the platform view uses virtual displays.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### PlatformViewsControllerDelegator

    public PlatformViewsControllerDelegator(PlatformViewsController platformViewsController, PlatformViewsController2 platformViewsController2)

- ## Method Details

  - ### getPlatformViewById

    @Nullable public View getPlatformViewById(int viewId)
    Description copied from interface: `PlatformViewsAccessibilityDelegate`
    Returns the root of the view hierarchy for the platform view with the requested id, or null if there is no corresponding view.
    Specified by:
      `getPlatformViewById` in interface `PlatformViewsAccessibilityDelegate`

  - ### usesVirtualDisplay

    public boolean usesVirtualDisplay(int id)
    Description copied from interface: `PlatformViewsAccessibilityDelegate`
    Returns true if the platform view uses virtual displays.
    Specified by:
      `usesVirtualDisplay` in interface `PlatformViewsAccessibilityDelegate`

  - ### attachAccessibilityBridge

    public void attachAccessibilityBridge(@NonNull AccessibilityBridge accessibilityBridge)
    Description copied from interface: `PlatformViewsAccessibilityDelegate`
    Attaches an accessibility bridge for this platform views accessibility delegate.

    Accessibility events originating in platform views belonging to this delegate will be delegated to this accessibility bridge.

    Specified by:
      `attachAccessibilityBridge` in interface `PlatformViewsAccessibilityDelegate`

  - ### detachAccessibilityBridge

    public void detachAccessibilityBridge()
    Description copied from interface: `PlatformViewsAccessibilityDelegate`
    Detaches the current accessibility bridge.

    Any accessibility events sent by platform views belonging to this delegate will be ignored until a new accessibility bridge is attached.

    Specified by:
      `detachAccessibilityBridge` in interface `PlatformViewsAccessibilityDelegate`

  - ### dispose

    public void dispose(int viewId)
    Description copied from interface: `PlatformViewsChannel.PlatformViewsHandler`
    The Flutter application would like to dispose of an existing Android `View`.
    Specified by:
      `dispose` in interface `PlatformViewsChannel.PlatformViewsHandler`

  - ### resize

    public void resize(@NonNull PlatformViewsChannel.PlatformViewResizeRequest request, @NonNull PlatformViewsChannel.PlatformViewBufferResized onComplete)
    Description copied from interface: `PlatformViewsChannel.PlatformViewsHandler`
    The Flutter application would like to resize an existing Android `View`.
    Specified by:
      `resize` in interface `PlatformViewsChannel.PlatformViewsHandler`
    Parameters:
      `request` - The request to resize the platform view.
      `onComplete` - Once the resize is completed, this is the handler to notify the size of the platform view buffer.

  - ### offset

    public void offset(int viewId, double top, double left)
    Description copied from interface: `PlatformViewsChannel.PlatformViewsHandler`
    The Flutter application would like to change the offset of an existing Android `View`.
    Specified by:
      `offset` in interface `PlatformViewsChannel.PlatformViewsHandler`

  - ### onTouch

    public void onTouch(@NonNull PlatformViewTouch touch)
    Description copied from interface: `PlatformViewsChannel.PlatformViewsHandler`
    The user touched a platform view within Flutter.

    Touch data is reported in `touch`.

    Specified by:
      `onTouch` in interface `PlatformViewsChannel.PlatformViewsHandler`

  - ### setDirection

    public void setDirection(int viewId, int direction)
    Description copied from interface: `PlatformViewsChannel.PlatformViewsHandler`
    The Flutter application would like to change the layout direction of an existing Android `View`, i.e., platform view.
    Specified by:
      `setDirection` in interface `PlatformViewsChannel.PlatformViewsHandler`

  - ### clearFocus

    public void clearFocus(int viewId)
    Description copied from interface: `PlatformViewsChannel.PlatformViewsHandler`
    Clears the focus from the platform view with a give id if it is currently focused.
    Specified by:
      `clearFocus` in interface `PlatformViewsChannel.PlatformViewsHandler`

  - ### synchronizeToNativeViewHierarchy

    public void synchronizeToNativeViewHierarchy(boolean yes)
    Description copied from interface: `PlatformViewsChannel.PlatformViewsHandler`
    Whether the render surface of `FlutterView` should be converted to a `FlutterImageView` when a `PlatformView` is added.

    This is done to syncronize the rendering of the PlatformView and the FlutterView. Defaults to true.

    Specified by:
      `synchronizeToNativeViewHierarchy` in interface `PlatformViewsChannel.PlatformViewsHandler`

  - ### isHcppEnabled

    public boolean isHcppEnabled()
    Returns true if creation of HC++ platform views is currently supported.
    Specified by:
      `isHcppEnabled` in interface `PlatformViewsChannel.PlatformViewsHandler`

  - ### createForPlatformViewLayer

    public void createForPlatformViewLayer(@NonNull PlatformViewCreationRequest request)
    Description copied from interface: `PlatformViewsChannel.PlatformViewsHandler`
    The Flutter application would like to display a new Android `View`, i.e., platform view.

    The Android View is added to the view hierarchy. This view is rendered in the Flutter framework by a PlatformViewLayer.

    Specified by:
      `createForPlatformViewLayer` in interface `PlatformViewsChannel.PlatformViewsHandler`
    Parameters:
      `request` - The metadata sent from the framework.

  - ### createForTextureLayer

    public long createForTextureLayer(@NonNull PlatformViewCreationRequest request)
    Description copied from interface: `PlatformViewsChannel.PlatformViewsHandler`
    The Flutter application would like to display a new Android `View`, i.e., platform view.

    The Android View is added to the view hierarchy. This view is rendered in the Flutter framework by a TextureLayer.

    Specified by:
      `createForTextureLayer` in interface `PlatformViewsChannel.PlatformViewsHandler`
    Parameters:
      `request` - The metadata sent from the framework.
    Returns:
      The texture ID.

  - ### createPlatformViewHcpp

    public void createPlatformViewHcpp(@NonNull PlatformViewCreationRequest request)
    Specified by:
      `createPlatformViewHcpp` in interface `PlatformViewsChannel.PlatformViewsHandler`

  - ### attach

    public void attach(@Nullable Context context, @NonNull TextureRegistry textureRegistry, @NonNull DartExecutor dartExecutor)