RN: Android Constants for Overflow Style

Summary:
Tidies up the hardcoded strings for referencing the `overflow` style values.

Also, the `OVERFLOW` case in the optimized view flattening code path is unnecessary because `OVERFLOW` is already in the `LAYOUT_ONLY_PROPS` set.

Reviewed By: achen1

Differential Revision: D8690804

fbshipit-source-id: 3befbe93ed761e57e45f9b50e59bffc8a29a407f
This commit is contained in:
Tim Yung
2018-06-29 12:07:00 -07:00
committed by Facebook Github Bot
parent f090840f45
commit cfce6ee9d7
2 changed files with 6 additions and 4 deletions

View File

@@ -37,6 +37,7 @@ import com.facebook.react.uimanager.ReactZIndexedViewGroup;
import com.facebook.react.uimanager.RootView;
import com.facebook.react.uimanager.RootViewUtil;
import com.facebook.react.uimanager.ViewGroupDrawingOrderHelper;
import com.facebook.react.uimanager.ViewProps;
import com.facebook.yoga.YogaConstants;
import javax.annotation.Nullable;
@@ -682,12 +683,12 @@ public class ReactViewGroup extends ViewGroup implements
private void dispatchOverflowDraw(Canvas canvas) {
if (mOverflow != null) {
switch (mOverflow) {
case "visible":
case ViewProps.VISIBLE:
if (mPath != null) {
mPath.rewind();
}
break;
case "hidden":
case ViewProps.HIDDEN:
if (mReactBackgroundDrawable != null) {
float left = 0f;
float top = 0f;