Files
react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactRoot.java
T
David Vacca f0b6f8441b Expose SurfaceID as part ReactRootView
Summary:
This diff exposes the surfaceID as part of ReactRootView.

Changelog: [internal]

Reviewed By: JoshuaGross

Differential Revision: D18474014

fbshipit-source-id: 98f651b211d3cc4df88c6b1eb257bc12129eff57
2019-11-15 17:28:12 -08:00

61 lines
1.6 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 androidx.annotation.Nullable;
import com.facebook.react.uimanager.common.UIManagerType;
/** 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();
String getJSModuleName();
/** 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();
/** @return Cached values for widthMeasureSpec and heightMeasureSpec */
int getWidthMeasureSpec();
int getHeightMeasureSpec();
/** Sets a flag that determines whether to log that content appeared on next view added. */
void setShouldLogContentAppeared(boolean shouldLogContentAppeared);
/**
* @return a {@link String} that represents the root js application that is being rendered with
* this {@link ReactRoot}
* @deprecated We recommend to not use this method as it is will be replaced in the near future.
*/
@Deprecated
@Nullable
String getSurfaceID();
}