mirror of
https://github.com/react/react-native.git
synced 2026-10-05 19:31:56 +08:00
Summary: Remove dependency on ReactRootView in ReactInstanceManager by creating a rough interface (ReactRoot) so that either a Surface or ReactRootView can be attached to ReactInstanceManager. Reviewed By: ejanzer, mdvacca Differential Revision: D14158890 fbshipit-source-id: b7ab4654b1e0ef8343230a3c15023653a7f23a4b
51 lines
1.1 KiB
Java
51 lines
1.1 KiB
Java
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
package com.facebook.react.uimanager;
|
|
|
|
import android.os.Bundle;
|
|
import android.view.ViewGroup;
|
|
import com.facebook.react.uimanager.common.UIManagerType;
|
|
import javax.annotation.Nullable;
|
|
|
|
|
|
/**
|
|
* Interface for the root native view of a React native application
|
|
*/
|
|
public interface ReactRoot {
|
|
|
|
/**
|
|
* Return cached launch properties for app
|
|
*/
|
|
@Nullable Bundle getAppProperties();
|
|
@Nullable String getInitialUITemplate();
|
|
|
|
/**
|
|
* Fabric or Default UI Manager, see {@link UIManagerType}
|
|
*/
|
|
@UIManagerType int getUIManagerType();
|
|
|
|
int getRootViewTag();
|
|
|
|
void setRootViewTag(int rootViewTag);
|
|
|
|
/**
|
|
* Calls into JS to start the React application.
|
|
*/
|
|
void runApplication();
|
|
|
|
/**
|
|
* Handler for stages {@link com.facebook.react.surface.ReactStage}
|
|
*/
|
|
void onStage(int stage);
|
|
|
|
/**
|
|
* Return native view for root
|
|
*/
|
|
ViewGroup getRootViewGroup();
|
|
}
|