GLCanvasManager.java 994 Bytes
Newer Older
Gaëtan Renaudeau's avatar
Gaëtan Renaudeau committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
package com.projectseptember.RNGL;

import java.util.Arrays;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import com.facebook.react.ReactPackage;
import com.facebook.react.bridge.NativeModule;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.uimanager.ViewManager;
import com.facebook.react.bridge.JavaScriptModule;

public class GLCanvasManager extends SimpleViewManager<GLCanvasView> {

  public static final String REACT_CLASS = "GLCanvas";

  // TODO... props

  @Override
  public String getName() {
    return REACT_CLASS;
  }

  @Override
  public GLCanvasView createViewInstance(ThemedReactContext context) {
    return new GLCanvasView(context, Fresco.newDraweeControllerBuilder(), mCallerContext);
  }

  @Override
  public void updateView(final ReactImageView view, final CatalystStylesDiffMap props) {
    super.updateView(view, props);
    // TODO... call setters with props
    view.maybeUpdateView();
  }
}