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
ConstructorsConstructorDescriptionPlatformViewsControllerDelegator(PlatformViewsController platformViewsController, PlatformViewsController2 platformViewsController2) -
Method Summary
Modifier and TypeMethodDescriptionvoidattach(Context context, TextureRegistry textureRegistry, DartExecutor dartExecutor) voidattachAccessibilityBridge(AccessibilityBridge accessibilityBridge) Attaches an accessibility bridge for this platform views accessibility delegate.voidclearFocus(int viewId) Clears the focus from the platform view with a give id if it is currently focused.voidThe Flutter application would like to display a new AndroidView, i.e., platform view.longThe Flutter application would like to display a new AndroidView, i.e., platform view.voidvoidDetaches the current accessibility bridge.voiddispose(int viewId) The Flutter application would like to dispose of an existing AndroidView.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.booleanReturns true if creation of HC++ platform views is currently supported.voidoffset(int viewId, double top, double left) The Flutter application would like to change the offset of an existing AndroidView.voidonTouch(PlatformViewTouch touch) The user touched a platform view within Flutter.voidresize(PlatformViewsChannel.PlatformViewResizeRequest request, PlatformViewsChannel.PlatformViewBufferResized onComplete) The Flutter application would like to resize an existing AndroidView.voidsetDirection(int viewId, int direction) The Flutter application would like to change the layout direction of an existing AndroidView, i.e., platform view.voidsynchronizeToNativeViewHierarchy(boolean yes) Whether the render surface ofFlutterViewshould be converted to aFlutterImageViewwhen aPlatformViewis added.booleanusesVirtualDisplay(int id) Returns true if the platform view uses virtual displays.
-
Constructor Details
-
PlatformViewsControllerDelegator
public PlatformViewsControllerDelegator(PlatformViewsController platformViewsController, PlatformViewsController2 platformViewsController2)
-
-
Method Details
-
getPlatformViewById
Description copied from interface:PlatformViewsAccessibilityDelegateReturns the root of the view hierarchy for the platform view with the requested id, or null if there is no corresponding view.- Specified by:
getPlatformViewByIdin interfacePlatformViewsAccessibilityDelegate
-
usesVirtualDisplay
public boolean usesVirtualDisplay(int id) Description copied from interface:PlatformViewsAccessibilityDelegateReturns true if the platform view uses virtual displays.- Specified by:
usesVirtualDisplayin interfacePlatformViewsAccessibilityDelegate
-
attachAccessibilityBridge
Description copied from interface:PlatformViewsAccessibilityDelegateAttaches 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:
attachAccessibilityBridgein interfacePlatformViewsAccessibilityDelegate
-
detachAccessibilityBridge
public void detachAccessibilityBridge()Description copied from interface:PlatformViewsAccessibilityDelegateDetaches 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:
detachAccessibilityBridgein interfacePlatformViewsAccessibilityDelegate
-
dispose
public void dispose(int viewId) Description copied from interface:PlatformViewsChannel.PlatformViewsHandlerThe Flutter application would like to dispose of an existing AndroidView.- Specified by:
disposein interfacePlatformViewsChannel.PlatformViewsHandler
-
resize
public void resize(@NonNull PlatformViewsChannel.PlatformViewResizeRequest request, @NonNull PlatformViewsChannel.PlatformViewBufferResized onComplete) Description copied from interface:PlatformViewsChannel.PlatformViewsHandlerThe Flutter application would like to resize an existing AndroidView.- Specified by:
resizein interfacePlatformViewsChannel.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.PlatformViewsHandlerThe Flutter application would like to change the offset of an existing AndroidView.- Specified by:
offsetin interfacePlatformViewsChannel.PlatformViewsHandler
-
onTouch
Description copied from interface:PlatformViewsChannel.PlatformViewsHandlerThe user touched a platform view within Flutter.Touch data is reported in
touch.- Specified by:
onTouchin interfacePlatformViewsChannel.PlatformViewsHandler
-
setDirection
public void setDirection(int viewId, int direction) Description copied from interface:PlatformViewsChannel.PlatformViewsHandlerThe Flutter application would like to change the layout direction of an existing AndroidView, i.e., platform view.- Specified by:
setDirectionin interfacePlatformViewsChannel.PlatformViewsHandler
-
clearFocus
public void clearFocus(int viewId) Description copied from interface:PlatformViewsChannel.PlatformViewsHandlerClears the focus from the platform view with a give id if it is currently focused.- Specified by:
clearFocusin interfacePlatformViewsChannel.PlatformViewsHandler
-
synchronizeToNativeViewHierarchy
public void synchronizeToNativeViewHierarchy(boolean yes) Description copied from interface:PlatformViewsChannel.PlatformViewsHandlerWhether the render surface ofFlutterViewshould be converted to aFlutterImageViewwhen aPlatformViewis added.This is done to syncronize the rendering of the PlatformView and the FlutterView. Defaults to true.
- Specified by:
synchronizeToNativeViewHierarchyin interfacePlatformViewsChannel.PlatformViewsHandler
-
isHcppEnabled
public boolean isHcppEnabled()Returns true if creation of HC++ platform views is currently supported.- Specified by:
isHcppEnabledin interfacePlatformViewsChannel.PlatformViewsHandler
-
createForPlatformViewLayer
Description copied from interface:PlatformViewsChannel.PlatformViewsHandlerThe Flutter application would like to display a new AndroidView, 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:
createForPlatformViewLayerin interfacePlatformViewsChannel.PlatformViewsHandler- Parameters:
request- The metadata sent from the framework.
-
createForTextureLayer
Description copied from interface:PlatformViewsChannel.PlatformViewsHandlerThe Flutter application would like to display a new AndroidView, 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:
createForTextureLayerin interfacePlatformViewsChannel.PlatformViewsHandler- Parameters:
request- The metadata sent from the framework.- Returns:
- The texture ID.
-
createPlatformViewHcpp
- Specified by:
createPlatformViewHcppin interfacePlatformViewsChannel.PlatformViewsHandler
-
attach
public void attach(@Nullable Context context, @NonNull TextureRegistry textureRegistry, @NonNull DartExecutor dartExecutor)
-