diff --git a/Examples/UIExplorer/UIExplorerIntegrationTests/ReferenceImages/Examples-UIExplorer-UIExplorerApp.ios/testLayoutExample_1@2x.png b/Examples/UIExplorer/UIExplorerIntegrationTests/ReferenceImages/Examples-UIExplorer-UIExplorerApp.ios/testLayoutExample_1@2x.png index 6fbc66f4909fcc..2c6573453937f4 100644 Binary files a/Examples/UIExplorer/UIExplorerIntegrationTests/ReferenceImages/Examples-UIExplorer-UIExplorerApp.ios/testLayoutExample_1@2x.png and b/Examples/UIExplorer/UIExplorerIntegrationTests/ReferenceImages/Examples-UIExplorer-UIExplorerApp.ios/testLayoutExample_1@2x.png differ diff --git a/Examples/UIExplorer/UIExplorerIntegrationTests/ReferenceImages/Examples-UIExplorer-UIExplorerApp.ios/testSwitchExample_1@2x.png b/Examples/UIExplorer/UIExplorerIntegrationTests/ReferenceImages/Examples-UIExplorer-UIExplorerApp.ios/testSwitchExample_1@2x.png index 52410c48a0575c..3e7d79c7ff04a2 100644 Binary files a/Examples/UIExplorer/UIExplorerIntegrationTests/ReferenceImages/Examples-UIExplorer-UIExplorerApp.ios/testSwitchExample_1@2x.png and b/Examples/UIExplorer/UIExplorerIntegrationTests/ReferenceImages/Examples-UIExplorer-UIExplorerApp.ios/testSwitchExample_1@2x.png differ diff --git a/Examples/UIExplorer/UIExplorerIntegrationTests/ReferenceImages/Examples-UIExplorer-UIExplorerApp.ios/testTextExample_1@2x.png b/Examples/UIExplorer/UIExplorerIntegrationTests/ReferenceImages/Examples-UIExplorer-UIExplorerApp.ios/testTextExample_1@2x.png index 1e06671a524911..41970dbac17737 100644 Binary files a/Examples/UIExplorer/UIExplorerIntegrationTests/ReferenceImages/Examples-UIExplorer-UIExplorerApp.ios/testTextExample_1@2x.png and b/Examples/UIExplorer/UIExplorerIntegrationTests/ReferenceImages/Examples-UIExplorer-UIExplorerApp.ios/testTextExample_1@2x.png differ diff --git a/Examples/UIExplorer/UIExplorerIntegrationTests/ReferenceImages/Examples-UIExplorer-UIExplorerApp.ios/testViewExample_1@2x.png b/Examples/UIExplorer/UIExplorerIntegrationTests/ReferenceImages/Examples-UIExplorer-UIExplorerApp.ios/testViewExample_1@2x.png index 1800fe1e970d90..45bdb2631f1b63 100644 Binary files a/Examples/UIExplorer/UIExplorerIntegrationTests/ReferenceImages/Examples-UIExplorer-UIExplorerApp.ios/testViewExample_1@2x.png and b/Examples/UIExplorer/UIExplorerIntegrationTests/ReferenceImages/Examples-UIExplorer-UIExplorerApp.ios/testViewExample_1@2x.png differ diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java index 05faaa38455a8d..0bcefba5874fbc 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java @@ -5,7 +5,6 @@ import android.graphics.Color; import android.os.Build; import android.view.View; -import android.view.ViewGroup; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.annotations.ReactProp; @@ -28,7 +27,6 @@ public abstract class BaseViewManager= Build.VERSION_CODES.LOLLIPOP) { diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactZIndexView.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactZIndexView.java deleted file mode 100644 index 5d58d984f4578a..00000000000000 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactZIndexView.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.facebook.react.uimanager; - -/** - * Copyright (c) 2015-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -/** - * This interface describes a View that responds to the zIndex prop. - */ - -public interface ReactZIndexView { - void setZIndex(float targetZIndex); - - float getZIndex(); -} diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewGroupManager.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewGroupManager.java index df8a06bd35a3f3..7b72448abfb909 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewGroupManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewGroupManager.java @@ -12,10 +12,6 @@ import android.view.View; import android.view.ViewGroup; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; - /** * Class providing children management API for view managers of classes extending ViewGroup. */ @@ -38,38 +34,6 @@ public void updateExtraData(T root, Object extraData) { public void addView(T parent, View child, int index) { parent.addView(child, index); - reorderChildrenByZIndex(parent); - } - - public static void reorderChildrenByZIndex(ViewGroup view) { - // This gets called in a ReactZIndexView in setIndex with - // the view.getParent(). The view may not have been added - // to the window yet though, so the parent might be null - if (view == null) { - return; - } - - // Collect all the children that are ZIndexViews - ArrayList zIndexViewsToSort = new ArrayList(); - for (int i = 0; i < view.getChildCount(); i++) { - View sibling = view.getChildAt(i); - if (sibling instanceof ReactZIndexView) { - zIndexViewsToSort.add((ReactZIndexView)sibling); - } - } - // Sort the views by zindex - Collections.sort(zIndexViewsToSort, new Comparator() { - @Override - public int compare(ReactZIndexView view1, ReactZIndexView view2) { - return (int)view1.getZIndex() - (int)view2.getZIndex(); - } - }); - // Call .bringToFront on the sorted list of views - for (int i = 0; i < zIndexViewsToSort.size(); i++) { - View sortedView = (View)zIndexViewsToSort.get(i); - sortedView.bringToFront(); - } - view.invalidate(); } public int getChildCount(T parent) { diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageView.java b/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageView.java index bb22f7446882f2..7abab252a418c1 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageView.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageView.java @@ -54,7 +54,6 @@ import com.facebook.react.bridge.ReadableMap; import com.facebook.react.common.SystemClock; import com.facebook.react.uimanager.PixelUtil; -import com.facebook.react.uimanager.ReactZIndexView; import com.facebook.react.uimanager.UIManagerModule; import com.facebook.react.uimanager.events.EventDispatcher; @@ -62,7 +61,7 @@ * Wrapper class around Fresco's GenericDraweeView, enabling persisting props across multiple view * update and consistent processing of both static and network images. */ -public class ReactImageView extends GenericDraweeView implements ReactZIndexView { +public class ReactImageView extends GenericDraweeView { public static final int REMOTE_IMAGE_FADE_DURATION_MS = 300; @@ -160,7 +159,6 @@ public void process(Bitmap output, Bitmap source) { private final @Nullable Object mCallerContext; private int mFadeDurationMs = -1; private boolean mProgressiveRenderingEnabled; - private @Nullable float mZIndex; // We can't specify rounding in XML, so have to do so here private static GenericDraweeHierarchy buildHierarchy(Context context) { @@ -494,12 +492,4 @@ public void setZIndex(float zIndex) { public float getZIndex() { return mZIndex; } - - public void setZIndex(float zIndex) { - mZIndex = zIndex; - } - - public float getZIndex() { - return mZIndex; - } } diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/picker/ReactPicker.java b/ReactAndroid/src/main/java/com/facebook/react/views/picker/ReactPicker.java index 207d9a294287a7..2871cd21286bb1 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/picker/ReactPicker.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/picker/ReactPicker.java @@ -18,16 +18,14 @@ import android.widget.Spinner; import com.facebook.react.common.annotations.VisibleForTesting; -import com.facebook.react.uimanager.ReactZIndexView; -public class ReactPicker extends Spinner implements ReactZIndexView { +public class ReactPicker extends Spinner { private int mMode = MODE_DIALOG; private @Nullable Integer mPrimaryColor; private boolean mSuppressNextEvent; private @Nullable OnSelectListener mOnSelectListener; private @Nullable Integer mStagedSelection; - private @Nullable float mZIndex; /** * Listener interface for ReactPicker events. @@ -147,12 +145,4 @@ public void setPrimaryColor(@Nullable Integer primaryColor) { public int getMode() { return mMode; } - - public void setZIndex(float zIndex) { - mZIndex = zIndex; - } - - public float getZIndex() { - return mZIndex; - } } diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/progressbar/ProgressBarContainerView.java b/ReactAndroid/src/main/java/com/facebook/react/views/progressbar/ProgressBarContainerView.java index a1ffdd630c9f54..9e29777d243d04 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/progressbar/ProgressBarContainerView.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/progressbar/ProgressBarContainerView.java @@ -13,13 +13,12 @@ import android.widget.ProgressBar; import com.facebook.react.bridge.JSApplicationIllegalArgumentException; -import com.facebook.react.uimanager.ReactZIndexView; /** * Controls an enclosing ProgressBar. Exists so that the ProgressBar can be recreated if * the style would change. */ -/* package */ class ProgressBarContainerView extends FrameLayout implements ReactZIndexView { +/* package */ class ProgressBarContainerView extends FrameLayout { private static final int MAX_PROGRESS = 1000; private @Nullable Integer mColor; @@ -27,7 +26,6 @@ private boolean mAnimating = true; private double mProgress; private @Nullable ProgressBar mProgressBar; - private @Nullable float mZIndex; public ProgressBarContainerView(Context context) { super(context); @@ -94,12 +92,4 @@ private void setColor(ProgressBar progressBar) { drawable.clearColorFilter(); } } - - public void setZIndex(float zIndex) { - mZIndex = zIndex; - } - - public float getZIndex() { - return mZIndex; - } } diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java index 29db91da01be04..7b0926228cc404 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java @@ -22,7 +22,6 @@ import android.widget.ScrollView; import com.facebook.react.uimanager.MeasureSpecAssertions; -import com.facebook.react.uimanager.ReactZIndexView; import com.facebook.react.uimanager.events.NativeGestureUtil; import com.facebook.react.views.view.ReactClippingViewGroup; import com.facebook.react.views.view.ReactClippingViewGroupHelper; @@ -35,7 +34,7 @@ *

ReactScrollView only supports vertical scrolling. For horizontal scrolling, * use {@link ReactHorizontalScrollView}. */ -public class ReactScrollView extends ScrollView implements ReactClippingViewGroup, ReactZIndexView { +public class ReactScrollView extends ScrollView implements ReactClippingViewGroup { private final OnScrollDispatchHelper mOnScrollDispatchHelper = new OnScrollDispatchHelper(); @@ -50,7 +49,6 @@ public class ReactScrollView extends ScrollView implements ReactClippingViewGrou private @Nullable String mScrollPerfTag; private @Nullable Drawable mEndBackground; private int mEndFillColor = Color.TRANSPARENT; - private @Nullable float mZIndex; public ReactScrollView(Context context) { this(context, null); @@ -249,12 +247,4 @@ public void setEndFillColor(int color) { mEndBackground = new ColorDrawable(mEndFillColor); } } - - public void setZIndex(float zIndex) { - mZIndex = zIndex; - } - - public float getZIndex() { - return mZIndex; - } } diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/slider/ReactSlider.java b/ReactAndroid/src/main/java/com/facebook/react/views/slider/ReactSlider.java index c78def740e5a26..5c6710d2f72805 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/slider/ReactSlider.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/slider/ReactSlider.java @@ -13,8 +13,6 @@ import android.util.AttributeSet; import android.widget.SeekBar; -import com.facebook.react.uimanager.ReactZIndexView; - import javax.annotation.Nullable; /** @@ -27,12 +25,12 @@ * Note that the slider is _not_ a controlled component (setValue isn't called * during dragging). */ -public class ReactSlider extends SeekBar implements ReactZIndexView { +public class ReactSlider extends SeekBar { /** * If step is 0 (unset) we default to this total number of steps. * Don't use 100 which leads to rounding errors (0.200000000001). - */ + */ private static int DEFAULT_TOTAL_STEPS = 128; /** @@ -53,8 +51,6 @@ public class ReactSlider extends SeekBar implements ReactZIndexView { */ private double mStep = 0; - private @Nullable float mZIndex; - public ReactSlider(Context context, @Nullable AttributeSet attrs, int style) { super(context, attrs, style); } @@ -112,12 +108,4 @@ private void updateValue() { private int getTotalSteps() { return (int) Math.ceil((mMaxValue - mMinValue) / mStep); } - - public void setZIndex(float zIndex) { - mZIndex = zIndex; - } - - public float getZIndex() { - return mZIndex; - } } diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/switchview/ReactSwitch.java b/ReactAndroid/src/main/java/com/facebook/react/views/switchview/ReactSwitch.java index 499526f2870ea6..cfeee8f7c58627 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/switchview/ReactSwitch.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/switchview/ReactSwitch.java @@ -13,19 +13,14 @@ import android.support.v7.widget.SwitchCompat; import android.widget.Switch; -import com.facebook.react.uimanager.ReactZIndexView; - -import javax.annotation.Nullable; - /** * Switch that has its value controlled by JS. Whenever the value of the switch changes, we do not * allow any other changes to that switch until JS sets a value explicitly. This stops the Switch * from changing its value multiple times, when those changes have not been processed by JS first. */ -/*package*/ class ReactSwitch extends SwitchCompat implements ReactZIndexView { +/*package*/ class ReactSwitch extends SwitchCompat { private boolean mAllowChange; - private @Nullable float mZIndex; public ReactSwitch(Context context) { super(context); @@ -47,12 +42,4 @@ public void setChecked(boolean checked) { } mAllowChange = true; } - - public void setZIndex(float zIndex) { - mZIndex = zIndex; - } - - public float getZIndex() { - return mZIndex; - } } diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java b/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java index 887a06959bd6a7..11f1aee50e865c 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java @@ -14,22 +14,16 @@ import android.text.Layout; import android.text.Spanned; import android.view.Gravity; -import android.view.ViewGroup; import android.widget.TextView; import com.facebook.react.uimanager.ReactCompoundView; -import com.facebook.react.uimanager.ReactZIndexView; -import com.facebook.react.uimanager.ViewGroupManager; -import javax.annotation.Nullable; - -public class ReactTextView extends TextView implements ReactCompoundView, ReactZIndexView { +public class ReactTextView extends TextView implements ReactCompoundView { private boolean mContainsImages; private int mDefaultGravityHorizontal; private int mDefaultGravityVertical; private boolean mTextIsSelectable; - private @Nullable float zIndex; public ReactTextView(Context context) { super(context); @@ -122,15 +116,6 @@ public void invalidateDrawable(Drawable drawable) { super.invalidateDrawable(drawable); } - public void setZIndex(float targetZIndex) { - zIndex = targetZIndex; - ViewGroupManager.reorderChildrenByZIndex((ViewGroup) this.getParent()); - } - - public float getZIndex() { - return zIndex; - } - @Override public void onDetachedFromWindow() { super.onDetachedFromWindow(); diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java index 9e0cd50036e177..7f9a13d7d27b7a 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java @@ -34,7 +34,6 @@ import android.widget.EditText; import com.facebook.infer.annotation.Assertions; -import com.facebook.react.uimanager.ReactZIndexView; import com.facebook.react.views.text.CustomStyleSpan; import com.facebook.react.views.text.ReactTagSpan; import com.facebook.react.views.text.ReactTextUpdate; @@ -52,7 +51,7 @@ * has called this explicitly. This is the default behavior on other platforms as well. * VisibleForTesting from {@link TextInputEventsTestCase}. */ -public class ReactEditText extends EditText implements ReactZIndexView { +public class ReactEditText extends EditText { private final InputMethodManager mInputMethodManager; // This flag is set to true when we set the text of the EditText explicitly. In that case, no @@ -73,7 +72,6 @@ public class ReactEditText extends EditText implements ReactZIndexView { private boolean mBlurOnSubmit; private @Nullable SelectionWatcher mSelectionWatcher; private final InternalKeyListener mKeyListener; - private @Nullable float mZIndex; private static final KeyListener sKeyListener = QwertyKeyListener.getInstanceForFullKeyboard(); @@ -214,7 +212,7 @@ public void setInputType(int type) { mStagedInputType = type; // Input type password defaults to monospace font, so we need to re-apply the font super.setTypeface(tf); - + // We override the KeyListener so that all keys on the soft input keyboard as well as hardware // keyboards work. Some KeyListeners like DigitsKeyListener will display the keyboard but not // accept all input from it @@ -375,14 +373,6 @@ public void invalidateDrawable(Drawable drawable) { super.invalidateDrawable(drawable); } - public void setZIndex(float zIndex) { - mZIndex = zIndex; - } - - public float getZIndex() { - return mZIndex; - } - @Override public void onDetachedFromWindow() { super.onDetachedFromWindow(); diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/toolbar/ReactToolbar.java b/ReactAndroid/src/main/java/com/facebook/react/views/toolbar/ReactToolbar.java index 1defcdc95790c1..c9b764492a7379 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/toolbar/ReactToolbar.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/toolbar/ReactToolbar.java @@ -30,7 +30,6 @@ import com.facebook.react.bridge.ReadableArray; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.PixelUtil; -import com.facebook.react.uimanager.ReactZIndexView; import javax.annotation.Nullable; @@ -38,7 +37,7 @@ * Custom implementation of the {@link Toolbar} widget that adds support for remote images in logo * and navigationIcon using fresco. */ -public class ReactToolbar extends Toolbar implements ReactZIndexView { +public class ReactToolbar extends Toolbar { private static final String PROP_ACTION_ICON = "icon"; private static final String PROP_ACTION_SHOW = "show"; @@ -59,8 +58,6 @@ public class ReactToolbar extends Toolbar implements ReactZIndexView { private IconControllerListener mNavIconControllerListener; private IconControllerListener mOverflowIconControllerListener; - private @Nullable float mZIndex; - /** * Attaches specific icon width & height to a BaseControllerListener which will be used to * create the Drawable @@ -333,11 +330,4 @@ private IconImageInfo getIconImageInfo(ReadableMap source) { } } - public void setZIndex(float zIndex) { - mZIndex = zIndex; - } - - public float getZIndex() { - return mZIndex; - } } diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java b/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java index 6608934b5a9deb..63ceac761e0845 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java @@ -29,21 +29,19 @@ import com.facebook.react.uimanager.MeasureSpecAssertions; import com.facebook.react.uimanager.PointerEvents; import com.facebook.react.uimanager.ReactPointerEventsView; -import com.facebook.react.uimanager.ReactZIndexView; /** * Backing for a React View. Has support for borders, but since borders aren't common, lazy * initializes most of the storage needed for them. */ public class ReactViewGroup extends ViewGroup implements - ReactInterceptingViewGroup, ReactClippingViewGroup, ReactPointerEventsView, ReactHitSlopView, ReactZIndexView { + ReactInterceptingViewGroup, ReactClippingViewGroup, ReactPointerEventsView, ReactHitSlopView { private static final int ARRAY_CAPACITY_INCREMENT = 12; private static final int DEFAULT_BACKGROUND_COLOR = Color.TRANSPARENT; private static final LayoutParams sDefaultLayoutParam = new ViewGroup.LayoutParams(0, 0); /* should only be used in {@link #updateClippingToRect} */ private static final Rect sHelperRect = new Rect(); - private @Nullable float mZIndex; /** * This listener will be set for child views when removeClippedSubview property is enabled. When @@ -532,12 +530,4 @@ public void setHitSlopRect(@Nullable Rect rect) { mHitSlopRect = rect; } - public void setZIndex(float zIndex) { - mZIndex = zIndex; - } - - public float getZIndex() { - return mZIndex; - } - } diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.java b/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.java index 8beb3475cb3525..6a4bd5d264914b 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.java @@ -195,7 +195,6 @@ public void addView(ReactViewGroup parent, View child, int index) { } else { parent.addView(child, index); } - super.reorderChildrenByZIndex(parent); } @Override diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/viewpager/ReactViewPager.java b/ReactAndroid/src/main/java/com/facebook/react/views/viewpager/ReactViewPager.java index b9630338e45c02..8b86beb76f6721 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/viewpager/ReactViewPager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/viewpager/ReactViewPager.java @@ -12,8 +12,6 @@ import java.util.ArrayList; import java.util.List; -import javax.annotation.Nullable; - import android.support.v4.view.PagerAdapter; import android.support.v4.view.ViewPager; import android.view.MotionEvent; @@ -22,7 +20,6 @@ import com.facebook.react.bridge.ReactContext; import com.facebook.react.common.SystemClock; -import com.facebook.react.uimanager.ReactZIndexView; import com.facebook.react.uimanager.UIManagerModule; import com.facebook.react.uimanager.events.EventDispatcher; import com.facebook.react.uimanager.events.NativeGestureUtil; @@ -32,7 +29,7 @@ * views to custom {@link PagerAdapter} instance which is used by {@link NativeViewHierarchyManager} * to add children nodes according to react views hierarchy. */ -/* package */ class ReactViewPager extends ViewPager implements ReactZIndexView { +/* package */ class ReactViewPager extends ViewPager { private class Adapter extends PagerAdapter { @@ -129,7 +126,6 @@ public void onPageScrollStateChanged(int state) { private final EventDispatcher mEventDispatcher; private boolean mIsCurrentItemFromJs; private boolean mScrollEnabled = true; - private @Nullable float mZIndex; public ReactViewPager(ReactContext reactContext) { super(reactContext); @@ -191,12 +187,4 @@ public void setScrollEnabled(boolean scrollEnabled) { /*package*/ View getViewFromAdapter(int index) { return getAdapter().getViewAt(index); } - - public void setZIndex(float zIndex) { - mZIndex = zIndex; - } - - public float getZIndex() { - return mZIndex; - } } diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/webview/ReactWebViewManager.java b/ReactAndroid/src/main/java/com/facebook/react/views/webview/ReactWebViewManager.java index 2c3fbf95c39ad2..586b071d545975 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/webview/ReactWebViewManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/webview/ReactWebViewManager.java @@ -35,7 +35,6 @@ import com.facebook.react.common.MapBuilder; import com.facebook.react.common.SystemClock; import com.facebook.react.common.build.ReactBuildConfig; -import com.facebook.react.uimanager.ReactZIndexView; import com.facebook.react.uimanager.SimpleViewManager; import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.UIManagerModule; @@ -180,9 +179,8 @@ private WritableMap createWebViewEvent(WebView webView, String url) { * Subclass of {@link WebView} that implements {@link LifecycleEventListener} interface in order * to call {@link WebView#destroy} on activty destroy event and also to clear the client */ - private static class ReactWebView extends WebView implements LifecycleEventListener, ReactZIndexView { + private static class ReactWebView extends WebView implements LifecycleEventListener { private @Nullable String injectedJS; - private @Nullable float mZIndex; /** * WebView must be created with an context of the current activity @@ -226,14 +224,6 @@ private void cleanupCallbacksAndDestroy() { setWebViewClient(null); destroy(); } - - public void setZIndex(float zIndex) { - mZIndex = zIndex; - } - - public float getZIndex() { - return mZIndex; - } } public ReactWebViewManager() {