Class FlutterMutatorView

java.lang.Object
android.view.View
android.view.ViewGroup
android.widget.FrameLayout
io.flutter.embedding.engine.mutatorsstack.FlutterMutatorView
All Implemented Interfaces:
Drawable.Callback, AccessibilityEventSource, KeyEvent.Callback, ViewManager, ViewParent

public class FlutterMutatorView extends FrameLayout
A view that applies the FlutterMutatorsStack to its children.
  • Constructor Details

    • FlutterMutatorView

      public FlutterMutatorView(@NonNull Context context, float screenDensity, @Nullable AndroidTouchProcessor androidTouchProcessor)
      Initialize the FlutterMutatorView. Use this to set the screenDensity, which will be used to correct the final transform matrix.
    • FlutterMutatorView

      public FlutterMutatorView(@NonNull Context context)
      Initialize the FlutterMutatorView.
  • Method Details

    • setOnDescendantFocusChangeListener

      public void setOnDescendantFocusChangeListener(@NonNull View.OnFocusChangeListener userFocusListener)
      Sets a focus change listener that notifies when the current view or any of its descendant views have received focus.

      If there's an active focus listener, it will first remove the current listener, and then add the new one.

      Parameters:
      userFocusListener - A user provided focus listener.
    • unsetOnDescendantFocusChangeListener

      public void unsetOnDescendantFocusChangeListener()
      Unsets any active focus listener.
    • readyToDisplay

      public void readyToDisplay(@NonNull FlutterMutatorsStack mutatorsStack, int left, int top, int width, int height)
      Pass the necessary parameters to the view so it can apply correct mutations to its children.
    • draw

      public void draw(Canvas canvas)
      Overrides:
      draw in class View
    • dispatchDraw

      public void dispatchDraw(Canvas canvas)
      Overrides:
      dispatchDraw in class ViewGroup
    • onInterceptTouchEvent

      public boolean onInterceptTouchEvent(MotionEvent event)
      Intercept the events here and do not propagate them to the child platform views.
      Overrides:
      onInterceptTouchEvent in class ViewGroup
    • requestSendAccessibilityEvent

      public boolean requestSendAccessibilityEvent(View child, AccessibilityEvent event)
      Specified by:
      requestSendAccessibilityEvent in interface ViewParent
      Overrides:
      requestSendAccessibilityEvent in class ViewGroup
    • onTouchEvent

      public boolean onTouchEvent(MotionEvent event)
      Overrides:
      onTouchEvent in class View