Skip to content

Commit

Permalink
Do not reference setTranslucentBackgroundDrawable
Browse files Browse the repository at this point in the history
Summary:
This method has been deprecated since 0.76, but we're still using it inside our codebase.
I'm cleaning up the only usage of it replacing it with the implementation.

Changelog:
[Internal] [Changed] - Do not reference `setTranslucentBackgroundDrawable`

Differential Revision: D63695933
  • Loading branch information
cortinico authored and facebook-github-bot committed Oct 1, 2024
1 parent 38c1b47 commit 56babe8
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
package com.facebook.react.views.view;

import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.view.View;
import androidx.annotation.ColorInt;
import androidx.annotation.Nullable;
Expand Down Expand Up @@ -228,10 +229,13 @@ public void setPointerEvents(ReactViewGroup view, @Nullable String pointerEvents

@ReactProp(name = "nativeBackgroundAndroid")
public void setNativeBackground(ReactViewGroup view, @Nullable ReadableMap bg) {
view.setTranslucentBackgroundDrawable(
bg == null
? null
: ReactDrawableHelper.createDrawableFromJSDescription(view.getContext(), bg));
Drawable background;
if (bg != null) {
background = ReactDrawableHelper.createDrawableFromJSDescription(view.getContext(), bg);
} else {
background = null;
}
BackgroundStyleApplicator.setFeedbackUnderlay(view, background);
}

@ReactProp(name = "nativeForegroundAndroid")
Expand Down

0 comments on commit 56babe8

Please sign in to comment.