mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-15 23:03:58 +08:00
Remove ReactRootView's MeasureSpec assertion
Reviewed By: AaaChiuuu Differential Revision: D3854737 fbshipit-source-id: d72975e49875049ed4411258e9a449b394ca7ece
This commit is contained in:
committed by
Facebook Github Bot 0
parent
6f75591620
commit
df83f05737
@@ -80,16 +80,6 @@ public class ReactRootView extends SizeMonitoringFrameLayout implements RootView
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
int widthMode = MeasureSpec.getMode(widthMeasureSpec);
|
||||
int heightMode = MeasureSpec.getMode(heightMeasureSpec);
|
||||
|
||||
if (widthMode == MeasureSpec.UNSPECIFIED || heightMode == MeasureSpec.UNSPECIFIED) {
|
||||
throw new IllegalStateException(
|
||||
"The root catalyst view must have a width and height given to it by it's parent view. " +
|
||||
"You can do this by specifying MATCH_PARENT or explicit width and height in the " +
|
||||
"layout. widthMode=" + widthMode + ", heightMode=" + heightMode);
|
||||
}
|
||||
|
||||
setMeasuredDimension(
|
||||
MeasureSpec.getSize(widthMeasureSpec),
|
||||
MeasureSpec.getSize(heightMeasureSpec));
|
||||
|
||||
Reference in New Issue
Block a user