diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/common/ViewHelper.java b/ReactAndroid/src/main/java/com/facebook/react/views/common/ViewHelper.java index b827ff629db4c1..ee536db52667e8 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/common/ViewHelper.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/common/ViewHelper.java @@ -6,7 +6,6 @@ package com.facebook.react.views.common; import android.graphics.drawable.Drawable; -import android.os.Build; import android.view.View; /** Helper class for Views */ @@ -14,18 +13,13 @@ public class ViewHelper { /** * Set the background to a given Drawable, or remove the background. It calls {@link - * View#setBackground(Drawable)} or {@link View#setBackgroundDrawable(Drawable)} based on the sdk - * version. + * View#setBackground(Drawable)}. * * @param view {@link View} to apply the background. * @param drawable {@link Drawable} The Drawable to use as the background, or null to remove the * background */ public static void setBackground(View view, Drawable drawable) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { - view.setBackground(drawable); - } else { - view.setBackgroundDrawable(drawable); - } + view.setBackground(drawable); } } 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 d06f1b0395edd7..eda4bb190611af 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 @@ -668,17 +668,13 @@ public void setOverflow(String overflow) { /** * Set the background for the view or remove the background. It calls {@link - * #setBackground(Drawable)} or {@link #setBackgroundDrawable(Drawable)} based on the sdk version. + * #setBackground(Drawable)}. * * @param drawable {@link Drawable} The Drawable to use as the background, or null to remove the * background */ private void updateBackgroundDrawable(Drawable drawable) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { - super.setBackground(drawable); - } else { - super.setBackgroundDrawable(drawable); - } + super.setBackground(drawable); } @Override