Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

3 changes: 3 additions & 0 deletions ReactAndroid/src/main/java/com/facebook/react/views/view/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ rn_android_library(
visibility = [
"PUBLIC",
],
provided_deps = [
react_native_dep("third-party/android/support/v4:lib-support-v4"),
],
deps = [
YOGA_TARGET,
react_native_dep("libraries/fbcore/src/main/java/com/facebook/common/logging:logging"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.LayerDrawable;
import android.support.v4.view.ViewCompat;
import android.view.View;
import com.facebook.react.views.common.ViewHelper;
import javax.annotation.Nullable;

/** Class that manages the background for views and borders. */
Expand All @@ -26,15 +26,15 @@ private ReactViewBackgroundDrawable getOrCreateReactViewBackground() {
if (mReactBackgroundDrawable == null) {
mReactBackgroundDrawable = new ReactViewBackgroundDrawable(mView.getContext());
Drawable backgroundDrawable = mView.getBackground();
ViewHelper.setBackground(
ViewCompat.setBackground(
mView, null); // required so that drawable callback is cleared before we add the
// drawable back as a part of LayerDrawable
if (backgroundDrawable == null) {
ViewHelper.setBackground(mView, mReactBackgroundDrawable);
ViewCompat.setBackground(mView, mReactBackgroundDrawable);
} else {
LayerDrawable layerDrawable =
new LayerDrawable(new Drawable[] {mReactBackgroundDrawable, backgroundDrawable});
ViewHelper.setBackground(mView, layerDrawable);
ViewCompat.setBackground(mView, layerDrawable);
}
}
return mReactBackgroundDrawable;
Expand Down